From 27f4f38e857b15df041f7348f172a90054f4897b Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 6 Jun 2003 23:46:36 +0000 Subject: [PATCH] fix so wxMenu::InsertItem actually inserts rather than overwrites git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/menu.cpp | 2 +- src/mac/carbon/uma.cpp | 92 ++++++++++++++++++++--------------------- src/mac/menu.cpp | 2 +- src/mac/uma.cpp | 92 ++++++++++++++++++++--------------------- 4 files changed, 94 insertions(+), 94 deletions(-) diff --git a/src/mac/carbon/menu.cpp b/src/mac/carbon/menu.cpp index ba9fb03130..bea62cec1b 100644 --- a/src/mac/carbon/menu.cpp +++ b/src/mac/carbon/menu.cpp @@ -234,7 +234,7 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) else { UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), label , pos,key,modifiers); - SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , pItem->GetId() ) ; + SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos+1 , pItem->GetId() ) ; if ( pItem->GetBitmap().Ok() ) { ControlButtonContentInfo info ; diff --git a/src/mac/carbon/uma.cpp b/src/mac/carbon/uma.cpp index 197b7249c5..d064727eed 100644 --- a/src/mac/carbon/uma.cpp +++ b/src/mac/carbon/uma.cpp @@ -21,7 +21,7 @@ // since we have decided that we only support 8.6 upwards we are // checking for these minimum requirements in the startup code of // the application so all wxWindows code can safely assume that appearance 1.1 -// windows manager, control manager, navigation services etc. are +// windows manager, control manager, navigation services etc. are // present static bool sUMAHasAppearance = false ; @@ -78,7 +78,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) if ( Gestalt(gestaltSystemVersion, &sUMASystemVersion) != noErr) sUMASystemVersion = 0x0000 ; - + long theAppearance ; if ( Gestalt( gestaltAppearanceAttr, &theAppearance ) == noErr ) { @@ -97,7 +97,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) { sUMAHasWindowManager = sUMAWindowManagerAttr & gestaltWindowMgrPresent ; } - + #if TARGET_CARBON // Call currently implicitely done : InitFloatingWindows() ; #else @@ -118,7 +118,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) sUMAHasAquaLayout = true ; if ( TXNInitTextension != (void*) kUnresolvedCFragSymbolAddress ) - { + { FontFamilyID fontId ; Str255 fontName ; SInt16 fontSize ; @@ -131,7 +131,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) { fontId , (fontSize << 16) ,kTXNDefaultFontStyle, kTXNSystemDefaultEncoding } , } ; int noOfFontDescriptions = sizeof( fontDescriptions ) / sizeof(TXNMacOSPreferredFontDescription) ; -#if 0 // TARGET_CARBON +#if 0 // TARGET_CARBON --noOfFontDescriptions ; #endif // kTXNAlwaysUseQuickDrawTextMask might be desirable because of speed increases but it crashes the app under OS X upon key stroke @@ -159,12 +159,12 @@ Boolean CanUseATSUI() } */ // process manager -long UMAGetProcessMode() +long UMAGetProcessMode() { - OSErr err ; + OSErr err ; ProcessInfoRec processinfo; ProcessSerialNumber procno ; - + procno.highLongOfPSN = NULL ; procno.lowLongOfPSN = kCurrentProcess ; processinfo.processInfoLength = sizeof(ProcessInfoRec); @@ -176,7 +176,7 @@ long UMAGetProcessMode() return processinfo.processMode ; } -bool UMAGetProcessModeDoesActivateOnFGSwitch() +bool UMAGetProcessModeDoesActivateOnFGSwitch() { return UMAGetProcessMode() & modeDoesActivateOnFGSwitch ; } @@ -191,7 +191,7 @@ void UMASetMenuTitle( MenuRef menu , StringPtr title ) const long headersize = 14 ; int oldlen = (**menu).menuData[0] + 1; int newlen = title[0] + 1 ; - + if ( oldlen < newlen ) { // enlarge before adjusting @@ -218,23 +218,23 @@ UInt32 UMAMenuEvent( EventRecord *inEvent ) return MenuEvent( inEvent ) ; } -void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex inItem ) +void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex inItem ) { EnableMenuItem( inMenu , inItem ) ; } -void UMADisableMenuItem( MenuRef inMenu , MenuItemIndex inItem ) +void UMADisableMenuItem( MenuRef inMenu , MenuItemIndex inItem ) { DisableMenuItem( inMenu , inItem ) ; } -void UMAAppendSubMenuItem( MenuRef menu , StringPtr l , SInt16 id ) +void UMAAppendSubMenuItem( MenuRef menu , StringPtr l , SInt16 id ) { MacAppendMenu(menu, l); SetMenuItemHierarchicalID( menu , CountMenuItems( menu ) , id ) ; } -void UMAInsertSubMenuItem( MenuRef menu , StringPtr l , MenuItemIndex item , SInt16 id ) +void UMAInsertSubMenuItem( MenuRef menu , StringPtr l , MenuItemIndex item , SInt16 id ) { MacInsertMenuItem(menu, l , item); SetMenuItemHierarchicalID( menu , item , id ) ; @@ -370,7 +370,7 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , SInt16 key , UI break ; } } - + SetItemCmd( menu, item , macKey ); SetMenuItemModifiers(menu, item , modifiers ) ; @@ -379,18 +379,18 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , SInt16 key , UI } } -void UMAAppendMenuItem( MenuRef menu , StringPtr l , SInt16 key, UInt8 modifiers ) +void UMAAppendMenuItem( MenuRef menu , StringPtr l , SInt16 key, UInt8 modifiers ) { MacAppendMenu(menu, "\pA"); SetMenuItemText(menu, (SInt16) ::CountMenuItems(menu), l); UMASetMenuItemShortcut( menu , (SInt16) ::CountMenuItems(menu), key , modifiers ) ; } -void UMAInsertMenuItem( MenuRef menu , StringPtr l , MenuItemIndex item , SInt16 key, UInt8 modifiers ) +void UMAInsertMenuItem( MenuRef menu , StringPtr l , MenuItemIndex item , SInt16 key, UInt8 modifiers ) { - MacInsertMenuItem( menu , "\p" , item) ; - SetMenuItemText(menu, item , l); - UMASetMenuItemShortcut( menu , item , key , modifiers ) ; + MacInsertMenuItem( menu , "\pA" , item) ; + SetMenuItemText(menu, item+1 , l); + UMASetMenuItemShortcut( menu , item+1 , key , modifiers ) ; } // quickdraw @@ -465,7 +465,7 @@ pascal QDGlobalsPtr GetQDGlobalsPtr (void) #endif -void UMAShowWatchCursor() +void UMAShowWatchCursor() { OSErr err = noErr; @@ -481,14 +481,14 @@ void UMAShowWatchCursor() // SetQDGlobalsArrow (*watchFob); // InitCursor ( ); // SetQDGlobalsArrow (&preservedArrow); - SetCursor (*watchFob); + SetCursor (*watchFob); #else - SetCursor (*watchFob); + SetCursor (*watchFob); #endif } } -void UMAShowArrowCursor() +void UMAShowArrowCursor() { #if TARGET_CARBON Cursor arrow; @@ -500,23 +500,23 @@ void UMAShowArrowCursor() // window manager -GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) +GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) { wxASSERT( inWindowRef != NULL ) ; -#if TARGET_CARBON - return (GrafPtr) GetWindowPort( inWindowRef ) ; +#if TARGET_CARBON + return (GrafPtr) GetWindowPort( inWindowRef ) ; #else return (GrafPtr) inWindowRef ; #endif } -void UMADisposeWindow( WindowRef inWindowRef ) +void UMADisposeWindow( WindowRef inWindowRef ) { wxASSERT( inWindowRef != NULL ) ; DisposeWindow( inWindowRef ) ; } -void UMASetWTitleC( WindowRef inWindowRef , const char *title ) +void UMASetWTitleC( WindowRef inWindowRef , const char *title ) { Str255 ptitle ; strncpy( (char*)ptitle , title , 96 ) ; @@ -529,7 +529,7 @@ void UMASetWTitleC( WindowRef inWindowRef , const char *title ) SetWTitle( inWindowRef , ptitle ) ; } -void UMAGetWTitleC( WindowRef inWindowRef , char *title ) +void UMAGetWTitleC( WindowRef inWindowRef , char *title ) { GetWTitle( inWindowRef , (unsigned char*)title ) ; #if TARGET_CARBON @@ -541,7 +541,7 @@ void UMAGetWTitleC( WindowRef inWindowRef , char *title ) // appearance additions -void UMAActivateControl( ControlHandle inControl ) +void UMAActivateControl( ControlHandle inControl ) { // we have to add the control after again to the update rgn // otherwise updates get lost @@ -559,7 +559,7 @@ void UMAActivateControl( ControlHandle inControl ) } } -void UMADrawControl( ControlHandle inControl ) +void UMADrawControl( ControlHandle inControl ) { WindowRef theWindow = GetControlOwner(inControl) ; RgnHandle updateRgn = NewRgn() ; @@ -572,7 +572,7 @@ void UMADrawControl( ControlHandle inControl ) DisposeRgn( updateRgn ) ; } -void UMAMoveControl( ControlHandle inControl , short x , short y ) +void UMAMoveControl( ControlHandle inControl , short x , short y ) { bool visible = IsControlVisible( inControl ) ; if ( visible ) { @@ -588,14 +588,14 @@ void UMAMoveControl( ControlHandle inControl , short x , short y ) } } -void UMASizeControl( ControlHandle inControl , short x , short y ) +void UMASizeControl( ControlHandle inControl , short x , short y ) { bool visible = IsControlVisible( inControl ) ; if ( visible ) { SetControlVisibility( inControl , false , false ) ; Rect ctrlBounds ; InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ; - } + } ::SizeControl( inControl , x , y ) ; if ( visible ) { SetControlVisibility( inControl , true , false ) ; @@ -604,7 +604,7 @@ void UMASizeControl( ControlHandle inControl , short x , short y ) } } -void UMADeactivateControl( ControlHandle inControl ) +void UMADeactivateControl( ControlHandle inControl ) { // we have to add the control after again to the update rgn // otherwise updates get lost @@ -653,7 +653,7 @@ OSErr UMASetKeyboardFocus (WindowPtr inWindow, // events -void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) +void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) { RgnHandle updateRgn = NewRgn() ; GetWindowUpdateRgn( inWindow , updateRgn ) ; @@ -668,18 +668,18 @@ void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) } -bool UMAIsWindowFloating( WindowRef inWindow ) +bool UMAIsWindowFloating( WindowRef inWindow ) { WindowClass cl ; - + GetWindowClass( inWindow , &cl ) ; return cl == kFloatingWindowClass ; } -bool UMAIsWindowModal( WindowRef inWindow ) +bool UMAIsWindowModal( WindowRef inWindow ) { WindowClass cl ; - + GetWindowClass( inWindow , &cl ) ; return cl < kFloatingWindowClass ; } @@ -704,11 +704,11 @@ void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) UMAActivateControl( control ) ; else UMADeactivateControl( control ) ; - } + } SetPort( port ) ; } } -OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) +OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) { return ::DrawThemePlacard( inRect , inState ) ; } @@ -740,7 +740,7 @@ OSStatus UMAGetHelpMenu( #endif } -wxMacPortStateHelper::wxMacPortStateHelper( GrafPtr newport) +wxMacPortStateHelper::wxMacPortStateHelper( GrafPtr newport) { m_clip = NULL ; Setup( newport ) ; @@ -761,7 +761,7 @@ void wxMacPortStateHelper::Setup( GrafPtr newport ) m_textFont = GetPortTextFont( (CGrafPtr) newport); m_textSize = GetPortTextSize( (CGrafPtr) newport); m_textStyle = GetPortTextFace( (CGrafPtr) newport); - m_textMode = GetPortTextMode( (CGrafPtr) newport); + m_textMode = GetPortTextMode( (CGrafPtr) newport); GetThemeDrawingState( &m_drawingState ) ; m_currentPort = newport ; } @@ -798,7 +798,7 @@ OSStatus UMAPutScrap( Size size , OSType type , void *data ) err = PutScrap( size , type , data ) ; #else ScrapRef scrap; - err = GetCurrentScrap (&scrap); + err = GetCurrentScrap (&scrap); if ( !err ) { err = PutScrapFlavor (scrap, type , 0, size, data); diff --git a/src/mac/menu.cpp b/src/mac/menu.cpp index ba9fb03130..bea62cec1b 100644 --- a/src/mac/menu.cpp +++ b/src/mac/menu.cpp @@ -234,7 +234,7 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) else { UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), label , pos,key,modifiers); - SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , pItem->GetId() ) ; + SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos+1 , pItem->GetId() ) ; if ( pItem->GetBitmap().Ok() ) { ControlButtonContentInfo info ; diff --git a/src/mac/uma.cpp b/src/mac/uma.cpp index 197b7249c5..d064727eed 100644 --- a/src/mac/uma.cpp +++ b/src/mac/uma.cpp @@ -21,7 +21,7 @@ // since we have decided that we only support 8.6 upwards we are // checking for these minimum requirements in the startup code of // the application so all wxWindows code can safely assume that appearance 1.1 -// windows manager, control manager, navigation services etc. are +// windows manager, control manager, navigation services etc. are // present static bool sUMAHasAppearance = false ; @@ -78,7 +78,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) if ( Gestalt(gestaltSystemVersion, &sUMASystemVersion) != noErr) sUMASystemVersion = 0x0000 ; - + long theAppearance ; if ( Gestalt( gestaltAppearanceAttr, &theAppearance ) == noErr ) { @@ -97,7 +97,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) { sUMAHasWindowManager = sUMAWindowManagerAttr & gestaltWindowMgrPresent ; } - + #if TARGET_CARBON // Call currently implicitely done : InitFloatingWindows() ; #else @@ -118,7 +118,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) sUMAHasAquaLayout = true ; if ( TXNInitTextension != (void*) kUnresolvedCFragSymbolAddress ) - { + { FontFamilyID fontId ; Str255 fontName ; SInt16 fontSize ; @@ -131,7 +131,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) { fontId , (fontSize << 16) ,kTXNDefaultFontStyle, kTXNSystemDefaultEncoding } , } ; int noOfFontDescriptions = sizeof( fontDescriptions ) / sizeof(TXNMacOSPreferredFontDescription) ; -#if 0 // TARGET_CARBON +#if 0 // TARGET_CARBON --noOfFontDescriptions ; #endif // kTXNAlwaysUseQuickDrawTextMask might be desirable because of speed increases but it crashes the app under OS X upon key stroke @@ -159,12 +159,12 @@ Boolean CanUseATSUI() } */ // process manager -long UMAGetProcessMode() +long UMAGetProcessMode() { - OSErr err ; + OSErr err ; ProcessInfoRec processinfo; ProcessSerialNumber procno ; - + procno.highLongOfPSN = NULL ; procno.lowLongOfPSN = kCurrentProcess ; processinfo.processInfoLength = sizeof(ProcessInfoRec); @@ -176,7 +176,7 @@ long UMAGetProcessMode() return processinfo.processMode ; } -bool UMAGetProcessModeDoesActivateOnFGSwitch() +bool UMAGetProcessModeDoesActivateOnFGSwitch() { return UMAGetProcessMode() & modeDoesActivateOnFGSwitch ; } @@ -191,7 +191,7 @@ void UMASetMenuTitle( MenuRef menu , StringPtr title ) const long headersize = 14 ; int oldlen = (**menu).menuData[0] + 1; int newlen = title[0] + 1 ; - + if ( oldlen < newlen ) { // enlarge before adjusting @@ -218,23 +218,23 @@ UInt32 UMAMenuEvent( EventRecord *inEvent ) return MenuEvent( inEvent ) ; } -void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex inItem ) +void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex inItem ) { EnableMenuItem( inMenu , inItem ) ; } -void UMADisableMenuItem( MenuRef inMenu , MenuItemIndex inItem ) +void UMADisableMenuItem( MenuRef inMenu , MenuItemIndex inItem ) { DisableMenuItem( inMenu , inItem ) ; } -void UMAAppendSubMenuItem( MenuRef menu , StringPtr l , SInt16 id ) +void UMAAppendSubMenuItem( MenuRef menu , StringPtr l , SInt16 id ) { MacAppendMenu(menu, l); SetMenuItemHierarchicalID( menu , CountMenuItems( menu ) , id ) ; } -void UMAInsertSubMenuItem( MenuRef menu , StringPtr l , MenuItemIndex item , SInt16 id ) +void UMAInsertSubMenuItem( MenuRef menu , StringPtr l , MenuItemIndex item , SInt16 id ) { MacInsertMenuItem(menu, l , item); SetMenuItemHierarchicalID( menu , item , id ) ; @@ -370,7 +370,7 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , SInt16 key , UI break ; } } - + SetItemCmd( menu, item , macKey ); SetMenuItemModifiers(menu, item , modifiers ) ; @@ -379,18 +379,18 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , SInt16 key , UI } } -void UMAAppendMenuItem( MenuRef menu , StringPtr l , SInt16 key, UInt8 modifiers ) +void UMAAppendMenuItem( MenuRef menu , StringPtr l , SInt16 key, UInt8 modifiers ) { MacAppendMenu(menu, "\pA"); SetMenuItemText(menu, (SInt16) ::CountMenuItems(menu), l); UMASetMenuItemShortcut( menu , (SInt16) ::CountMenuItems(menu), key , modifiers ) ; } -void UMAInsertMenuItem( MenuRef menu , StringPtr l , MenuItemIndex item , SInt16 key, UInt8 modifiers ) +void UMAInsertMenuItem( MenuRef menu , StringPtr l , MenuItemIndex item , SInt16 key, UInt8 modifiers ) { - MacInsertMenuItem( menu , "\p" , item) ; - SetMenuItemText(menu, item , l); - UMASetMenuItemShortcut( menu , item , key , modifiers ) ; + MacInsertMenuItem( menu , "\pA" , item) ; + SetMenuItemText(menu, item+1 , l); + UMASetMenuItemShortcut( menu , item+1 , key , modifiers ) ; } // quickdraw @@ -465,7 +465,7 @@ pascal QDGlobalsPtr GetQDGlobalsPtr (void) #endif -void UMAShowWatchCursor() +void UMAShowWatchCursor() { OSErr err = noErr; @@ -481,14 +481,14 @@ void UMAShowWatchCursor() // SetQDGlobalsArrow (*watchFob); // InitCursor ( ); // SetQDGlobalsArrow (&preservedArrow); - SetCursor (*watchFob); + SetCursor (*watchFob); #else - SetCursor (*watchFob); + SetCursor (*watchFob); #endif } } -void UMAShowArrowCursor() +void UMAShowArrowCursor() { #if TARGET_CARBON Cursor arrow; @@ -500,23 +500,23 @@ void UMAShowArrowCursor() // window manager -GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) +GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) { wxASSERT( inWindowRef != NULL ) ; -#if TARGET_CARBON - return (GrafPtr) GetWindowPort( inWindowRef ) ; +#if TARGET_CARBON + return (GrafPtr) GetWindowPort( inWindowRef ) ; #else return (GrafPtr) inWindowRef ; #endif } -void UMADisposeWindow( WindowRef inWindowRef ) +void UMADisposeWindow( WindowRef inWindowRef ) { wxASSERT( inWindowRef != NULL ) ; DisposeWindow( inWindowRef ) ; } -void UMASetWTitleC( WindowRef inWindowRef , const char *title ) +void UMASetWTitleC( WindowRef inWindowRef , const char *title ) { Str255 ptitle ; strncpy( (char*)ptitle , title , 96 ) ; @@ -529,7 +529,7 @@ void UMASetWTitleC( WindowRef inWindowRef , const char *title ) SetWTitle( inWindowRef , ptitle ) ; } -void UMAGetWTitleC( WindowRef inWindowRef , char *title ) +void UMAGetWTitleC( WindowRef inWindowRef , char *title ) { GetWTitle( inWindowRef , (unsigned char*)title ) ; #if TARGET_CARBON @@ -541,7 +541,7 @@ void UMAGetWTitleC( WindowRef inWindowRef , char *title ) // appearance additions -void UMAActivateControl( ControlHandle inControl ) +void UMAActivateControl( ControlHandle inControl ) { // we have to add the control after again to the update rgn // otherwise updates get lost @@ -559,7 +559,7 @@ void UMAActivateControl( ControlHandle inControl ) } } -void UMADrawControl( ControlHandle inControl ) +void UMADrawControl( ControlHandle inControl ) { WindowRef theWindow = GetControlOwner(inControl) ; RgnHandle updateRgn = NewRgn() ; @@ -572,7 +572,7 @@ void UMADrawControl( ControlHandle inControl ) DisposeRgn( updateRgn ) ; } -void UMAMoveControl( ControlHandle inControl , short x , short y ) +void UMAMoveControl( ControlHandle inControl , short x , short y ) { bool visible = IsControlVisible( inControl ) ; if ( visible ) { @@ -588,14 +588,14 @@ void UMAMoveControl( ControlHandle inControl , short x , short y ) } } -void UMASizeControl( ControlHandle inControl , short x , short y ) +void UMASizeControl( ControlHandle inControl , short x , short y ) { bool visible = IsControlVisible( inControl ) ; if ( visible ) { SetControlVisibility( inControl , false , false ) ; Rect ctrlBounds ; InvalWindowRect(GetControlOwner(inControl),GetControlBounds(inControl,&ctrlBounds) ) ; - } + } ::SizeControl( inControl , x , y ) ; if ( visible ) { SetControlVisibility( inControl , true , false ) ; @@ -604,7 +604,7 @@ void UMASizeControl( ControlHandle inControl , short x , short y ) } } -void UMADeactivateControl( ControlHandle inControl ) +void UMADeactivateControl( ControlHandle inControl ) { // we have to add the control after again to the update rgn // otherwise updates get lost @@ -653,7 +653,7 @@ OSErr UMASetKeyboardFocus (WindowPtr inWindow, // events -void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) +void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) { RgnHandle updateRgn = NewRgn() ; GetWindowUpdateRgn( inWindow , updateRgn ) ; @@ -668,18 +668,18 @@ void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) } -bool UMAIsWindowFloating( WindowRef inWindow ) +bool UMAIsWindowFloating( WindowRef inWindow ) { WindowClass cl ; - + GetWindowClass( inWindow , &cl ) ; return cl == kFloatingWindowClass ; } -bool UMAIsWindowModal( WindowRef inWindow ) +bool UMAIsWindowModal( WindowRef inWindow ) { WindowClass cl ; - + GetWindowClass( inWindow , &cl ) ; return cl < kFloatingWindowClass ; } @@ -704,11 +704,11 @@ void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) UMAActivateControl( control ) ; else UMADeactivateControl( control ) ; - } + } SetPort( port ) ; } } -OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) +OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) { return ::DrawThemePlacard( inRect , inState ) ; } @@ -740,7 +740,7 @@ OSStatus UMAGetHelpMenu( #endif } -wxMacPortStateHelper::wxMacPortStateHelper( GrafPtr newport) +wxMacPortStateHelper::wxMacPortStateHelper( GrafPtr newport) { m_clip = NULL ; Setup( newport ) ; @@ -761,7 +761,7 @@ void wxMacPortStateHelper::Setup( GrafPtr newport ) m_textFont = GetPortTextFont( (CGrafPtr) newport); m_textSize = GetPortTextSize( (CGrafPtr) newport); m_textStyle = GetPortTextFace( (CGrafPtr) newport); - m_textMode = GetPortTextMode( (CGrafPtr) newport); + m_textMode = GetPortTextMode( (CGrafPtr) newport); GetThemeDrawingState( &m_drawingState ) ; m_currentPort = newport ; } @@ -798,7 +798,7 @@ OSStatus UMAPutScrap( Size size , OSType type , void *data ) err = PutScrap( size , type , data ) ; #else ScrapRef scrap; - err = GetCurrentScrap (&scrap); + err = GetCurrentScrap (&scrap); if ( !err ) { err = PutScrapFlavor (scrap, type , 0, size, data);