1 // generated by Fast Light User Interface Designer (fluid) version 1.0300
2 
3 #include "tabs.h"
4 
5 Fl_Double_Window *foo_window=(Fl_Double_Window *)0;
6 
cb_button1(Fl_Button *,void *)7 static void cb_button1(Fl_Button*, void*) {
8   fl_message("Test to see if this modal window prevents you from "
9            "changing the tabs. It should.");
10 }
11 
cb_Test(Fl_Button *,void *)12 static void cb_Test(Fl_Button*, void*) {
13   fl_message("Make sure you cannot change the tabs while this modal window is up");
14 }
15 
16 Fl_Wizard *wWizard=(Fl_Wizard *)0;
17 
cb_button11(Fl_Button *,void *)18 static void cb_button11(Fl_Button*, void*) {
19   fl_message("Test to see if this modal window prevents you from "
20            "changing the tabs. It should.");
21 }
22 
cb_Test1(Fl_Button *,void *)23 static void cb_Test1(Fl_Button*, void*) {
24   fl_message("Make sure you cannot change the tabs while this modal window is up");
25 }
26 
cb_(Fl_Button *,void *)27 static void cb_(Fl_Button*, void*) {
28   wWizard->value(wWizard->child(0));
29 }
30 
cb_1(Fl_Button *,void *)31 static void cb_1(Fl_Button*, void*) {
32   wWizard->prev();
33 }
34 
cb_2(Fl_Button *,void *)35 static void cb_2(Fl_Button*, void*) {
36   wWizard->next();
37 }
38 
cb_3(Fl_Button *,void *)39 static void cb_3(Fl_Button*, void*) {
40   int last = wWizard->children()-1;
41 wWizard->value(wWizard->child(last));
42 }
43 
cb_cancel(Fl_Button *,void *)44 static void cb_cancel(Fl_Button*, void*) {
45   exit(1);
46 }
47 
cb_OK(Fl_Return_Button *,void *)48 static void cb_OK(Fl_Return_Button*, void*) {
49   exit(0);
50 }
51 
main(int argc,char ** argv)52 int main(int argc, char **argv) {
53   { foo_window = new Fl_Double_Window(642, 337, "Comparison of Fl_Tab (left) vs. Fl_Wizard (right)");
54     { Fl_Box* o = new Fl_Box(95, 0, 130, 35, "class Fl_Tabs");
55       o->labeltype(FL_ENGRAVED_LABEL);
56       o->labelfont(1);
57     } // Fl_Box* o
58     { Fl_Tabs* o = new Fl_Tabs(10, 35, 300, 205);
59       o->tooltip("the various index cards test different aspects of the Fl_Tabs widget");
60       o->selection_color((Fl_Color)4);
61       o->labelcolor(FL_BACKGROUND2_COLOR);
62       { Fl_Group* o = new Fl_Group(10, 60, 300, 180, "Label&1");
63         o->tooltip("this Tab tests correct keyboard navigation between text input fields");
64         o->selection_color((Fl_Color)1);
65         { Fl_Input* o = new Fl_Input(60, 80, 240, 40, "input:");
66           o->tooltip("This is the first input field");
67         } // Fl_Input* o
68         { Fl_Input* o = new Fl_Input(60, 120, 240, 30, "input2:");
69           o->tooltip("");
70         } // Fl_Input* o
71         { new Fl_Input(60, 150, 240, 80, "input3:");
72         } // Fl_Input* o
73         o->end();
74         Fl_Group::current()->resizable(o);
75       } // Fl_Group* o
76       { Fl_Group* o = new Fl_Group(10, 60, 300, 180, "tab&2");
77         o->tooltip("tab2 tests among other things the cooperation of modal windows and tabs");
78         o->selection_color((Fl_Color)2);
79         o->hide();
80         { Fl_Button* o = new Fl_Button(20, 90, 100, 30, "button1");
81           o->callback((Fl_Callback*)cb_button1);
82         } // Fl_Button* o
83         { new Fl_Input(140, 130, 100, 30, "input in box2");
84         } // Fl_Input* o
85         { new Fl_Button(30, 170, 260, 30, "This is stuff inside the Fl_Group \"tab2\"");
86         } // Fl_Button* o
87         { Fl_Button* o = new Fl_Button(30, 200, 260, 30, "Test event blocking by modal window");
88           o->callback((Fl_Callback*)cb_Test);
89         } // Fl_Button* o
90         o->end();
91       } // Fl_Group* o
92       { Fl_Group* o = new Fl_Group(10, 60, 300, 180, "tab&3");
93         o->tooltip("tab3 checks for correct keyboard navigation");
94         o->selection_color((Fl_Color)3);
95         o->hide();
96         { new Fl_Button(20, 90, 60, 80, "button2");
97         } // Fl_Button* o
98         { new Fl_Button(80, 90, 60, 80, "button");
99         } // Fl_Button* o
100         { new Fl_Button(140, 90, 60, 80, "button");
101         } // Fl_Button* o
102         o->end();
103       } // Fl_Group* o
104       { Fl_Group* o = new Fl_Group(10, 60, 300, 180, "&tab4");
105         o->tooltip("this tab show the issue of indicating a selcted tab if the tab layouts are ve\
106 ry similar");
107         o->selection_color((Fl_Color)5);
108         o->labeltype(FL_ENGRAVED_LABEL);
109         o->labelfont(2);
110         o->hide();
111         { new Fl_Button(20, 80, 60, 110, "button2");
112         } // Fl_Button* o
113         { new Fl_Button(80, 80, 60, 110, "button");
114         } // Fl_Button* o
115         { new Fl_Button(140, 80, 60, 110, "button");
116         } // Fl_Button* o
117         o->end();
118       } // Fl_Group* o
119       { Fl_Group* o = new Fl_Group(10, 60, 300, 180, "@fileprint  &print");
120         o->tooltip("tab5 verifies if visibility requests are handled correctly");
121         o->hide();
122         { Fl_Button* o = new Fl_Button(20, 75, 60, 80, "button2");
123           o->tooltip("button2 has a different tooltp than tab5");
124         } // Fl_Button* o
125         { new Fl_Button(90, 75, 60, 80, "button");
126         } // Fl_Button* o
127         { Fl_Window* o = new Fl_Window(20, 175, 40, 55);
128           o->box(FL_THIN_DOWN_BOX);
129           o->color((Fl_Color)173);
130           o->selection_color(FL_BACKGROUND_COLOR);
131           o->labeltype(FL_NORMAL_LABEL);
132           o->labelfont(0);
133           o->labelsize(14);
134           o->labelcolor(FL_FOREGROUND_COLOR);
135           o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
136           o->when(FL_WHEN_RELEASE);
137           o->end();
138         } // Fl_Window* o
139         { Fl_Window* o = new Fl_Window(65, 175, 40, 55, "subwindows:");
140           o->box(FL_THIN_DOWN_BOX);
141           o->color((Fl_Color)167);
142           o->selection_color(FL_BACKGROUND_COLOR);
143           o->labeltype(FL_NORMAL_LABEL);
144           o->labelfont(0);
145           o->labelsize(14);
146           o->labelcolor(FL_FOREGROUND_COLOR);
147           o->align(Fl_Align(FL_ALIGN_TOP));
148           o->when(FL_WHEN_RELEASE);
149           o->end();
150         } // Fl_Window* o
151         { Fl_Window* o = new Fl_Window(110, 175, 40, 55);
152           o->box(FL_THIN_DOWN_BOX);
153           o->color((Fl_Color)239);
154           o->selection_color(FL_BACKGROUND_COLOR);
155           o->labeltype(FL_NORMAL_LABEL);
156           o->labelfont(0);
157           o->labelsize(14);
158           o->labelcolor(FL_FOREGROUND_COLOR);
159           o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
160           o->when(FL_WHEN_RELEASE);
161           o->end();
162         } // Fl_Window* o
163         o->end();
164       } // Fl_Group* o
165       o->end();
166       Fl_Group::current()->resizable(o);
167     } // Fl_Tabs* o
168     { Fl_Box* o = new Fl_Box(410, 0, 130, 35, "class Fl_Wizard");
169       o->labeltype(FL_ENGRAVED_LABEL);
170       o->labelfont(1);
171     } // Fl_Box* o
172     { wWizard = new Fl_Wizard(325, 60, 300, 180);
173       { Fl_Group* o = new Fl_Group(325, 60, 300, 180, "Label1");
174         o->tooltip("this Tab tests correct keyboard navigation between text input fields");
175         o->selection_color((Fl_Color)1);
176         { Fl_Input* o = new Fl_Input(375, 80, 240, 40, "input:");
177           o->tooltip("This is the first input field");
178         } // Fl_Input* o
179         { Fl_Input* o = new Fl_Input(375, 120, 240, 30, "input2:");
180           o->tooltip("");
181         } // Fl_Input* o
182         { new Fl_Input(375, 150, 240, 80, "input3:");
183         } // Fl_Input* o
184         o->end();
185         Fl_Group::current()->resizable(o);
186       } // Fl_Group* o
187       { Fl_Group* o = new Fl_Group(325, 60, 300, 180, "tab2");
188         o->tooltip("tab2 tests among other things the cooperation of modal windows and tabs");
189         o->selection_color((Fl_Color)2);
190         o->hide();
191         { Fl_Button* o = new Fl_Button(335, 90, 100, 30, "button1");
192           o->callback((Fl_Callback*)cb_button11);
193         } // Fl_Button* o
194         { new Fl_Input(455, 130, 100, 30, "input in box2");
195         } // Fl_Input* o
196         { new Fl_Button(345, 170, 260, 30, "This is stuff inside the Fl_Group \"tab2\"");
197         } // Fl_Button* o
198         { Fl_Button* o = new Fl_Button(345, 200, 260, 30, "Test event blocking by modal window");
199           o->callback((Fl_Callback*)cb_Test1);
200         } // Fl_Button* o
201         o->end();
202       } // Fl_Group* o
203       { Fl_Group* o = new Fl_Group(325, 60, 300, 180, "tab3");
204         o->tooltip("tab3 checks for correct keyboard navigation");
205         o->selection_color((Fl_Color)3);
206         o->hide();
207         { new Fl_Button(335, 90, 60, 80, "button2");
208         } // Fl_Button* o
209         { new Fl_Button(395, 90, 60, 80, "button");
210         } // Fl_Button* o
211         { new Fl_Button(455, 90, 60, 80, "button");
212         } // Fl_Button* o
213         o->end();
214       } // Fl_Group* o
215       { Fl_Group* o = new Fl_Group(325, 60, 300, 180, "tab4");
216         o->tooltip("this tab show the issue of indicating a selcted tab if the tab layouts are ve\
217 ry similar");
218         o->selection_color((Fl_Color)5);
219         o->labelfont(2);
220         o->hide();
221         { new Fl_Button(335, 80, 60, 110, "button2");
222         } // Fl_Button* o
223         { new Fl_Button(395, 80, 60, 110, "button");
224         } // Fl_Button* o
225         { new Fl_Button(455, 80, 60, 110, "button");
226         } // Fl_Button* o
227         o->end();
228       } // Fl_Group* o
229       { Fl_Group* o = new Fl_Group(325, 60, 300, 180, "     tab5      ");
230         o->tooltip("tab5 verifies if visibility requests are handled correctly");
231         o->labeltype(FL_ENGRAVED_LABEL);
232         o->hide();
233         { Fl_Button* o = new Fl_Button(335, 75, 60, 80, "button2");
234           o->tooltip("button2 has a different tooltp than tab5");
235         } // Fl_Button* o
236         { new Fl_Button(405, 75, 60, 80, "button");
237         } // Fl_Button* o
238         { Fl_Window* o = new Fl_Window(335, 175, 40, 55);
239           o->box(FL_THIN_DOWN_BOX);
240           o->color((Fl_Color)173);
241           o->selection_color(FL_BACKGROUND_COLOR);
242           o->labeltype(FL_NORMAL_LABEL);
243           o->labelfont(0);
244           o->labelsize(14);
245           o->labelcolor(FL_FOREGROUND_COLOR);
246           o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
247           o->when(FL_WHEN_RELEASE);
248           o->end();
249         } // Fl_Window* o
250         { Fl_Window* o = new Fl_Window(380, 175, 40, 55, "subwindows:");
251           o->box(FL_THIN_DOWN_BOX);
252           o->color((Fl_Color)167);
253           o->selection_color(FL_BACKGROUND_COLOR);
254           o->labeltype(FL_NORMAL_LABEL);
255           o->labelfont(0);
256           o->labelsize(14);
257           o->labelcolor(FL_FOREGROUND_COLOR);
258           o->align(Fl_Align(FL_ALIGN_TOP));
259           o->when(FL_WHEN_RELEASE);
260           o->end();
261         } // Fl_Window* o
262         { Fl_Window* o = new Fl_Window(425, 175, 40, 55);
263           o->box(FL_THIN_DOWN_BOX);
264           o->color((Fl_Color)239);
265           o->selection_color(FL_BACKGROUND_COLOR);
266           o->labeltype(FL_NORMAL_LABEL);
267           o->labelfont(0);
268           o->labelsize(14);
269           o->labelcolor(FL_FOREGROUND_COLOR);
270           o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
271           o->when(FL_WHEN_RELEASE);
272           o->end();
273         } // Fl_Window* o
274         o->end();
275       } // Fl_Group* o
276       wWizard->end();
277     } // Fl_Wizard* wWizard
278     { Fl_Group* o = new Fl_Group(410, 245, 130, 25);
279       { Fl_Button* o = new Fl_Button(410, 245, 30, 25, "@|<");
280         o->tooltip("go to first page [Home]");
281         o->shortcut(0xff50);
282         o->callback((Fl_Callback*)cb_);
283       } // Fl_Button* o
284       { Fl_Button* o = new Fl_Button(440, 245, 30, 25, "@<");
285         o->tooltip("go to previous page [left arrow]");
286         o->shortcut(0xff51);
287         o->callback((Fl_Callback*)cb_1);
288       } // Fl_Button* o
289       { Fl_Button* o = new Fl_Button(480, 245, 30, 25, "@>");
290         o->tooltip("go to next page in wizard [right arrow]");
291         o->shortcut(0xff53);
292         o->callback((Fl_Callback*)cb_2);
293       } // Fl_Button* o
294       { Fl_Button* o = new Fl_Button(510, 245, 30, 25, "@>|");
295         o->tooltip("go to last page [End]");
296         o->shortcut(0xff57);
297         o->callback((Fl_Callback*)cb_3);
298       } // Fl_Button* o
299       o->end();
300     } // Fl_Group* o
301     { new Fl_Input(60, 255, 130, 25, "inputA:");
302     } // Fl_Input* o
303     { new Fl_Input(60, 285, 250, 25, "inputB:");
304     } // Fl_Input* o
305     { Fl_Button* o = new Fl_Button(475, 295, 70, 30, "cancel");
306       o->callback((Fl_Callback*)cb_cancel);
307     } // Fl_Button* o
308     { Fl_Return_Button* o = new Fl_Return_Button(555, 295, 70, 30, "OK");
309       o->callback((Fl_Callback*)cb_OK);
310     } // Fl_Return_Button* o
311     foo_window->end();
312   } // Fl_Double_Window* foo_window
313   foo_window->show(argc, argv);
314   return Fl::run();
315 }
316