Add check for window callback getting called...

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1770 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2001-11-28 13:46:34 +00:00
parent 1a7bbc55c5
commit 691e338071

View File

@ -1,5 +1,5 @@
//
// "$Id: menubar.cxx,v 1.6.2.8.2.1 2001/11/02 20:38:15 easysw Exp $"
// "$Id: menubar.cxx,v 1.6.2.8.2.2 2001/11/28 13:46:34 easysw Exp $"
//
// Menubar test program for the Fast Light Tool Kit (FLTK).
//
@ -35,6 +35,11 @@
#include <string.h>
#include <FL/fl_draw.H>
void window_cb(Fl_Widget* w, void*) {
puts("window callback called");
((Fl_Window *)w)->hide();
}
void test_cb(Fl_Widget* w, void*) {
Fl_Menu_* mw = (Fl_Menu_*)w;
const Fl_Menu_Item* m = mw->mvalue();
@ -172,6 +177,7 @@ int main(int argc, char **argv) {
hugemenu[i].text = strdup(buf);
}
Fl_Window window(WIDTH,400);
window.callback(window_cb);
Fl_Menu_Bar menubar(0,0,WIDTH,30); menubar.menu(menutable);
menubar.callback(test_cb);
menus[0] = &menubar;
@ -196,5 +202,5 @@ int main(int argc, char **argv) {
}
//
// End of "$Id: menubar.cxx,v 1.6.2.8.2.1 2001/11/02 20:38:15 easysw Exp $".
// End of "$Id: menubar.cxx,v 1.6.2.8.2.2 2001/11/28 13:46:34 easysw Exp $".
//