summaryrefslogtreecommitdiff
path: root/test/menubar.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-11-26 16:34:58 +0000
committerManolo Gouy <Manolo>2015-11-26 16:34:58 +0000
commitff65dbb5ae6f0c05703ba9561b2d7acb8f167900 (patch)
treea6f9e34049acf7df77a58b08058095325c9f61bd /test/menubar.cxx
parent311bd8971edb2b4419c3de81bdc25e0b4618de3a (diff)
Mac OS only: added the Fl_Mac_App_Menu::custom_application_menu_items() method
that allows customization of the application menu on the Mac platform. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10932 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test/menubar.cxx')
-rw-r--r--test/menubar.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/menubar.cxx b/test/menubar.cxx
index 616ab3467..30c9fca6e 100644
--- a/test/menubar.cxx
+++ b/test/menubar.cxx
@@ -237,6 +237,16 @@ int main(int argc, char **argv) {
ch2.callback(menu_location_cb, &menubar);
#endif
window.end();
+
+#ifdef __APPLE__
+ Fl_Menu_Item custom[] = {
+ {"Preferences", 0, test_cb, NULL, FL_MENU_DIVIDER},
+ {"Radio1", 0, test_cb, NULL, FL_MENU_RADIO|FL_MENU_VALUE},
+ {"Radio2", 0, test_cb, NULL, FL_MENU_RADIO},
+ {0}
+ };
+ Fl_Mac_App_Menu::custom_application_menu_items(custom);
+#endif
window.show(argc, argv);
return Fl::run();
}