compilation fix; unTABbed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-08-29 13:59:39 +00:00
parent bd118d35c6
commit df7998fce5

View File

@@ -462,22 +462,22 @@ void wxToolBarTool::UpdateToggleImage( bool toggle )
dc.SelectObject( wxNullBitmap ) ;
ControlButtonContentInfo info ;
wxMacCreateBitmapButton( &info , bmp ) ;
SetControlData( m_controlHandle , 0, kControlIconContentTag, sizeof( info ),
(Ptr)&info );
SetControlData( m_controlHandle , 0, kControlIconContentTag,
sizeof( info ), (Ptr)&info );
wxMacReleaseBitmapButton( &info ) ;
}
else
{
ControlButtonContentInfo info ;
wxMacCreateBitmapButton( &info , m_bmpNormal ) ;
SetControlData( m_controlHandle , 0, kControlIconContentTag, sizeof( info ),
(Ptr)&info );
SetControlData( m_controlHandle , 0, kControlIconContentTag,
sizeof( info ), (Ptr)&info );
wxMacReleaseBitmapButton( &info ) ;
}
IconTransformType transform = toggle ? kTransformSelected : kTransformNone ;
SetControlData( m_controlHandle, 0, kControlIconTransformTag, sizeof( transform ),
(Ptr)&transform );
SetControlData( m_controlHandle, 0, kControlIconTransformTag,
sizeof( transform ), (Ptr)&transform );
HIViewSetNeedsDisplay( m_controlHandle , true ) ;
#else
@@ -776,9 +776,9 @@ bool wxToolBar::Realize()
if (m_tools.GetCount() == 0)
return false;
OSStatus err = noErr ;
#if wxMAC_USE_NATIVE_TOOLBAR
// remove all tools, no way to determine how many there are in a toolbar, so just a high number :-(
OSStatus err = noErr ;
if ( m_macHIToolbarRef != NULL )
{
for ( CFIndex i = 0 ; i < 100 ; ++i )
@@ -786,7 +786,9 @@ bool wxToolBar::Realize()
err = HIToolbarRemoveItemAtIndex( (HIToolbarRef) m_macHIToolbarRef , i ) ;
}
}
#endif
wxASSERT_MSG( err == noErr, _T("HIToolbarRemoveItemAtIndex failed") );
#endif // wxMAC_USE_NATIVE_TOOLBAR
int x = m_xMargin + kwxMacToolBarLeftMargin;
int y = m_yMargin + kwxMacToolBarTopMargin;
@@ -825,7 +827,9 @@ bool wxToolBar::Realize()
node = m_tools.GetFirst();
#if wxMAC_USE_NATIVE_TOOLBAR
CFIndex currentPosition = 0 ;
#endif // wxMAC_USE_NATIVE_TOOLBAR
while ( node != NULL )
{
@@ -879,7 +883,7 @@ bool wxToolBar::Realize()
}
}
}
#endif
#endif // wxMAC_USE_NATIVE_TOOLBAR
// update radio button (and group) state
lastIsRadio = curIsRadio;
@@ -1095,10 +1099,10 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos),
err = HIToolbarItemCreate( kHIToolbarSeparatorIdentifier, kHIToolbarItemCantBeRemoved | kHIToolbarItemIsSeparator | kHIToolbarItemAllowDuplicates, &item );
if (err == noErr)
tool->SetToolbarItemRef( item );
#endif
#endif // wxMAC_USE_NATIVE_TOOLBAR
CreateSeparatorControl( window, &toolrect, &controlHandle );
tool->SetControlHandle( controlHandle );
#endif
#endif // __WXMAC_OSX__
}
break;
@@ -1115,7 +1119,9 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos),
SInt16 behaviour = kControlBehaviorOffsetContents ;
if ( tool->CanBeToggled() )
behaviour += kControlBehaviorToggles ;
CreateBevelButtonControl( window , &toolrect , CFSTR("") , kControlBevelButtonNormalBevel , behaviour , &info ,
CreateBevelButtonControl( window , &toolrect , CFSTR("") ,
kControlBevelButtonNormalBevel ,
behaviour , &info ,
0 , 0 , 0 , &controlHandle ) ;
}
@@ -1132,7 +1138,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos),
HIToolbarItemSetCommandID( item, kHIToolbarCommandPressAction );
tool->SetToolbarItemRef( item );
}
#endif
#endif // wxMAC_USE_NATIVE_TOOLBAR
wxMacReleaseBitmapButton( &info ) ;
/*
@@ -1237,7 +1243,9 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolbase)
tool->Detach();
CFIndex removeIndex = tool->GetIndex() ;
#if wxMAC_USE_NATIVE_TOOLBAR
CFIndex removeIndex = tool->GetIndex();
#endif // wxMAC_USE_NATIVE_TOOLBAR
switch ( tool->GetStyle() )
{
@@ -1259,7 +1267,7 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolbase)
HIToolbarRemoveItemAtIndex( (HIToolbarRef) m_macHIToolbarRef , removeIndex ) ;
tool->SetIndex( -1 ) ;
}
#endif
#endif // wxMAC_USE_NATIVE_TOOLBAR
tool->ClearControl() ;
}
break;