X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1f0c8f31f407ecfce909060464c0ea655221cdab..55410bb4f67febe1ca20654f078ea4fb9a6223ae:/src/osx/carbon/uma.cpp diff --git a/src/osx/carbon/uma.cpp b/src/osx/carbon/uma.cpp index 45610c21bf..3009393821 100644 --- a/src/osx/carbon/uma.cpp +++ b/src/osx/carbon/uma.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/mac/carbon/uma.cpp +// Name: src/osx/carbon/uma.cpp // Purpose: UMA support // Author: Stefan Csomor // Modified by: @@ -20,46 +20,9 @@ #include "wx/osx/uma.h" -static SInt32 sUMASystemVersion = 0 ; - -long UMAGetSystemVersion() -{ - if ( sUMASystemVersion == 0 ) - { - verify_noerr(Gestalt(gestaltSystemVersion, &sUMASystemVersion)); - } - return sUMASystemVersion ; -} - -void UMAInitToolbox( UInt16 WXUNUSED(inMoreMastersCalls), - bool WXUNUSED(isEmbedded) ) -{ -#if 0 // ndef __LP64__ - { - FontFamilyID fontId ; - Str255 fontName ; - SInt16 fontSize ; - Style fontStyle ; - - GetThemeFont(kThemeSmallSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ; - GetFNum( fontName, &fontId ); - - TXNMacOSPreferredFontDescription fontDescriptions[] = - { - { fontId , (fontSize << 16) , kTXNDefaultFontStyle, kTXNSystemDefaultEncoding } - } ; - int noOfFontDescriptions = sizeof( fontDescriptions ) / sizeof(TXNMacOSPreferredFontDescription) ; - - OptionBits options = 0 ; - - TXNInitTextension( fontDescriptions, noOfFontDescriptions, options ); - } -#endif -} - // menu manager -#if 1 // not yet wxMAC_USE_COCOA == 0 +#if wxOSX_USE_CARBON MenuRef UMANewMenu( SInt16 id , const wxString& title , wxFontEncoding encoding ) { @@ -95,12 +58,13 @@ void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex inItem , bool enable) DisableMenuItem( inMenu , inItem ) ; } -void UMAAppendSubMenuItem( MenuRef menu , const wxString& title, wxFontEncoding encoding , SInt16 id ) +void UMAAppendSubMenuItem( MenuRef menu , const wxString& title, wxFontEncoding encoding , MenuRef submenu ) { AppendMenuItemTextWithCFString( menu, CFSTR("A"), 0, 0,NULL); UMASetMenuItemText( menu, (SInt16) ::CountMenuItems(menu), title , encoding ); - SetMenuItemHierarchicalID( menu , CountMenuItems( menu ) , id ) ; + SetMenuItemHierarchicalMenu( menu , CountMenuItems( menu ) , submenu ) ; + SetMenuTitleWithCFString(submenu , wxCFStringRef(title , encoding) ); } void UMAInsertSubMenuItem( MenuRef menu , const wxString& title, wxFontEncoding encoding , MenuItemIndex item , SInt16 id ) @@ -271,10 +235,6 @@ void UMAInsertMenuItem( MenuRef menu , const wxString& title, wxFontEncoding enc UMASetMenuItemShortcut( menu , item+1 , entry ) ; } -#endif - -#if 1 // not yet wxMAC_USE_COCOA == 0 - static OSStatus UMAGetHelpMenu( MenuRef * outHelpMenu, MenuItemIndex * outFirstCustomItemIndex,