/////////////////////////////////////////////////////////////////////////////
-// Name: uma.cpp
+// Name: src/mac/carbon/uma.cpp
// Purpose: UMA support
// Author: Stefan Csomor
// Modified by:
#if wxUSE_GUI
+#include "wx/toplevel.h"
#include "wx/dc.h"
#ifndef __DARWIN__
#endif
#ifndef __DARWIN__
-#include <Scrap.h>
+# include <Scrap.h>
#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
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 ;
glyph = kMenuDownArrowGlyph ;
break ;
+ case WXK_HOME :
+ macKey = kHomeCharCode ;
+ glyph = kMenuNorthwestArrowGlyph ;
+ break ;
+
+ case WXK_END :
+ macKey = kEndCharCode ;
+ glyph = kMenuSoutheastArrowGlyph ;
+ break ;
default :
macKey = toupper( key ) ;
break ;
// 1d and 1e have special meaning to SetItemCmd, so
// do not use for these character codes.
- if (key != WXK_UP && key != WXK_RIGHT)
+ if (key != WXK_UP && key != WXK_RIGHT && key != WXK_DOWN && key != WXK_LEFT)
SetItemCmd( menu, item , macKey );
SetMenuItemModifiers( menu, item , modifiers ) ;
{
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 ) ;
{
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 ) ;
InvalWindowRect( GetControlOwner(inControl), UMAGetControlBoundsInWindowCoords(inControl, &ctrlBounds) ) ;
}
}
-#endif
+#endif
}
void UMAMoveControl( ControlRef inControl , short x , short y )
}
#endif // wxUSE_BASE
-