X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/40cc34ec564f7c036724573caba0b4e5643018d8..f8a139493553049e0b92db4bbee11deb33093ee3:/src/mac/carbon/uma.cpp diff --git a/src/mac/carbon/uma.cpp b/src/mac/carbon/uma.cpp index 2f6077ee1a..e975a2adf7 100644 --- a/src/mac/carbon/uma.cpp +++ b/src/mac/carbon/uma.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: uma.cpp +// Name: src/mac/carbon/uma.cpp // Purpose: UMA support // Author: Stefan Csomor // Modified by: @@ -13,6 +13,7 @@ #if wxUSE_GUI +#include "wx/toplevel.h" #include "wx/dc.h" #ifndef __DARWIN__ @@ -29,13 +30,10 @@ #endif #ifndef __DARWIN__ -#include +# include #endif -#include "wx/mac/uma.h" -#if TARGET_API_MAC_OSX -#include "wx/toplevel.h" -#endif +#include "wx/mac/uma.h" // since we have decided that we only support 8.6 upwards we are // checking for these minimum requirements in the startup code of @@ -358,12 +356,12 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEn glyph = kMenuClearGlyph ; break ; - case WXK_PRIOR : // PAGE UP + case WXK_PAGEUP : macKey = kPageUpCharCode ; glyph = kMenuPageUpGlyph ; break ; - case WXK_NEXT : + case WXK_PAGEDOWN : macKey = kPageDownCharCode ; glyph = kMenuPageDownGlyph ; break ; @@ -388,6 +386,15 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEn glyph = kMenuDownArrowGlyph ; break ; + case WXK_HOME : + macKey = kHomeCharCode ; + glyph = kMenuNorthwestArrowGlyph ; + break ; + + case WXK_END : + macKey = kEndCharCode ; + glyph = kMenuSoutheastArrowGlyph ; + break ; default : macKey = toupper( key ) ; break ; @@ -415,7 +422,7 @@ void UMAAppendMenuItem( MenuRef menu , const wxString& title, wxFontEncoding enc { MacAppendMenu(menu, "\pA"); - // don't attempt to interpret metacharacters like a '-' at the beginning (would become a separator otherwise) + // don't attempt to interpret metacharacters like a '-' at the beginning (would become a separator otherwise) ChangeMenuItemAttributes( menu , ::CountMenuItems(menu), kMenuItemAttrIgnoreMeta , 0 ) ; UMASetMenuItemText(menu, (SInt16) ::CountMenuItems(menu), title , encoding ); UMASetMenuItemShortcut( menu , (SInt16) ::CountMenuItems(menu), entry ) ; @@ -425,7 +432,7 @@ void UMAInsertMenuItem( MenuRef menu , const wxString& title, wxFontEncoding enc { MacInsertMenuItem( menu , "\pA" , item) ; - // don't attempt to interpret metacharacters like a '-' at the beginning (would become a separator otherwise) + // don't attempt to interpret metacharacters like a '-' at the beginning (would become a separator otherwise) ChangeMenuItemAttributes( menu , item+1, kMenuItemAttrIgnoreMeta , 0 ) ; UMASetMenuItemText(menu, item+1 , title , encoding ); UMASetMenuItemShortcut( menu , item+1 , entry ) ; @@ -584,7 +591,7 @@ void UMAActivateControl( ControlRef inControl ) InvalWindowRect( GetControlOwner(inControl), UMAGetControlBoundsInWindowCoords(inControl, &ctrlBounds) ) ; } } -#endif +#endif } void UMAMoveControl( ControlRef inControl , short x , short y ) @@ -847,7 +854,7 @@ Rect * UMAGetControlBoundsInWindowCoords( ControlRef theControl, Rect *bounds ) WindowRef tlwref = GetControlOwner( theControl ) ; wxTopLevelWindowMac* tlwwx = wxFindWinFromMacWindow( tlwref ) ; - if ( tlwwx != NULL && tlwwx->MacUsesCompositing() ) + if ( tlwwx != NULL ) { ControlRef rootControl = tlwwx->GetPeer()->GetControlRef() ; HIPoint hiPoint = CGPointMake( 0 , 0 ) ; @@ -876,4 +883,3 @@ void UMASetSystemIsInitialized(bool val) } #endif // wxUSE_BASE -