sUMAHasWindowManager = sUMAWindowManagerAttr & gestaltWindowMgrPresent ;
}
-#ifndef __DARWIN__
#if TARGET_CARBON
// Call currently implicitely done : InitFloatingWindows() ;
#else
InitFloatingWindows() ;
else
InitWindows();
-#endif
#endif
if ( NavServicesAvailable() )
{
wxASSERT( inWindowRef != NULL ) ;
#if TARGET_CARBON
- return GetWindowPort( inWindowRef ) ;
+ return (GrafPtr) GetWindowPort( inWindowRef ) ;
#else
return (GrafPtr) inWindowRef ;
#endif
return ::DrawThemePlacard( inRect , inState ) ;
}
+#if !TARGET_CARBON
static OSStatus helpMenuStatus = noErr ;
-static MenuRef helpMenuHandle = NULL ;
static MenuItemIndex firstCustomItemIndex = 0 ;
+#endif
OSStatus UMAGetHelpMenu(
MenuRef * outHelpMenu,
#if TARGET_CARBON
return HMGetHelpMenu( outHelpMenu , outFirstCustomItemIndex ) ;
#else
- if ( helpMenuHandle == NULL )
+ MenuRef helpMenuHandle ;
+ helpMenuStatus = HMGetHelpMenuHandle( &helpMenuHandle ) ;
+ if ( firstCustomItemIndex == 0 && helpMenuStatus == noErr )
{
- helpMenuStatus = HMGetHelpMenuHandle( &helpMenuHandle ) ;
- if ( helpMenuStatus == noErr )
- {
- firstCustomItemIndex = CountMenuItems( helpMenuHandle ) + 1 ;
- }
+ firstCustomItemIndex = CountMenuItems( helpMenuHandle ) + 1 ;
}
if ( outFirstCustomItemIndex )
{