Browse Source

Fix Fl_Menu_Button focus problems.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2612 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
pull/168/head
Michael R Sweet 23 years ago
parent
commit
b700c8c088
  1. 2
      CHANGES
  2. 5
      src/Fl_Menu_Button.cxx
  3. 5
      test/menubar.cxx

2
CHANGES

@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.0 CHANGES IN FLTK 1.1.0
- Fl_Menu_Button no longer responds to focus or keyboard
events when box() is FL_NO_BOX.
- FLTK convenience dialogs put the buttons in the wrong - FLTK convenience dialogs put the buttons in the wrong
order. order.
- Fl_BMP_Image didn't load 4-bit BMP files properly. - Fl_BMP_Image didn't load 4-bit BMP files properly.

5
src/Fl_Menu_Button.cxx

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.4 2002/01/01 15:11:30 easysw Exp $" // "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.5 2002/09/01 22:39:33 easysw Exp $"
// //
// Menu button widget for the Fast Light Tool Kit (FLTK). // Menu button widget for the Fast Light Tool Kit (FLTK).
// //
@ -69,6 +69,7 @@ int Fl_Menu_Button::handle(int e) {
popup(); popup();
return 1; return 1;
case FL_KEYBOARD: case FL_KEYBOARD:
if (!box()) return 0;
if (Fl::event_key() == ' ') { if (Fl::event_key() == ' ') {
popup(); popup();
return 1; return 1;
@ -93,5 +94,5 @@ Fl_Menu_Button::Fl_Menu_Button(int X,int Y,int W,int H,const char *l)
} }
// //
// End of "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.4 2002/01/01 15:11:30 easysw Exp $". // End of "$Id: Fl_Menu_Button.cxx,v 1.4.2.3.2.5 2002/09/01 22:39:33 easysw Exp $".
// //

5
test/menubar.cxx

@ -1,5 +1,5 @@
// //
// "$Id: menubar.cxx,v 1.6.2.8.2.3 2002/01/01 15:11:33 easysw Exp $" // "$Id: menubar.cxx,v 1.6.2.8.2.4 2002/09/01 22:39:33 easysw Exp $"
// //
// Menubar test program for the Fast Light Tool Kit (FLTK). // Menubar test program for the Fast Light Tool Kit (FLTK).
// //
@ -189,6 +189,7 @@ int main(int argc, char **argv) {
menus[2] = &ch; menus[2] = &ch;
Fl_Menu_Button mb(0,0,WIDTH,400,"&popup"); Fl_Menu_Button mb(0,0,WIDTH,400,"&popup");
mb.type(Fl_Menu_Button::POPUP3); mb.type(Fl_Menu_Button::POPUP3);
mb.box(FL_NO_BOX);
mb.menu(menutable); mb.menu(menutable);
mb.remove(1); // delete the "File" submenu mb.remove(1); // delete the "File" submenu
mb.callback(test_cb); mb.callback(test_cb);
@ -202,5 +203,5 @@ int main(int argc, char **argv) {
} }
// //
// End of "$Id: menubar.cxx,v 1.6.2.8.2.3 2002/01/01 15:11:33 easysw Exp $". // End of "$Id: menubar.cxx,v 1.6.2.8.2.4 2002/09/01 22:39:33 easysw Exp $".
// //

Loading…
Cancel
Save