Shortcuts for submenu titles in a menubar pop up the submenu (rather than calling the callback)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1250 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Bill Spitzak 2000-07-11 05:36:39 +00:00
parent 42cf3ff815
commit ba1d83cf47
2 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Menu_Bar.cxx,v 1.7.2.2 2000/06/05 21:20:54 mike Exp $"
// "$Id: Fl_Menu_Bar.cxx,v 1.7.2.3 2000/07/11 05:36:39 spitzak Exp $"
//
// Menu bar widget for the Fast Light Tool Kit (FLTK).
//
@ -50,14 +50,14 @@ int Fl_Menu_Bar::handle(int event) {
picked(v);
return 1;
case FL_SHORTCUT:
if (visible_r()) {if ((v = menu()->find_shortcut())) goto J1;}
v = menu()->test_shortcut();
if (v) {picked(v); return 1;}
if (visible_r() && (v = menu()->find_shortcut())) goto J1;
return 0;
}
return 0;
}
//
// End of "$Id: Fl_Menu_Bar.cxx,v 1.7.2.2 2000/06/05 21:20:54 mike Exp $".
// End of "$Id: Fl_Menu_Bar.cxx,v 1.7.2.3 2000/07/11 05:36:39 spitzak Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: menubar.cxx,v 1.6.2.5 2000/06/05 21:21:22 mike Exp $"
// "$Id: menubar.cxx,v 1.6.2.6 2000/07/11 05:36:39 spitzak Exp $"
//
// Menubar test program for the Fast Light Tool Kit (FLTK).
//
@ -85,7 +85,7 @@ Fl_Menu_Item menutable[] = {
{"after submenu"},
{0},
{0},
{"&Edit",0,0,0,FL_SUBMENU},
{"&Edit",FL_F+2,0,0,FL_SUBMENU},
{"Undo", FL_ALT+'z', 0},
{"Redo", FL_ALT+'r', 0, 0, FL_MENU_DIVIDER},
{"Cut", FL_ALT+'x', 0},
@ -97,7 +97,7 @@ Fl_Menu_Item menutable[] = {
{"Preferences",0, 0},
{"Size", 0, 0},
{0},
{"&Checkbox",0,0,0,FL_SUBMENU},
{"&Checkbox",FL_F+3,0,0,FL_SUBMENU},
{"&Alpha", FL_F+2, 0, (void *)1, FL_MENU_TOGGLE},
{"&Beta", 0, 0, (void *)2, FL_MENU_TOGGLE},
{"&Gamma", 0, 0, (void *)3, FL_MENU_TOGGLE},
@ -216,5 +216,5 @@ int main(int argc, char **argv) {
}
//
// End of "$Id: menubar.cxx,v 1.6.2.5 2000/06/05 21:21:22 mike Exp $".
// End of "$Id: menubar.cxx,v 1.6.2.6 2000/07/11 05:36:39 spitzak Exp $".
//