2015-12-30 06:41:46 +00:00
|
|
|
#if defined(Hiro_Menu)
|
|
|
|
|
2013-03-15 13:11:33 +00:00
|
|
|
@interface CocoaMenu : NSMenuItem {
|
|
|
|
@public
|
2015-12-30 06:41:46 +00:00
|
|
|
hiro::mMenu* menu;
|
2013-05-02 11:25:45 +00:00
|
|
|
NSMenu* cocoaMenu;
|
2013-03-15 13:11:33 +00:00
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
-(id) initWith:(hiro::mMenu&)menu;
|
2013-03-15 13:11:33 +00:00
|
|
|
-(NSMenu*) cocoaMenu;
|
|
|
|
@end
|
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
namespace hiro {
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
struct pMenu : pAction {
|
|
|
|
Declare(Menu, Action)
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
auto append(sAction action) -> void;
|
|
|
|
auto remove(sAction action) -> void;
|
2016-01-07 08:14:33 +00:00
|
|
|
auto setIcon(const image& icon) -> void;
|
2015-12-30 06:41:46 +00:00
|
|
|
auto setText(const string& text) -> void;
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
CocoaMenu* cocoaMenu = nullptr;
|
2013-03-15 13:11:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
|
|
|
|
#endif
|