menu.hpp 457 B

12345678910111213141516171819202122232425262728
  1. #if defined(Hiro_Menu)
  2. @interface CocoaMenu : NSMenuItem {
  3. @public
  4. hiro::mMenu* menu;
  5. NSMenu* cocoaMenu;
  6. }
  7. -(id) initWith:(hiro::mMenu&)menu;
  8. -(NSMenu*) cocoaMenu;
  9. @end
  10. namespace hiro {
  11. struct pMenu : pAction {
  12. Declare(Menu, Action)
  13. auto append(sAction action) -> void;
  14. auto remove(sAction action) -> void;
  15. auto setIcon(const image& icon) -> void;
  16. auto setText(const string& text) -> void;
  17. CocoaMenu* cocoaMenu = nullptr;
  18. };
  19. }
  20. #endif