summaryrefslogtreecommitdiff
path: root/src/Fl_Menu_global.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Menu_global.cxx')
-rw-r--r--src/Fl_Menu_global.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Fl_Menu_global.cxx b/src/Fl_Menu_global.cxx
index b7cba6faf..ebfb7965e 100644
--- a/src/Fl_Menu_global.cxx
+++ b/src/Fl_Menu_global.cxx
@@ -40,6 +40,16 @@ static int handler(int e) {
return the_widget->handle(e);
}
+/**
+ Make the shortcuts for this menu work no matter what window has the
+ focus when you type it. This is done by using
+ Fl::add_handler(). This Fl_Menu_ widget does not
+ have to be visible (ie the window it is in can be hidden, or it does
+ not have to be put in a window at all).
+ <P>Currently there can be only one global()menu. Setting a new
+ one will replace the old one. There is no way to remove the
+ global() setting (so don't destroy the widget!)
+*/
void Fl_Menu_::global() {
if (!the_widget) Fl::add_handler(handler);
the_widget = this;