return;
m_peer->SetControlSize( variant );
+#if wxOSX_USE_CARBON
+ ControlSize size ;
+
+ // we will get that from the settings later
+ // and make this NORMAL later, but first
+ // we have a few calculations that we must fix
+
+ switch ( variant )
+ {
+ case wxWINDOW_VARIANT_NORMAL :
+ size = kControlSizeNormal;
+ break ;
+
+ case wxWINDOW_VARIANT_SMALL :
+ size = kControlSizeSmall;
+ break ;
+
+ case wxWINDOW_VARIANT_MINI :
+ // not always defined in the headers
+ size = 3 ;
+ break ;
+
+ case wxWINDOW_VARIANT_LARGE :
+ size = kControlSizeLarge;
+ break ;
+
+ default:
+ wxFAIL_MSG(_T("unexpected window variant"));
+ break ;
+ }
+ m_peer->SetData<ControlSize>(kControlEntireControl, kControlSizeTag, &size ) ;
+#endif
+
#if wxOSX_USE_COCOA_OR_CARBON
wxFont font ;
-#if wxOSX_USE_CARBON
- ControlSize size ;
+#if wxOSX_USE_ATSU_TEXT
ThemeFontID themeFont = kThemeSystemFont ;
// we will get that from the settings later
switch ( variant )
{
case wxWINDOW_VARIANT_NORMAL :
- size = kControlSizeNormal;
themeFont = kThemeSystemFont ;
break ;
case wxWINDOW_VARIANT_SMALL :
- size = kControlSizeSmall;
themeFont = kThemeSmallSystemFont ;
break ;
case wxWINDOW_VARIANT_MINI :
// not always defined in the headers
- size = 3 ;
themeFont = 109 ;
break ;
case wxWINDOW_VARIANT_LARGE :
- size = kControlSizeLarge;
themeFont = kThemeSystemFont ;
break ;
break ;
}
- m_peer->SetData<ControlSize>(kControlEntireControl, kControlSizeTag, &size ) ;
font.MacCreateFromThemeFont( themeFont ) ;
#else
CTFontUIFontType themeFont = kCTFontSystemFontType ;
void wxWindowMac::SetDropTarget(wxDropTarget *pDropTarget)
{
- if ( m_dropTarget != NULL )
- delete m_dropTarget;
+ delete m_dropTarget;
m_dropTarget = pDropTarget;
if ( m_dropTarget != NULL )
{
ClientToScreen( &x , &y ) ;
}
-#ifdef __WXOSX_CARBON__
- long menuResult = ::PopUpMenuSelect((MenuHandle) menu->GetHMenu() , y, x, 0) ;
- if ( HiWord(menuResult) != 0 )
- {
- MenuCommand macid;
- GetMenuItemCommandID( GetMenuHandle(HiWord(menuResult)) , LoWord(menuResult) , &macid );
- int id = wxMacCommandToId( macid );
- wxMenuItem* item = NULL ;
- wxMenu* realmenu ;
- item = menu->FindItem( id, &realmenu ) ;
- if ( item )
- {
- if (item->IsCheckable())
- item->Check( !item->IsChecked() ) ;
-
- menu->SendEvent( id , item->IsCheckable() ? item->IsChecked() : -1 ) ;
- }
- }
-
-#else
+ menu->GetPeer()->PopUp(this, x, y);
menu->SetInvokingWindow( NULL );
- return false;
-#endif
-
return true;
#else
// actually this shouldn't be called, because universal is having its own implementation