// generated by Fast Light User Interface Designer (fluid) version 1.0300 #include "tabs.h" Fl_Double_Window *foo_window=(Fl_Double_Window *)0; static void cb_button1(Fl_Button*, void*) { fl_message("Test to see if this modal window prevents you from " "changing the tabs. It should."); } static void cb_Test(Fl_Button*, void*) { fl_message("Make sure you cannot change the tabs while this modal window is up"); } Fl_Wizard *wWizard=(Fl_Wizard *)0; static void cb_button11(Fl_Button*, void*) { fl_message("Test to see if this modal window prevents you from " "changing the tabs. It should."); } static void cb_Test1(Fl_Button*, void*) { fl_message("Make sure you cannot change the tabs while this modal window is up"); } static void cb_(Fl_Button*, void*) { wWizard->value(wWizard->child(0)); } static void cb_1(Fl_Button*, void*) { wWizard->prev(); } static void cb_2(Fl_Button*, void*) { wWizard->next(); } static void cb_3(Fl_Button*, void*) { int last = wWizard->children()-1; wWizard->value(wWizard->child(last)); } static void cb_cancel(Fl_Button*, void*) { exit(1); } static void cb_OK(Fl_Return_Button*, void*) { exit(0); } int main(int argc, char **argv) { { foo_window = new Fl_Double_Window(642, 337, "Comparison of Fl_Tab (left) vs. Fl_Wizard (right)"); { Fl_Box* o = new Fl_Box(95, 0, 130, 35, "class Fl_Tabs"); o->labeltype(FL_ENGRAVED_LABEL); o->labelfont(1); } // Fl_Box* o { Fl_Tabs* o = new Fl_Tabs(10, 35, 300, 205); o->tooltip("the various index cards test different aspects of the Fl_Tabs widget"); o->selection_color((Fl_Color)4); o->labelcolor(FL_BACKGROUND2_COLOR); { Fl_Group* o = new Fl_Group(10, 60, 300, 180, "Label&1"); o->tooltip("this Tab tests correct keyboard navigation between text input fields"); o->selection_color((Fl_Color)1); { Fl_Input* o = new Fl_Input(60, 80, 240, 40, "input:"); o->tooltip("This is the first input field"); } // Fl_Input* o { Fl_Input* o = new Fl_Input(60, 120, 240, 30, "input2:"); o->tooltip(""); } // Fl_Input* o { new Fl_Input(60, 150, 240, 80, "input3:"); } // Fl_Input* o o->end(); Fl_Group::current()->resizable(o); } // Fl_Group* o { Fl_Group* o = new Fl_Group(10, 60, 300, 180, "tab&2"); o->tooltip("tab2 tests among other things the cooperation of modal windows and tabs"); o->selection_color((Fl_Color)2); o->hide(); { Fl_Button* o = new Fl_Button(20, 90, 100, 30, "button1"); o->callback((Fl_Callback*)cb_button1); } // Fl_Button* o { new Fl_Input(140, 130, 100, 30, "input in box2"); } // Fl_Input* o { new Fl_Button(30, 170, 260, 30, "This is stuff inside the Fl_Group \"tab2\""); } // Fl_Button* o { Fl_Button* o = new Fl_Button(30, 200, 260, 30, "Test event blocking by modal window"); o->callback((Fl_Callback*)cb_Test); } // Fl_Button* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(10, 60, 300, 180, "tab&3"); o->tooltip("tab3 checks for correct keyboard navigation"); o->selection_color((Fl_Color)3); o->hide(); { new Fl_Button(20, 90, 60, 80, "button2"); } // Fl_Button* o { new Fl_Button(80, 90, 60, 80, "button"); } // Fl_Button* o { new Fl_Button(140, 90, 60, 80, "button"); } // Fl_Button* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(10, 60, 300, 180, "&tab4"); o->tooltip("this tab show the issue of indicating a selcted tab if the tab layouts are ve\ ry similar"); o->selection_color((Fl_Color)5); o->labeltype(FL_ENGRAVED_LABEL); o->labelfont(2); o->hide(); { new Fl_Button(20, 80, 60, 110, "button2"); } // Fl_Button* o { new Fl_Button(80, 80, 60, 110, "button"); } // Fl_Button* o { new Fl_Button(140, 80, 60, 110, "button"); } // Fl_Button* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(10, 60, 300, 180, "@fileprint &print"); o->tooltip("tab5 verifies if visibility requests are handled correctly"); o->hide(); { Fl_Button* o = new Fl_Button(20, 75, 60, 80, "button2"); o->tooltip("button2 has a different tooltp than tab5"); } // Fl_Button* o { new Fl_Button(90, 75, 60, 80, "button"); } // Fl_Button* o { Fl_Window* o = new Fl_Window(20, 175, 40, 55); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)173); o->selection_color(FL_BACKGROUND_COLOR); o->labeltype(FL_NORMAL_LABEL); o->labelfont(0); o->labelsize(14); o->labelcolor(FL_FOREGROUND_COLOR); o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); o->when(FL_WHEN_RELEASE); o->end(); } // Fl_Window* o { Fl_Window* o = new Fl_Window(65, 175, 40, 55, "subwindows:"); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)167); o->selection_color(FL_BACKGROUND_COLOR); o->labeltype(FL_NORMAL_LABEL); o->labelfont(0); o->labelsize(14); o->labelcolor(FL_FOREGROUND_COLOR); o->align(Fl_Align(FL_ALIGN_TOP)); o->when(FL_WHEN_RELEASE); o->end(); } // Fl_Window* o { Fl_Window* o = new Fl_Window(110, 175, 40, 55); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)239); o->selection_color(FL_BACKGROUND_COLOR); o->labeltype(FL_NORMAL_LABEL); o->labelfont(0); o->labelsize(14); o->labelcolor(FL_FOREGROUND_COLOR); o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); o->when(FL_WHEN_RELEASE); o->end(); } // Fl_Window* o o->end(); } // Fl_Group* o o->end(); Fl_Group::current()->resizable(o); } // Fl_Tabs* o { Fl_Box* o = new Fl_Box(410, 0, 130, 35, "class Fl_Wizard"); o->labeltype(FL_ENGRAVED_LABEL); o->labelfont(1); } // Fl_Box* o { wWizard = new Fl_Wizard(325, 60, 300, 180); { Fl_Group* o = new Fl_Group(325, 60, 300, 180, "Label1"); o->tooltip("this Tab tests correct keyboard navigation between text input fields"); o->selection_color((Fl_Color)1); { Fl_Input* o = new Fl_Input(375, 80, 240, 40, "input:"); o->tooltip("This is the first input field"); } // Fl_Input* o { Fl_Input* o = new Fl_Input(375, 120, 240, 30, "input2:"); o->tooltip(""); } // Fl_Input* o { new Fl_Input(375, 150, 240, 80, "input3:"); } // Fl_Input* o o->end(); Fl_Group::current()->resizable(o); } // Fl_Group* o { Fl_Group* o = new Fl_Group(325, 60, 300, 180, "tab2"); o->tooltip("tab2 tests among other things the cooperation of modal windows and tabs"); o->selection_color((Fl_Color)2); o->hide(); { Fl_Button* o = new Fl_Button(335, 90, 100, 30, "button1"); o->callback((Fl_Callback*)cb_button11); } // Fl_Button* o { new Fl_Input(455, 130, 100, 30, "input in box2"); } // Fl_Input* o { new Fl_Button(345, 170, 260, 30, "This is stuff inside the Fl_Group \"tab2\""); } // Fl_Button* o { Fl_Button* o = new Fl_Button(345, 200, 260, 30, "Test event blocking by modal window"); o->callback((Fl_Callback*)cb_Test1); } // Fl_Button* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(325, 60, 300, 180, "tab3"); o->tooltip("tab3 checks for correct keyboard navigation"); o->selection_color((Fl_Color)3); o->hide(); { new Fl_Button(335, 90, 60, 80, "button2"); } // Fl_Button* o { new Fl_Button(395, 90, 60, 80, "button"); } // Fl_Button* o { new Fl_Button(455, 90, 60, 80, "button"); } // Fl_Button* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(325, 60, 300, 180, "tab4"); o->tooltip("this tab show the issue of indicating a selcted tab if the tab layouts are ve\ ry similar"); o->selection_color((Fl_Color)5); o->labelfont(2); o->hide(); { new Fl_Button(335, 80, 60, 110, "button2"); } // Fl_Button* o { new Fl_Button(395, 80, 60, 110, "button"); } // Fl_Button* o { new Fl_Button(455, 80, 60, 110, "button"); } // Fl_Button* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(325, 60, 300, 180, " tab5 "); o->tooltip("tab5 verifies if visibility requests are handled correctly"); o->labeltype(FL_ENGRAVED_LABEL); o->hide(); { Fl_Button* o = new Fl_Button(335, 75, 60, 80, "button2"); o->tooltip("button2 has a different tooltp than tab5"); } // Fl_Button* o { new Fl_Button(405, 75, 60, 80, "button"); } // Fl_Button* o { Fl_Window* o = new Fl_Window(335, 175, 40, 55); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)173); o->selection_color(FL_BACKGROUND_COLOR); o->labeltype(FL_NORMAL_LABEL); o->labelfont(0); o->labelsize(14); o->labelcolor(FL_FOREGROUND_COLOR); o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); o->when(FL_WHEN_RELEASE); o->end(); } // Fl_Window* o { Fl_Window* o = new Fl_Window(380, 175, 40, 55, "subwindows:"); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)167); o->selection_color(FL_BACKGROUND_COLOR); o->labeltype(FL_NORMAL_LABEL); o->labelfont(0); o->labelsize(14); o->labelcolor(FL_FOREGROUND_COLOR); o->align(Fl_Align(FL_ALIGN_TOP)); o->when(FL_WHEN_RELEASE); o->end(); } // Fl_Window* o { Fl_Window* o = new Fl_Window(425, 175, 40, 55); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)239); o->selection_color(FL_BACKGROUND_COLOR); o->labeltype(FL_NORMAL_LABEL); o->labelfont(0); o->labelsize(14); o->labelcolor(FL_FOREGROUND_COLOR); o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); o->when(FL_WHEN_RELEASE); o->end(); } // Fl_Window* o o->end(); } // Fl_Group* o wWizard->end(); } // Fl_Wizard* wWizard { Fl_Group* o = new Fl_Group(410, 245, 130, 25); { Fl_Button* o = new Fl_Button(410, 245, 30, 25, "@|<"); o->tooltip("go to first page [Home]"); o->shortcut(0xff50); o->callback((Fl_Callback*)cb_); } // Fl_Button* o { Fl_Button* o = new Fl_Button(440, 245, 30, 25, "@<"); o->tooltip("go to previous page [left arrow]"); o->shortcut(0xff51); o->callback((Fl_Callback*)cb_1); } // Fl_Button* o { Fl_Button* o = new Fl_Button(480, 245, 30, 25, "@>"); o->tooltip("go to next page in wizard [right arrow]"); o->shortcut(0xff53); o->callback((Fl_Callback*)cb_2); } // Fl_Button* o { Fl_Button* o = new Fl_Button(510, 245, 30, 25, "@>|"); o->tooltip("go to last page [End]"); o->shortcut(0xff57); o->callback((Fl_Callback*)cb_3); } // Fl_Button* o o->end(); } // Fl_Group* o { new Fl_Input(60, 255, 130, 25, "inputA:"); } // Fl_Input* o { new Fl_Input(60, 285, 250, 25, "inputB:"); } // Fl_Input* o { Fl_Button* o = new Fl_Button(475, 295, 70, 30, "cancel"); o->callback((Fl_Callback*)cb_cancel); } // Fl_Button* o { Fl_Return_Button* o = new Fl_Return_Button(555, 295, 70, 30, "OK"); o->callback((Fl_Callback*)cb_OK); } // Fl_Return_Button* o foo_window->end(); } // Fl_Double_Window* foo_window foo_window->show(argc, argv); return Fl::run(); }