- InstallControlEventHandler( (ControlRef) m_controlHandle, GetwxMacToolBarToolEventHandlerUPP(),
- GetEventTypeCount(eventList), eventList, this,NULL);
+#ifdef __WXMAC_OSX__
+ int iconsize = 16 ;
+ if ( toolSize.x >= 24 && toolSize.y >= 24)
+ {
+ iconsize = 24 ;
+ }
+ toolrect.left += ( toolSize.x - iconsize ) / 2 ;
+ toolrect.right = toolrect.left + iconsize ;
+ toolrect.top += ( toolSize.y - iconsize ) / 2 ;
+ toolrect.bottom = toolrect.top + iconsize ;
+ CreateIconControl( window , &toolrect , &info , false , &m_controlHandle ) ;
+#else
+ SInt16 behaviour = kControlBehaviorOffsetContents ;
+ if ( CanBeToggled() )
+ behaviour += kControlBehaviorToggles ;
+ CreateBevelButtonControl( window , &toolrect , CFSTR("") , kControlBevelButtonNormalBevel , behaviour , &info ,
+ 0 , 0 , 0 , &m_controlHandle ) ;
+#endif
+
+ wxMacReleaseBitmapButton( &info ) ;
+ /*
+ SetBevelButtonTextPlacement( m_controlHandle , kControlBevelButtonPlaceBelowGraphic ) ;
+ UMASetControlTitle( m_controlHandle , label , wxFont::GetDefaultEncoding() ) ;
+ */