/////////////////////////////////////////////////////////////////////////////
-// Name: src/mac/carbon/uma.cpp
+// Name: src/osx/carbon/uma.cpp
// Purpose: UMA support
// Author: Stefan Csomor
// Modified by:
#include "wx/osx/uma.h"
-static SInt32 sUMASystemVersion = 0 ;
-
-long UMAGetSystemVersion()
-{
- if ( sUMASystemVersion == 0 )
- {
- verify_noerr(Gestalt(gestaltSystemVersion, &sUMASystemVersion));
- }
- return sUMASystemVersion ;
-}
-
// menu manager
#if wxOSX_USE_CARBON
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 )
bool allowHelpMenuCreation)
{
static bool s_createdHelpMenu = false ;
-
+
if ( !s_createdHelpMenu && !allowHelpMenuCreation )
{
return paramErr ;
}
-
+
OSStatus status = HMGetHelpMenu( outHelpMenu , outFirstCustomItemIndex ) ;
s_createdHelpMenu = ( status == noErr ) ;
return status ;