1 //
2 // "$Id$"
3 //
4 // Code dialogs for the Fast Light Tool Kit (FLTK).
5 //
6 // Copyright 1998-2021 by Bill Spitzak and others.
7 //
8 // This library is free software. Distribution and use rights are outlined in
9 // the file "COPYING" which should have been included with this file. If this
10 // file is missing or damaged, see the license at:
11 //
12 // http://www.fltk.org/COPYING.php
13 //
14 // Please report all bugs and problems on the following page:
15 //
16 // http://www.fltk.org/str.php
17 //
18
19 // generated by Fast Light User Interface Designer (fluid) version 1.0308
20
21 #include "function_panel.h"
22 #include <FL/Fl_Pixmap.H>
23 #include "Fl_Type.h"
24 #include "undo.h"
25 extern class Fl_Pixmap *pixmap[];
26 extern class Fl_Type *Fl_Type_make(const char*);
27 extern void select_only(Fl_Type*);
28 extern void exit_cb(Fl_Widget*, void*);
29 extern void toggle_widgetbin_cb(Fl_Widget*, void*);
30
31 /**
32 Allow widget navigation on text fields with Tab.
33 */
use_tab_navigation(int,Fl_Text_Editor *)34 static int use_tab_navigation(int, Fl_Text_Editor*) {
35 return 0;
36 }
37
38 Fl_Double_Window *function_panel=(Fl_Double_Window *)0;
39
40 Fl_Choice *f_public_member_choice=(Fl_Choice *)0;
41
42 Fl_Menu_Item menu_f_public_member_choice[] = {
43 {"private", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
44 {"public", 0, 0, (void*)(1), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
45 {"protected", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
46 {0,0,0,0,0,0,0,0,0}
47 };
48
49 Fl_Choice *f_public_choice=(Fl_Choice *)0;
50
51 Fl_Menu_Item menu_f_public_choice[] = {
52 {"local", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
53 {"global", 0, 0, (void*)(1), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
54 {0,0,0,0,0,0,0,0,0}
55 };
56
57 Fl_Light_Button *f_c_button=(Fl_Light_Button *)0;
58
59 Fl_Input *f_name_input=(Fl_Input *)0;
60
61 Fl_Input *f_return_type_input=(Fl_Input *)0;
62
63 Fl_Text_Editor *f_comment_input=(Fl_Text_Editor *)0;
64
65 Fl_Return_Button *f_panel_ok=(Fl_Return_Button *)0;
66
67 Fl_Button *f_panel_cancel=(Fl_Button *)0;
68
make_function_panel()69 Fl_Double_Window* make_function_panel() {
70 { function_panel = new Fl_Double_Window(343, 232, "Function/Method Properties");
71 { Fl_Group* o = new Fl_Group(10, 10, 270, 20);
72 { f_public_member_choice = new Fl_Choice(10, 10, 75, 20);
73 f_public_member_choice->tooltip("Change member access attribute.");
74 f_public_member_choice->down_box(FL_BORDER_BOX);
75 f_public_member_choice->labelsize(11);
76 f_public_member_choice->textsize(11);
77 f_public_member_choice->when(FL_WHEN_CHANGED);
78 f_public_member_choice->menu(menu_f_public_member_choice);
79 } // Fl_Choice* f_public_member_choice
80 { f_public_choice = new Fl_Choice(10, 10, 75, 20);
81 f_public_choice->tooltip("Change widget accessibility.");
82 f_public_choice->down_box(FL_BORDER_BOX);
83 f_public_choice->labelsize(11);
84 f_public_choice->textsize(11);
85 f_public_choice->when(FL_WHEN_CHANGED);
86 f_public_choice->menu(menu_f_public_choice);
87 } // Fl_Choice* f_public_choice
88 { f_c_button = new Fl_Light_Button(95, 10, 120, 20, "C declaration");
89 f_c_button->tooltip("Declare with a C interface instead of C++.");
90 f_c_button->labelsize(11);
91 } // Fl_Light_Button* f_c_button
92 { Fl_Box* o = new Fl_Box(235, 10, 45, 20);
93 Fl_Group::current()->resizable(o);
94 } // Fl_Box* o
95 o->end();
96 } // Fl_Group* o
97 { f_name_input = new Fl_Input(10, 50, 320, 20, "Name(args): (blank for main())");
98 f_name_input->tooltip("The name of the function or method.");
99 f_name_input->labelfont(1);
100 f_name_input->labelsize(11);
101 f_name_input->textfont(4);
102 f_name_input->textsize(11);
103 f_name_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
104 f_name_input->when(FL_WHEN_NEVER);
105 } // Fl_Input* f_name_input
106 { f_return_type_input = new Fl_Input(10, 90, 320, 20, "Return Type: (blank to return outermost widget)");
107 f_return_type_input->tooltip("The return type of the function or method.");
108 f_return_type_input->labelfont(1);
109 f_return_type_input->labelsize(11);
110 f_return_type_input->textfont(4);
111 f_return_type_input->textsize(11);
112 f_return_type_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
113 f_return_type_input->when(FL_WHEN_NEVER);
114 } // Fl_Input* f_return_type_input
115 { f_comment_input = new Fl_Text_Editor(10, 125, 320, 65, "Comment:");
116 f_comment_input->tooltip("Function comment in Doxygen format");
117 f_comment_input->box(FL_DOWN_BOX);
118 f_comment_input->labelfont(1);
119 f_comment_input->labelsize(11);
120 f_comment_input->textfont(4);
121 f_comment_input->textsize(11);
122 f_comment_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
123 Fl_Group::current()->resizable(f_comment_input);
124 f_comment_input->buffer(new Fl_Text_Buffer());
125 f_comment_input->add_key_binding(FL_Tab, 0, use_tab_navigation);
126 } // Fl_Text_Editor* f_comment_input
127 { Fl_Group* o = new Fl_Group(10, 200, 320, 20);
128 { f_panel_ok = new Fl_Return_Button(220, 200, 50, 20, "OK");
129 f_panel_ok->tooltip("Apply the changes.");
130 f_panel_ok->labelsize(11);
131 f_panel_ok->window()->hotspot(f_panel_ok);
132 } // Fl_Return_Button* f_panel_ok
133 { f_panel_cancel = new Fl_Button(280, 200, 50, 20, "Cancel");
134 f_panel_cancel->tooltip("Cancel the changes.");
135 f_panel_cancel->labelsize(11);
136 } // Fl_Button* f_panel_cancel
137 { Fl_Box* o = new Fl_Box(10, 200, 205, 20);
138 Fl_Group::current()->resizable(o);
139 } // Fl_Box* o
140 o->end();
141 } // Fl_Group* o
142 function_panel->set_modal();
143 function_panel->end();
144 } // Fl_Double_Window* function_panel
145 return function_panel;
146 }
147
148 Fl_Double_Window *code_panel=(Fl_Double_Window *)0;
149
cb_code_panel(Fl_Double_Window *,void *)150 static void cb_code_panel(Fl_Double_Window*, void*) {
151 if (Fl::event()==FL_SHORTCUT && Fl::event_key()==FL_Escape)
152 return; // ignore Escape
153 code_panel->hide(); // otherwise hide..;
154 }
155
156 CodeEditor *code_input=(CodeEditor *)0;
157
158 Fl_Return_Button *code_panel_ok=(Fl_Return_Button *)0;
159
160 Fl_Button *code_panel_cancel=(Fl_Button *)0;
161
make_code_panel()162 Fl_Double_Window* make_code_panel() {
163 { Fl_Double_Window* o = code_panel = new Fl_Double_Window(540, 180, "Code Properties");
164 code_panel->labelsize(11);
165 code_panel->callback((Fl_Callback*)cb_code_panel);
166 { CodeEditor* o = code_input = new CodeEditor(10, 10, 520, 130);
167 code_input->box(FL_DOWN_BOX);
168 code_input->color(FL_BACKGROUND2_COLOR);
169 code_input->selection_color(FL_SELECTION_COLOR);
170 code_input->labeltype(FL_NORMAL_LABEL);
171 code_input->labelfont(0);
172 code_input->labelsize(11);
173 code_input->labelcolor(FL_FOREGROUND_COLOR);
174 code_input->textfont(4);
175 code_input->textsize(11);
176 code_input->align(Fl_Align(FL_ALIGN_TOP));
177 code_input->when(FL_WHEN_RELEASE);
178 Fl_Group::current()->resizable(code_input);
179 o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);
180 } // CodeEditor* code_input
181 { Fl_Group* o = new Fl_Group(10, 150, 520, 20);
182 o->labelsize(11);
183 { code_panel_ok = new Fl_Return_Button(400, 150, 60, 20, "OK");
184 code_panel_ok->labelsize(11);
185 code_panel_ok->window()->hotspot(code_panel_ok);
186 } // Fl_Return_Button* code_panel_ok
187 { code_panel_cancel = new Fl_Button(470, 150, 60, 20, "Cancel");
188 code_panel_cancel->labelsize(11);
189 } // Fl_Button* code_panel_cancel
190 { Fl_Box* o = new Fl_Box(10, 150, 380, 20);
191 o->labelsize(11);
192 Fl_Group::current()->resizable(o);
193 } // Fl_Box* o
194 o->end();
195 } // Fl_Group* o
196 o->size_range(200, 150);
197 code_panel->set_modal();
198 code_panel->end();
199 } // Fl_Double_Window* code_panel
200 // Enable line numbers
201 code_input->linenumber_width(60);
202 code_input->linenumber_size(code_input->Fl_Text_Display::textsize());
203 return code_panel;
204 }
205
206 Fl_Double_Window *codeblock_panel=(Fl_Double_Window *)0;
207
208 Fl_Input *code_before_input=(Fl_Input *)0;
209
210 Fl_Input *code_after_input=(Fl_Input *)0;
211
212 Fl_Return_Button *codeblock_panel_ok=(Fl_Return_Button *)0;
213
214 Fl_Button *codeblock_panel_cancel=(Fl_Button *)0;
215
make_codeblock_panel()216 Fl_Double_Window* make_codeblock_panel() {
217 { Fl_Double_Window* o = codeblock_panel = new Fl_Double_Window(300, 115, "Code Block Properties");
218 codeblock_panel->labelsize(11);
219 { code_before_input = new Fl_Input(10, 15, 280, 20, "Conditional code block");
220 code_before_input->tooltip("#ifdef or similar conditional code block.");
221 code_before_input->labelsize(11);
222 code_before_input->textfont(4);
223 code_before_input->textsize(11);
224 code_before_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
225 code_before_input->when(FL_WHEN_NEVER);
226 } // Fl_Input* code_before_input
227 { code_after_input = new Fl_Input(10, 55, 280, 20, "\"{...child code...}\" is inserted here");
228 code_after_input->tooltip("#endif or similar conditional code block.");
229 code_after_input->labelsize(11);
230 code_after_input->textfont(4);
231 code_after_input->textsize(11);
232 code_after_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
233 code_after_input->when(FL_WHEN_NEVER);
234 Fl_Group::current()->resizable(code_after_input);
235 } // Fl_Input* code_after_input
236 { Fl_Group* o = new Fl_Group(10, 85, 280, 20);
237 { codeblock_panel_ok = new Fl_Return_Button(160, 85, 60, 20, "OK");
238 codeblock_panel_ok->labelsize(11);
239 codeblock_panel_ok->window()->hotspot(codeblock_panel_ok);
240 } // Fl_Return_Button* codeblock_panel_ok
241 { codeblock_panel_cancel = new Fl_Button(230, 85, 60, 20, "Cancel");
242 codeblock_panel_cancel->shortcut(0xff1b);
243 codeblock_panel_cancel->labelsize(11);
244 } // Fl_Button* codeblock_panel_cancel
245 { Fl_Box* o = new Fl_Box(10, 85, 140, 20);
246 Fl_Group::current()->resizable(o);
247 } // Fl_Box* o
248 o->end();
249 } // Fl_Group* o
250 o->size_range(o->w(), o->h(), Fl::w(), o->h());
251 codeblock_panel->set_modal();
252 codeblock_panel->end();
253 } // Fl_Double_Window* codeblock_panel
254 return codeblock_panel;
255 }
256
257 Fl_Double_Window *declblock_panel=(Fl_Double_Window *)0;
258
259 Fl_Choice *declblock_public_choice=(Fl_Choice *)0;
260
261 Fl_Menu_Item menu_declblock_public_choice[] = {
262 {"in source code only", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
263 {"in header and source", 0, 0, (void*)(1), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
264 {0,0,0,0,0,0,0,0,0}
265 };
266
267 Fl_Light_Button *declblock_public_button_x=(Fl_Light_Button *)0;
268
269 Fl_Input *decl_before_input=(Fl_Input *)0;
270
271 Fl_Input *decl_after_input=(Fl_Input *)0;
272
273 Fl_Return_Button *declblock_panel_ok=(Fl_Return_Button *)0;
274
275 Fl_Button *declblock_panel_cancel=(Fl_Button *)0;
276
make_declblock_panel()277 Fl_Double_Window* make_declblock_panel() {
278 { Fl_Double_Window* o = declblock_panel = new Fl_Double_Window(300, 135, "Declaration Block Properties");
279 declblock_panel->labelsize(11);
280 { Fl_Group* o = new Fl_Group(10, 10, 280, 20);
281 { declblock_public_choice = new Fl_Choice(10, 10, 140, 20);
282 declblock_public_choice->tooltip("Change widget accessibility.");
283 declblock_public_choice->down_box(FL_BORDER_BOX);
284 declblock_public_choice->labelsize(11);
285 declblock_public_choice->textsize(11);
286 declblock_public_choice->when(FL_WHEN_NEVER);
287 declblock_public_choice->menu(menu_declblock_public_choice);
288 } // Fl_Choice* declblock_public_choice
289 { declblock_public_button_x = new Fl_Light_Button(10, 10, 60, 20, "public");
290 declblock_public_button_x->tooltip("Make the declaration publicly accessible.");
291 declblock_public_button_x->labelsize(11);
292 declblock_public_button_x->when(FL_WHEN_NEVER);
293 declblock_public_button_x->hide();
294 } // Fl_Light_Button* declblock_public_button_x
295 { Fl_Box* o = new Fl_Box(155, 10, 135, 20);
296 Fl_Group::current()->resizable(o);
297 } // Fl_Box* o
298 o->end();
299 } // Fl_Group* o
300 { decl_before_input = new Fl_Input(10, 40, 280, 20);
301 decl_before_input->tooltip("#ifdef or similar conditional declaration block.");
302 decl_before_input->labelsize(11);
303 decl_before_input->textfont(4);
304 decl_before_input->textsize(11);
305 decl_before_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
306 decl_before_input->when(FL_WHEN_NEVER);
307 Fl_Group::current()->resizable(decl_before_input);
308 } // Fl_Input* decl_before_input
309 { decl_after_input = new Fl_Input(10, 75, 280, 20, "\"\\n...child code...\\n\" is inserted here");
310 decl_after_input->tooltip("#endif or similar declaration code block.");
311 decl_after_input->labelsize(11);
312 decl_after_input->textfont(4);
313 decl_after_input->textsize(11);
314 decl_after_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
315 decl_after_input->when(FL_WHEN_NEVER);
316 } // Fl_Input* decl_after_input
317 { Fl_Group* o = new Fl_Group(10, 105, 280, 20);
318 { declblock_panel_ok = new Fl_Return_Button(160, 105, 60, 20, "OK");
319 declblock_panel_ok->labelsize(11);
320 declblock_panel_ok->window()->hotspot(declblock_panel_ok);
321 } // Fl_Return_Button* declblock_panel_ok
322 { declblock_panel_cancel = new Fl_Button(230, 105, 60, 20, "Cancel");
323 declblock_panel_cancel->shortcut(0xff1b);
324 declblock_panel_cancel->labelsize(11);
325 } // Fl_Button* declblock_panel_cancel
326 { Fl_Box* o = new Fl_Box(10, 105, 140, 20);
327 Fl_Group::current()->resizable(o);
328 } // Fl_Box* o
329 o->end();
330 } // Fl_Group* o
331 o->size_range(o->w(), o->h(), Fl::w(), o->h());
332 declblock_panel->set_modal();
333 declblock_panel->end();
334 } // Fl_Double_Window* declblock_panel
335 return declblock_panel;
336 }
337
338 Fl_Double_Window *decl_panel=(Fl_Double_Window *)0;
339
340 Fl_Choice *decl_choice=(Fl_Choice *)0;
341
342 Fl_Menu_Item menu_decl_choice[] = {
343 {"in source file only", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
344 {"in header file only", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
345 {"\"static\" in source file", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
346 {"in source and \"extern\" in header", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
347 {0,0,0,0,0,0,0,0,0}
348 };
349
350 Fl_Choice *decl_class_choice=(Fl_Choice *)0;
351
352 Fl_Menu_Item menu_decl_class_choice[] = {
353 {"private", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
354 {"public", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
355 {"protected", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
356 {0,0,0,0,0,0,0,0,0}
357 };
358
359 Fl_Input *decl_input=(Fl_Input *)0;
360
361 Fl_Text_Editor *decl_comment_input=(Fl_Text_Editor *)0;
362
363 Fl_Return_Button *decl_panel_ok=(Fl_Return_Button *)0;
364
365 Fl_Button *decl_panel_cancel=(Fl_Button *)0;
366
make_decl_panel()367 Fl_Double_Window* make_decl_panel() {
368 { decl_panel = new Fl_Double_Window(343, 237, "Declaration Properties");
369 decl_panel->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
370 { Fl_Group* o = new Fl_Group(10, 10, 270, 20);
371 { Fl_Box* o = new Fl_Box(200, 10, 80, 20);
372 Fl_Group::current()->resizable(o);
373 } // Fl_Box* o
374 { decl_choice = new Fl_Choice(10, 10, 185, 20);
375 decl_choice->down_box(FL_BORDER_BOX);
376 decl_choice->labelsize(11);
377 decl_choice->textsize(11);
378 decl_choice->menu(menu_decl_choice);
379 } // Fl_Choice* decl_choice
380 { decl_class_choice = new Fl_Choice(10, 10, 75, 20);
381 decl_class_choice->down_box(FL_BORDER_BOX);
382 decl_class_choice->labelsize(11);
383 decl_class_choice->textsize(11);
384 decl_class_choice->menu(menu_decl_class_choice);
385 } // Fl_Choice* decl_class_choice
386 o->end();
387 } // Fl_Group* o
388 { decl_input = new Fl_Input(10, 40, 320, 20, "This can be any declaration, like \"int x;\", an external symbol like \"exter\
389 n int foo();\", a #directive like \"#include <foo.h>\", a comment like \"//foo\
390 \" or \"/*foo*/\", or typedef like \"typedef char byte;\" or \"using std::list\
391 ;\".");
392 decl_input->tooltip("Declaration text.");
393 decl_input->labelsize(11);
394 decl_input->textfont(4);
395 decl_input->textsize(11);
396 decl_input->align(Fl_Align(134));
397 decl_input->when(FL_WHEN_NEVER);
398 } // Fl_Input* decl_input
399 { decl_comment_input = new Fl_Text_Editor(10, 130, 320, 65, "Comment:");
400 decl_comment_input->tooltip("Declaration comment in Doxygen format");
401 decl_comment_input->box(FL_DOWN_BOX);
402 decl_comment_input->labelfont(1);
403 decl_comment_input->labelsize(11);
404 decl_comment_input->textfont(4);
405 decl_comment_input->textsize(11);
406 decl_comment_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
407 Fl_Group::current()->resizable(decl_comment_input);
408 decl_comment_input->buffer(new Fl_Text_Buffer());
409 decl_comment_input->add_key_binding(FL_Tab, 0, use_tab_navigation);
410 } // Fl_Text_Editor* decl_comment_input
411 { Fl_Group* o = new Fl_Group(10, 205, 320, 20);
412 { decl_panel_ok = new Fl_Return_Button(200, 205, 60, 20, "OK");
413 decl_panel_ok->labelsize(11);
414 decl_panel_ok->window()->hotspot(decl_panel_ok);
415 } // Fl_Return_Button* decl_panel_ok
416 { decl_panel_cancel = new Fl_Button(270, 205, 60, 20, "Cancel");
417 decl_panel_cancel->shortcut(0xff1b);
418 decl_panel_cancel->labelsize(11);
419 } // Fl_Button* decl_panel_cancel
420 { Fl_Box* o = new Fl_Box(10, 205, 185, 20);
421 Fl_Group::current()->resizable(o);
422 } // Fl_Box* o
423 o->end();
424 } // Fl_Group* o
425 decl_panel->size_range(343, 237);
426 decl_panel->end();
427 } // Fl_Double_Window* decl_panel
428 return decl_panel;
429 }
430
431 Fl_Double_Window *data_panel=(Fl_Double_Window *)0;
432
433 Fl_Choice *data_choice=(Fl_Choice *)0;
434
435 Fl_Menu_Item menu_data_choice[] = {
436 {"in source file only", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
437 {"in header file only", 0, 0, 0, 16, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
438 {"\"static\" in source file", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
439 {"in source and \"extern\" in header", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
440 {0,0,0,0,0,0,0,0,0}
441 };
442
443 Fl_Choice *data_class_choice=(Fl_Choice *)0;
444
445 Fl_Menu_Item menu_data_class_choice[] = {
446 {"private", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
447 {"public", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
448 {"protected", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
449 {0,0,0,0,0,0,0,0,0}
450 };
451
452 Fl_Input *data_input=(Fl_Input *)0;
453
454 Fl_Input *data_filename=(Fl_Input *)0;
455
456 Fl_Button *data_filebrowser=(Fl_Button *)0;
457
458 Fl_Text_Editor *data_comment_input=(Fl_Text_Editor *)0;
459
460 Fl_Return_Button *data_panel_ok=(Fl_Return_Button *)0;
461
462 Fl_Button *data_panel_cancel=(Fl_Button *)0;
463
make_data_panel()464 Fl_Double_Window* make_data_panel() {
465 { data_panel = new Fl_Double_Window(343, 237, "Binary Data Properties");
466 data_panel->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
467 { Fl_Group* o = new Fl_Group(10, 10, 270, 20);
468 { Fl_Box* o = new Fl_Box(200, 10, 80, 20);
469 Fl_Group::current()->resizable(o);
470 } // Fl_Box* o
471 { data_choice = new Fl_Choice(10, 10, 185, 20);
472 data_choice->down_box(FL_BORDER_BOX);
473 data_choice->labelsize(11);
474 data_choice->textsize(11);
475 data_choice->menu(menu_data_choice);
476 } // Fl_Choice* data_choice
477 { data_class_choice = new Fl_Choice(10, 10, 75, 20);
478 data_class_choice->down_box(FL_BORDER_BOX);
479 data_class_choice->labelsize(11);
480 data_class_choice->textsize(11);
481 data_class_choice->menu(menu_data_class_choice);
482 } // Fl_Choice* data_class_choice
483 o->end();
484 } // Fl_Group* o
485 { data_input = new Fl_Input(10, 52, 320, 20, "Variable Name:");
486 data_input->tooltip("Binary Data variables are declared \"const unsigned char []\".");
487 data_input->labelfont(1);
488 data_input->labelsize(11);
489 data_input->textfont(4);
490 data_input->textsize(11);
491 data_input->align(Fl_Align(133));
492 data_input->when(FL_WHEN_NEVER);
493 } // Fl_Input* data_input
494 { data_filename = new Fl_Input(10, 90, 280, 20, "Filename:");
495 data_filename->tooltip("Name and path of binary file that will be included.");
496 data_filename->labelfont(1);
497 data_filename->labelsize(11);
498 data_filename->textfont(4);
499 data_filename->textsize(11);
500 data_filename->align(Fl_Align(133));
501 data_filename->when(FL_WHEN_NEVER);
502 } // Fl_Input* data_filename
503 { data_filebrowser = new Fl_Button(290, 90, 40, 20, "@fileopen");
504 data_filebrowser->labelcolor((Fl_Color)134);
505 } // Fl_Button* data_filebrowser
506 { data_comment_input = new Fl_Text_Editor(10, 130, 320, 65, "Comment:");
507 data_comment_input->tooltip("Declaration comment in Doxygen format");
508 data_comment_input->box(FL_DOWN_BOX);
509 data_comment_input->labelfont(1);
510 data_comment_input->labelsize(11);
511 data_comment_input->textfont(4);
512 data_comment_input->textsize(11);
513 data_comment_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
514 Fl_Group::current()->resizable(data_comment_input);
515 data_comment_input->buffer(new Fl_Text_Buffer());
516 data_comment_input->add_key_binding(FL_Tab, 0, use_tab_navigation);
517 } // Fl_Text_Editor* data_comment_input
518 { Fl_Group* o = new Fl_Group(10, 205, 320, 20);
519 { data_panel_ok = new Fl_Return_Button(200, 205, 60, 20, "OK");
520 data_panel_ok->labelsize(11);
521 data_panel_ok->window()->hotspot(data_panel_ok);
522 } // Fl_Return_Button* data_panel_ok
523 { data_panel_cancel = new Fl_Button(270, 205, 60, 20, "Cancel");
524 data_panel_cancel->shortcut(0xff1b);
525 data_panel_cancel->labelsize(11);
526 } // Fl_Button* data_panel_cancel
527 { Fl_Box* o = new Fl_Box(10, 205, 185, 20);
528 Fl_Group::current()->resizable(o);
529 } // Fl_Box* o
530 o->end();
531 } // Fl_Group* o
532 data_panel->size_range(343, 237);
533 data_panel->end();
534 } // Fl_Double_Window* data_panel
535 return data_panel;
536 }
537
538 Fl_Double_Window *class_panel=(Fl_Double_Window *)0;
539
540 Fl_Light_Button *c_public_button=(Fl_Light_Button *)0;
541
542 Fl_Input *c_name_input=(Fl_Input *)0;
543
544 Fl_Input *c_subclass_input=(Fl_Input *)0;
545
546 Fl_Text_Editor *c_comment_input=(Fl_Text_Editor *)0;
547
548 Fl_Return_Button *c_panel_ok=(Fl_Return_Button *)0;
549
550 Fl_Button *c_panel_cancel=(Fl_Button *)0;
551
make_class_panel()552 Fl_Double_Window* make_class_panel() {
553 { class_panel = new Fl_Double_Window(342, 196, "Class Properties");
554 class_panel->labelsize(11);
555 { Fl_Group* o = new Fl_Group(10, 10, 280, 20);
556 o->hide();
557 { c_public_button = new Fl_Light_Button(10, 10, 60, 20, "public");
558 c_public_button->tooltip("Make the class publicly accessible.");
559 c_public_button->labelsize(11);
560 c_public_button->when(FL_WHEN_NEVER);
561 c_public_button->hide();
562 } // Fl_Light_Button* c_public_button
563 { Fl_Box* o = new Fl_Box(80, 10, 210, 20);
564 Fl_Group::current()->resizable(o);
565 } // Fl_Box* o
566 o->end();
567 } // Fl_Group* o
568 { c_name_input = new Fl_Input(10, 20, 320, 20, "Name:");
569 c_name_input->tooltip("Name of class.");
570 c_name_input->labelfont(1);
571 c_name_input->labelsize(11);
572 c_name_input->textfont(4);
573 c_name_input->textsize(11);
574 c_name_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
575 c_name_input->when(FL_WHEN_NEVER);
576 } // Fl_Input* c_name_input
577 { c_subclass_input = new Fl_Input(10, 55, 320, 20, "Subclass of (text between : and {)");
578 c_subclass_input->tooltip("Name of subclass.");
579 c_subclass_input->labelfont(1);
580 c_subclass_input->labelsize(11);
581 c_subclass_input->textfont(4);
582 c_subclass_input->textsize(11);
583 c_subclass_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
584 c_subclass_input->when(FL_WHEN_NEVER);
585 } // Fl_Input* c_subclass_input
586 { c_comment_input = new Fl_Text_Editor(10, 90, 320, 65, "Comment:");
587 c_comment_input->tooltip("Class comment in Doxygen format");
588 c_comment_input->box(FL_DOWN_BOX);
589 c_comment_input->labelfont(1);
590 c_comment_input->labelsize(11);
591 c_comment_input->textfont(4);
592 c_comment_input->textsize(11);
593 c_comment_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
594 Fl_Group::current()->resizable(c_comment_input);
595 c_comment_input->buffer(new Fl_Text_Buffer());
596 c_comment_input->add_key_binding(FL_Tab, 0, use_tab_navigation);
597 } // Fl_Text_Editor* c_comment_input
598 { Fl_Group* o = new Fl_Group(10, 165, 320, 20);
599 { c_panel_ok = new Fl_Return_Button(200, 165, 60, 20, "OK");
600 c_panel_ok->labelsize(11);
601 c_panel_ok->window()->hotspot(c_panel_ok);
602 } // Fl_Return_Button* c_panel_ok
603 { c_panel_cancel = new Fl_Button(270, 165, 60, 20, "Cancel");
604 c_panel_cancel->shortcut(0xff1b);
605 c_panel_cancel->labelsize(11);
606 } // Fl_Button* c_panel_cancel
607 { Fl_Box* o = new Fl_Box(10, 165, 185, 20);
608 Fl_Group::current()->resizable(o);
609 } // Fl_Box* o
610 o->end();
611 } // Fl_Group* o
612 class_panel->set_modal();
613 class_panel->size_range(343, 188);
614 class_panel->end();
615 } // Fl_Double_Window* class_panel
616 return class_panel;
617 }
618
619 Fl_Double_Window *comment_panel=(Fl_Double_Window *)0;
620
621 CodeEditor *comment_input=(CodeEditor *)0;
622
623 Fl_Return_Button *comment_panel_ok=(Fl_Return_Button *)0;
624
625 Fl_Button *comment_panel_cancel=(Fl_Button *)0;
626
627 Fl_Light_Button *comment_in_source=(Fl_Light_Button *)0;
628
629 Fl_Light_Button *comment_in_header=(Fl_Light_Button *)0;
630
631 Fl_Menu_Button *comment_predefined=(Fl_Menu_Button *)0;
632
633 Fl_Button *comment_load=(Fl_Button *)0;
634
make_comment_panel()635 Fl_Double_Window* make_comment_panel() {
636 { Fl_Double_Window* o = comment_panel = new Fl_Double_Window(550, 280, "Comment Properties");
637 comment_panel->labelsize(11);
638 { CodeEditor* o = comment_input = new CodeEditor(110, 10, 430, 230);
639 comment_input->box(FL_DOWN_BOX);
640 comment_input->color(FL_BACKGROUND2_COLOR);
641 comment_input->selection_color(FL_SELECTION_COLOR);
642 comment_input->labeltype(FL_NORMAL_LABEL);
643 comment_input->labelfont(0);
644 comment_input->labelsize(11);
645 comment_input->labelcolor(FL_FOREGROUND_COLOR);
646 comment_input->textfont(4);
647 comment_input->textsize(11);
648 comment_input->align(Fl_Align(FL_ALIGN_TOP));
649 comment_input->when(FL_WHEN_RELEASE);
650 Fl_Group::current()->resizable(comment_input);
651 o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);
652 } // CodeEditor* comment_input
653 { Fl_Group* o = new Fl_Group(110, 250, 430, 20);
654 o->labelsize(11);
655 { comment_panel_ok = new Fl_Return_Button(370, 250, 80, 20, "OK");
656 comment_panel_ok->labelsize(11);
657 comment_panel_ok->window()->hotspot(comment_panel_ok);
658 } // Fl_Return_Button* comment_panel_ok
659 { comment_panel_cancel = new Fl_Button(460, 250, 80, 20, "Cancel");
660 comment_panel_cancel->shortcut(0xff1b);
661 comment_panel_cancel->labelsize(11);
662 } // Fl_Button* comment_panel_cancel
663 { Fl_Box* o = new Fl_Box(110, 250, 250, 20);
664 o->labelsize(11);
665 Fl_Group::current()->resizable(o);
666 } // Fl_Box* o
667 o->end();
668 } // Fl_Group* o
669 { Fl_Group* o = new Fl_Group(10, 10, 90, 243);
670 o->labelsize(11);
671 { comment_in_source = new Fl_Light_Button(10, 10, 90, 20, "In Source");
672 comment_in_source->tooltip("Put the comment into the source (.cxx) file.");
673 comment_in_source->labelsize(11);
674 comment_in_source->when(FL_WHEN_NEVER);
675 } // Fl_Light_Button* comment_in_source
676 { comment_in_header = new Fl_Light_Button(10, 40, 90, 20, "In Header");
677 comment_in_header->tooltip("Put the comment into the header (.h) file.");
678 comment_in_header->labelsize(11);
679 comment_in_header->when(FL_WHEN_NEVER);
680 } // Fl_Light_Button* comment_in_header
681 { comment_predefined = new Fl_Menu_Button(10, 70, 90, 20, "Predefined");
682 comment_predefined->labelsize(11);
683 comment_predefined->textsize(11);
684 } // Fl_Menu_Button* comment_predefined
685 { comment_load = new Fl_Button(10, 100, 90, 20, "Import...");
686 comment_load->labelsize(11);
687 } // Fl_Button* comment_load
688 { Fl_Box* o = new Fl_Box(10, 132, 90, 121);
689 o->labelsize(11);
690 Fl_Group::current()->resizable(o);
691 } // Fl_Box* o
692 o->end();
693 } // Fl_Group* o
694 o->size_range(320, 180);
695 comment_panel->set_modal();
696 comment_panel->end();
697 } // Fl_Double_Window* comment_panel
698 return comment_panel;
699 }
700
type_make_cb(Fl_Widget *,void * d)701 void type_make_cb(Fl_Widget*,void*d) {
702 undo_checkpoint();
703 Fl_Type *t = Fl_Type_make((char*)d);
704 if (t) {
705 select_only(t);
706 set_modflag(1);
707 t->open();
708 } else {
709 undo_current --;
710 undo_last --;
711 }
712 }
713
714 Fl_Window *widgetbin_panel=(Fl_Window *)0;
715
cb_widgetbin_panel(Fl_Window * o,void * v)716 static void cb_widgetbin_panel(Fl_Window* o, void* v) {
717 if (Fl::event()==FL_SHORTCUT && Fl::event_key()==FL_Escape)
718 exit_cb((Fl_Widget*)o, v);
719 else
720 toggle_widgetbin_cb((Fl_Widget*)o, v);
721 }
722
make_widgetbin()723 Fl_Window* make_widgetbin() {
724 { widgetbin_panel = new Fl_Window(574, 85, "Widget Bin");
725 widgetbin_panel->callback((Fl_Callback*)cb_widgetbin_panel);
726 widgetbin_panel->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
727 { Fl_Group* o = new Fl_Group(3, 3, 79, 79);
728 { Fl_Button* o = new Fl_Button(5, 5, 24, 24);
729 o->tooltip("Function");
730 o->box(FL_THIN_UP_BOX);
731 o->callback((Fl_Callback*)type_make_cb, (void*)("Function"));
732 o->image(pixmap[7]);
733 } // Fl_Button* o
734 { Fl_Button* o = new Fl_Button(30, 5, 24, 24);
735 o->tooltip("Class");
736 o->box(FL_THIN_UP_BOX);
737 o->callback((Fl_Callback*)type_make_cb, (void*)("Class"));
738 o->image(pixmap[12]);
739 } // Fl_Button* o
740 { Fl_Button* o = new Fl_Button(55, 5, 24, 24);
741 o->tooltip("Comment");
742 o->box(FL_THIN_UP_BOX);
743 o->callback((Fl_Callback*)type_make_cb, (void*)("comment"));
744 o->image(pixmap[46]);
745 } // Fl_Button* o
746 { Fl_Button* o = new Fl_Button(5, 30, 24, 24);
747 o->tooltip("Code");
748 o->box(FL_THIN_UP_BOX);
749 o->callback((Fl_Callback*)type_make_cb, (void*)("Code"));
750 o->image(pixmap[8]);
751 } // Fl_Button* o
752 { Fl_Button* o = new Fl_Button(30, 30, 24, 24);
753 o->tooltip("Code Block");
754 o->box(FL_THIN_UP_BOX);
755 o->callback((Fl_Callback*)type_make_cb, (void*)("CodeBlock"));
756 o->image(pixmap[9]);
757 } // Fl_Button* o
758 { Fl_Button* o = new Fl_Button(55, 30, 24, 24);
759 o->tooltip("Widget Class");
760 o->box(FL_THIN_UP_BOX);
761 o->callback((Fl_Callback*)type_make_cb, (void*)("widget_class"));
762 o->image(pixmap[48]);
763 } // Fl_Button* o
764 { Fl_Button* o = new Fl_Button(5, 55, 24, 24);
765 o->tooltip("Declaration");
766 o->box(FL_THIN_UP_BOX);
767 o->callback((Fl_Callback*)type_make_cb, (void*)("decl"));
768 o->image(pixmap[10]);
769 } // Fl_Button* o
770 { Fl_Button* o = new Fl_Button(30, 55, 24, 24);
771 o->tooltip("Declaration Block");
772 o->box(FL_THIN_UP_BOX);
773 o->callback((Fl_Callback*)type_make_cb, (void*)("declblock"));
774 o->image(pixmap[11]);
775 } // Fl_Button* o
776 { Fl_Button* o = new Fl_Button(55, 55, 24, 24);
777 o->tooltip("Binary Data");
778 o->box(FL_THIN_UP_BOX);
779 o->callback((Fl_Callback*)type_make_cb, (void*)("data"));
780 o->image(pixmap[49]);
781 } // Fl_Button* o
782 o->end();
783 } // Fl_Group* o
784 { Fl_Group* o = new Fl_Group(87, 3, 79, 79);
785 { Fl_Button* o = new Fl_Button(89, 5, 24, 24);
786 o->tooltip("Window");
787 o->box(FL_THIN_UP_BOX);
788 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Window"));
789 o->image(pixmap[1]);
790 } // Fl_Button* o
791 { Fl_Button* o = new Fl_Button(114, 5, 24, 24);
792 o->tooltip("Group");
793 o->box(FL_THIN_UP_BOX);
794 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Group"));
795 o->image(pixmap[6]);
796 } // Fl_Button* o
797 { Fl_Button* o = new Fl_Button(139, 5, 24, 24);
798 o->tooltip("Pack");
799 o->box(FL_THIN_UP_BOX);
800 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Pack"));
801 o->image(pixmap[22]);
802 } // Fl_Button* o
803 { Fl_Button* o = new Fl_Button(89, 30, 24, 24);
804 o->tooltip("Tabs");
805 o->box(FL_THIN_UP_BOX);
806 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Tabs"));
807 o->image(pixmap[13]);
808 } // Fl_Button* o
809 { Fl_Button* o = new Fl_Button(114, 30, 24, 24);
810 o->tooltip("Scroll");
811 o->box(FL_THIN_UP_BOX);
812 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Scroll"));
813 o->image(pixmap[19]);
814 } // Fl_Button* o
815 { Fl_Button* o = new Fl_Button(139, 30, 24, 24);
816 o->tooltip("Table");
817 o->box(FL_THIN_UP_BOX);
818 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Table"));
819 o->image(pixmap[51]);
820 } // Fl_Button* o
821 { Fl_Button* o = new Fl_Button(89, 55, 24, 24);
822 o->tooltip("Tile");
823 o->box(FL_THIN_UP_BOX);
824 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Tile"));
825 o->image(pixmap[20]);
826 } // Fl_Button* o
827 { Fl_Button* o = new Fl_Button(114, 55, 24, 24);
828 o->tooltip("Wizard");
829 o->box(FL_THIN_UP_BOX);
830 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Wizard"));
831 o->image(pixmap[21]);
832 } // Fl_Button* o
833 o->end();
834 } // Fl_Group* o
835 { Fl_Group* o = new Fl_Group(171, 3, 54, 79);
836 { Fl_Button* o = new Fl_Button(173, 5, 24, 24);
837 o->tooltip("Button");
838 o->box(FL_THIN_UP_BOX);
839 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Button"));
840 o->image(pixmap[2]);
841 } // Fl_Button* o
842 { Fl_Button* o = new Fl_Button(198, 5, 24, 24);
843 o->tooltip("Return Button");
844 o->box(FL_THIN_UP_BOX);
845 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Return_Button"));
846 o->image(pixmap[23]);
847 } // Fl_Button* o
848 { Fl_Button* o = new Fl_Button(173, 30, 24, 24);
849 o->tooltip("Light Button");
850 o->box(FL_THIN_UP_BOX);
851 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Light_Button"));
852 o->image(pixmap[24]);
853 } // Fl_Button* o
854 { Fl_Button* o = new Fl_Button(198, 30, 24, 24);
855 o->tooltip("Repeat Button");
856 o->box(FL_THIN_UP_BOX);
857 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Repeat_Button"));
858 o->image(pixmap[25]);
859 } // Fl_Button* o
860 { Fl_Button* o = new Fl_Button(173, 55, 24, 24);
861 o->tooltip("Check Button");
862 o->box(FL_THIN_UP_BOX);
863 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Check_Button"));
864 o->image(pixmap[3]);
865 } // Fl_Button* o
866 { Fl_Button* o = new Fl_Button(198, 55, 24, 24);
867 o->tooltip("Round Button");
868 o->box(FL_THIN_UP_BOX);
869 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Round_Button"));
870 o->image(pixmap[4]);
871 } // Fl_Button* o
872 o->end();
873 } // Fl_Group* o
874 { Fl_Group* o = new Fl_Group(230, 3, 104, 79);
875 { Fl_Button* o = new Fl_Button(232, 5, 24, 24);
876 o->tooltip("Slider");
877 o->box(FL_THIN_UP_BOX);
878 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Slider"));
879 o->image(pixmap[37]);
880 } // Fl_Button* o
881 { Fl_Button* o = new Fl_Button(257, 5, 24, 24);
882 o->tooltip("Scroll Bar");
883 o->box(FL_THIN_UP_BOX);
884 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Scrollbar"));
885 o->image(pixmap[38]);
886 } // Fl_Button* o
887 { Fl_Button* o = new Fl_Button(282, 5, 24, 24);
888 o->tooltip("Value Slider");
889 o->box(FL_THIN_UP_BOX);
890 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Value_Slider"));
891 o->image(pixmap[39]);
892 } // Fl_Button* o
893 { Fl_Button* o = new Fl_Button(307, 5, 24, 24);
894 o->tooltip("Value Output");
895 o->box(FL_THIN_UP_BOX);
896 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Value_Output"));
897 o->image(pixmap[45]);
898 } // Fl_Button* o
899 { Fl_Button* o = new Fl_Button(232, 30, 24, 24);
900 o->tooltip("Adjuster");
901 o->box(FL_THIN_UP_BOX);
902 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Adjuster"));
903 o->image(pixmap[40]);
904 } // Fl_Button* o
905 { Fl_Button* o = new Fl_Button(257, 30, 24, 24);
906 o->tooltip("Counter");
907 o->box(FL_THIN_UP_BOX);
908 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Counter"));
909 o->image(pixmap[41]);
910 } // Fl_Button* o
911 { Fl_Button* o = new Fl_Button(282, 30, 24, 24);
912 o->tooltip("Dial");
913 o->box(FL_THIN_UP_BOX);
914 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Dial"));
915 o->image(pixmap[42]);
916 } // Fl_Button* o
917 { Fl_Button* o = new Fl_Button(232, 55, 24, 24);
918 o->tooltip("Roller");
919 o->box(FL_THIN_UP_BOX);
920 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Roller"));
921 o->image(pixmap[43]);
922 } // Fl_Button* o
923 { Fl_Button* o = new Fl_Button(257, 55, 24, 24);
924 o->tooltip("Spinner");
925 o->box(FL_THIN_UP_BOX);
926 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Spinner"));
927 o->image(pixmap[47]);
928 } // Fl_Button* o
929 { Fl_Button* o = new Fl_Button(282, 55, 24, 24);
930 o->tooltip("Value Input");
931 o->box(FL_THIN_UP_BOX);
932 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Value_Input"));
933 o->image(pixmap[44]);
934 } // Fl_Button* o
935 o->end();
936 } // Fl_Group* o
937 { Fl_Group* o = new Fl_Group(339, 3, 54, 79);
938 { Fl_Button* o = new Fl_Button(341, 5, 24, 24);
939 o->tooltip("Input");
940 o->box(FL_THIN_UP_BOX);
941 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Input"));
942 o->image(pixmap[14]);
943 } // Fl_Button* o
944 { Fl_Button* o = new Fl_Button(366, 5, 24, 24);
945 o->tooltip("Output");
946 o->box(FL_THIN_UP_BOX);
947 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Output"));
948 o->image(pixmap[27]);
949 } // Fl_Button* o
950 { Fl_Button* o = new Fl_Button(341, 30, 24, 24);
951 o->tooltip("Text Edit");
952 o->box(FL_THIN_UP_BOX);
953 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Text_Editor"));
954 o->image(pixmap[29]);
955 } // Fl_Button* o
956 { Fl_Button* o = new Fl_Button(366, 30, 24, 24);
957 o->tooltip("Text Display");
958 o->box(FL_THIN_UP_BOX);
959 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Text_Display"));
960 o->image(pixmap[28]);
961 } // Fl_Button* o
962 { Fl_Button* o = new Fl_Button(341, 55, 24, 24);
963 o->tooltip("File Input");
964 o->box(FL_THIN_UP_BOX);
965 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_File_Input"));
966 o->image(pixmap[30]);
967 } // Fl_Button* o
968 o->end();
969 } // Fl_Group* o
970 { Fl_Group* o = new Fl_Group(398, 3, 54, 79);
971 { Fl_Button* o = new Fl_Button(400, 5, 24, 24);
972 o->tooltip("Menu Bar");
973 o->box(FL_THIN_UP_BOX);
974 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Menu_Bar"));
975 o->image(pixmap[17]);
976 } // Fl_Button* o
977 { Fl_Button* o = new Fl_Button(425, 5, 24, 24);
978 o->tooltip("Input Choice");
979 o->box(FL_THIN_UP_BOX);
980 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Input_Choice"));
981 o->image(pixmap[15]);
982 } // Fl_Button* o
983 { Fl_Button* o = new Fl_Button(400, 30, 24, 24);
984 o->tooltip("Menu Button");
985 o->box(FL_THIN_UP_BOX);
986 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Menu_Button"));
987 o->image(pixmap[26]);
988 } // Fl_Button* o
989 { Fl_Button* o = new Fl_Button(425, 30, 24, 24);
990 o->tooltip("Menu Item");
991 o->box(FL_THIN_UP_BOX);
992 o->callback((Fl_Callback*)type_make_cb, (void*)("menuitem"));
993 o->image(pixmap[16]);
994 } // Fl_Button* o
995 { Fl_Button* o = new Fl_Button(400, 55, 24, 24);
996 o->tooltip("Choice");
997 o->box(FL_THIN_UP_BOX);
998 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Choice"));
999 o->image(pixmap[15]);
1000 } // Fl_Button* o
1001 { Fl_Button* o = new Fl_Button(425, 55, 24, 24);
1002 o->tooltip("Sub Menu");
1003 o->box(FL_THIN_UP_BOX);
1004 o->callback((Fl_Callback*)type_make_cb, (void*)("submenu"));
1005 o->image(pixmap[18]);
1006 } // Fl_Button* o
1007 o->end();
1008 } // Fl_Group* o
1009 { Fl_Group* o = new Fl_Group(457, 3, 54, 79);
1010 { Fl_Button* o = new Fl_Button(459, 5, 24, 24);
1011 o->tooltip("Browser");
1012 o->box(FL_THIN_UP_BOX);
1013 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Browser"));
1014 o->image(pixmap[31]);
1015 } // Fl_Button* o
1016 { Fl_Button* o = new Fl_Button(484, 5, 24, 24);
1017 o->tooltip("Tree");
1018 o->box(FL_THIN_UP_BOX);
1019 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Tree"));
1020 o->image(pixmap[50]);
1021 } // Fl_Button* o
1022 { Fl_Button* o = new Fl_Button(459, 30, 24, 24);
1023 o->tooltip("Check Browser");
1024 o->box(FL_THIN_UP_BOX);
1025 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Check_Browser"));
1026 o->image(pixmap[32]);
1027 } // Fl_Button* o
1028 { Fl_Button* o = new Fl_Button(459, 55, 24, 24);
1029 o->tooltip("File Browser");
1030 o->box(FL_THIN_UP_BOX);
1031 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_File_Browser"));
1032 o->image(pixmap[33]);
1033 } // Fl_Button* o
1034 o->end();
1035 } // Fl_Group* o
1036 { Fl_Group* o = new Fl_Group(515, 3, 55, 79);
1037 { Fl_Button* o = new Fl_Button(517, 5, 24, 24);
1038 o->tooltip("Box");
1039 o->box(FL_THIN_UP_BOX);
1040 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Box"));
1041 o->image(pixmap[5]);
1042 } // Fl_Button* o
1043 { Fl_Button* o = new Fl_Button(542, 5, 24, 24);
1044 o->tooltip("Clock");
1045 o->box(FL_THIN_UP_BOX);
1046 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Clock"));
1047 o->image(pixmap[34]);
1048 } // Fl_Button* o
1049 { Fl_Button* o = new Fl_Button(517, 30, 24, 24);
1050 o->tooltip("Help Browser");
1051 o->box(FL_THIN_UP_BOX);
1052 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Help_View"));
1053 o->image(pixmap[35]);
1054 } // Fl_Button* o
1055 { Fl_Button* o = new Fl_Button(517, 55, 24, 24);
1056 o->tooltip("Progress");
1057 o->box(FL_THIN_UP_BOX);
1058 o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Progress"));
1059 o->image(pixmap[36]);
1060 } // Fl_Button* o
1061 o->end();
1062 } // Fl_Group* o
1063 widgetbin_panel->set_non_modal();
1064 widgetbin_panel->end();
1065 } // Fl_Window* widgetbin_panel
1066 return widgetbin_panel;
1067 }
1068
1069 Fl_Double_Window *sourceview_panel=(Fl_Double_Window *)0;
1070
1071 Fl_Tabs *sv_tab=(Fl_Tabs *)0;
1072
1073 CodeViewer *sv_source=(CodeViewer *)0;
1074
1075 CodeViewer *sv_header=(CodeViewer *)0;
1076
1077 Fl_Light_Button *sv_autorefresh=(Fl_Light_Button *)0;
1078
1079 Fl_Light_Button *sv_autoposition=(Fl_Light_Button *)0;
1080
make_sourceview()1081 Fl_Double_Window* make_sourceview() {
1082 { sourceview_panel = new Fl_Double_Window(520, 490, "Code View");
1083 sourceview_panel->callback((Fl_Callback*)toggle_sourceview_cb);
1084 sourceview_panel->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
1085 { sv_tab = new Fl_Tabs(10, 10, 500, 440);
1086 sv_tab->selection_color((Fl_Color)4);
1087 sv_tab->labelcolor(FL_BACKGROUND2_COLOR);
1088 sv_tab->callback((Fl_Callback*)update_sourceview_position_cb);
1089 { Fl_Group* o = new Fl_Group(10, 35, 500, 415, "Source");
1090 o->labelsize(13);
1091 { CodeViewer* o = sv_source = new CodeViewer(20, 50, 480, 390);
1092 sv_source->box(FL_DOWN_FRAME);
1093 sv_source->color(FL_BACKGROUND2_COLOR);
1094 sv_source->selection_color(FL_SELECTION_COLOR);
1095 sv_source->labeltype(FL_NORMAL_LABEL);
1096 sv_source->labelfont(0);
1097 sv_source->labelsize(14);
1098 sv_source->labelcolor(FL_FOREGROUND_COLOR);
1099 sv_source->textfont(4);
1100 sv_source->textsize(11);
1101 sv_source->align(Fl_Align(FL_ALIGN_TOP));
1102 sv_source->when(FL_WHEN_RELEASE);
1103 Fl_Group::current()->resizable(sv_source);
1104 o->linenumber_width(60);
1105 o->linenumber_size(o->Fl_Text_Display::textsize());
1106 } // CodeViewer* sv_source
1107 o->end();
1108 Fl_Group::current()->resizable(o);
1109 } // Fl_Group* o
1110 { Fl_Group* o = new Fl_Group(10, 35, 500, 415, "Header");
1111 o->labelsize(13);
1112 o->hide();
1113 { CodeViewer* o = sv_header = new CodeViewer(20, 50, 480, 390);
1114 sv_header->box(FL_DOWN_FRAME);
1115 sv_header->color(FL_BACKGROUND2_COLOR);
1116 sv_header->selection_color(FL_SELECTION_COLOR);
1117 sv_header->labeltype(FL_NORMAL_LABEL);
1118 sv_header->labelfont(0);
1119 sv_header->labelsize(14);
1120 sv_header->labelcolor(FL_FOREGROUND_COLOR);
1121 sv_header->textfont(4);
1122 sv_header->textsize(11);
1123 sv_header->align(Fl_Align(FL_ALIGN_TOP));
1124 sv_header->when(FL_WHEN_RELEASE);
1125 Fl_Group::current()->resizable(sv_header);
1126 o->linenumber_width(60);
1127 o->linenumber_size(o->Fl_Text_Display::textsize());
1128 } // CodeViewer* sv_header
1129 o->end();
1130 } // Fl_Group* o
1131 sv_tab->end();
1132 Fl_Group::current()->resizable(sv_tab);
1133 } // Fl_Tabs* sv_tab
1134 { Fl_Group* o = new Fl_Group(10, 460, 500, 20);
1135 { Fl_Button* o = new Fl_Button(10, 460, 61, 20, "Refresh");
1136 o->labelsize(11);
1137 o->callback((Fl_Callback*)update_sourceview_cb);
1138 } // Fl_Button* o
1139 { Fl_Light_Button* o = sv_autorefresh = new Fl_Light_Button(76, 460, 91, 20, "Auto-Refresh");
1140 sv_autorefresh->labelsize(11);
1141 o->callback((Fl_Callback*)update_sourceview_cb);
1142 } // Fl_Light_Button* sv_autorefresh
1143 { sv_autoposition = new Fl_Light_Button(172, 460, 89, 20, "Auto-Position");
1144 sv_autoposition->labelsize(11);
1145 } // Fl_Light_Button* sv_autoposition
1146 { Fl_Button* o = new Fl_Button(460, 460, 50, 20, "Close");
1147 o->labelsize(11);
1148 o->callback((Fl_Callback*)toggle_sourceview_b_cb);
1149 } // Fl_Button* o
1150 { Fl_Box* o = new Fl_Box(265, 460, 190, 20);
1151 Fl_Group::current()->resizable(o);
1152 } // Fl_Box* o
1153 o->end();
1154 } // Fl_Group* o
1155 sourceview_panel->size_range(384, 120);
1156 sourceview_panel->end();
1157 } // Fl_Double_Window* sourceview_panel
1158 return sourceview_panel;
1159 }
1160
1161 //
1162 // End of "$Id$".
1163 //
1164