uma.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/osx/carbon/uma.h
  3. // Purpose: Universal MacOS API
  4. // Author: Stefan Csomor
  5. // Modified by:
  6. // Created: 03/02/99
  7. // Copyright: (c) Stefan Csomor
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef H_UMA
  11. #define H_UMA
  12. #include "wx/osx/private.h"
  13. #if wxUSE_GUI
  14. // menu manager
  15. MenuRef UMANewMenu( SInt16 id , const wxString& title , wxFontEncoding encoding) ;
  16. void UMASetMenuTitle( MenuRef menu , const wxString& title , wxFontEncoding encoding) ;
  17. void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item , bool enable ) ;
  18. void UMAAppendMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , wxAcceleratorEntry *entry = NULL ) ;
  19. void UMAInsertMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , MenuItemIndex item , wxAcceleratorEntry *entry = NULL ) ;
  20. void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEntry *entry ) ;
  21. void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title , wxFontEncoding encoding ) ;
  22. // Retrieves the Help menu handle. Warning: As a side-effect this functions also
  23. // creates the Help menu if it didn't exist yet.
  24. OSStatus UMAGetHelpMenu(
  25. MenuRef * outHelpMenu,
  26. MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
  27. // Same as UMAGetHelpMenu, but doesn't create the Help menu if UMAGetHelpMenu hasn't been called yet.
  28. OSStatus UMAGetHelpMenuDontCreate(
  29. MenuRef * outHelpMenu,
  30. MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
  31. #endif // wxUSE_GUI
  32. #endif