#include "wx/defs.h"
#include "wx/dc.h"
#include "wx/mac/uma.h"
+#include <MacTextEditor.h>
#ifndef __DARWIN__
#include <Navigation.h>
// windows manager, control manager, navigation services etc. are
// present
+#define wxUSE_MLTE 0
+
static bool sUMAHasAppearance = false ;
static long sUMAAppearanceVersion = 0 ;
extern int gAGABackgroundColor ;
{
NavUnload() ;
}
+#if wxUSE_MLTE
+ TXNTerminateTextension( ) ;
+#endif
}
void UMAInitToolbox( UInt16 inMoreMastersCalls )
{
{
NavLoad() ;
}
+
+#if wxUSE_MLTE
+ TXNMacOSPreferredFontDescription defaults;
+ defaults.fontID = kFontIDGeneva ;
+ defaults.pointSize = (10 << 16) ;
+ defaults.fontStyle = kTXNDefaultFontStyle;
+ defaults.encoding = kTXNSystemDefaultEncoding;
+ TXNInitTextension(&defaults, 1, (kTXNAlwaysUseQuickDrawTextMask | kTXNWantMoviesMask | kTXNWantSoundMask | kTXNWantGraphicsMask));
+#endif
}
// process manager
SetControlVisibility( inControl , false , false ) ;
Rect ctrlBounds ;
InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ;
- }
+ }
::SizeControl( inControl , x , y ) ;
if ( visible ) {
SetControlVisibility( inControl , true , false ) ;
return ::DrawThemePlacard( inRect , inState ) ;
}
+static OSStatus helpMenuStatus = noErr ;
+static MenuRef helpMenuHandle = NULL ;
+static MenuItemIndex firstCustomItemIndex = 0 ;
+
+OSStatus UMAGetHelpMenu(
+ MenuRef * outHelpMenu,
+ MenuItemIndex * outFirstCustomItemIndex)
+{
+#if TARGET_CARBON
+ return HMGetHelpMenu( outHelpMenu , outFirstCustomItemIndex ) ;
+#else
+ if ( helpMenuHandle == NULL )
+ {
+ helpMenuStatus = HMGetHelpMenuHandle( &helpMenuHandle ) ;
+ if ( helpMenuStatus == noErr )
+ {
+ firstCustomItemIndex = CountMenuItems( helpMenuHandle ) + 1 ;
+ }
+ }
+ if ( outFirstCustomItemIndex )
+ {
+ *outFirstCustomItemIndex = firstCustomItemIndex ;
+ }
+ *outHelpMenu = helpMenuHandle ;
+ return helpMenuStatus ;
+#endif
+}