1 # data file for the Fltk User Interface Designer (fluid)
6 // "$Id: alignment_panel.fl 8089 2010-12-20 22:19:24Z matt $"
8 // Setting and shell dialogs for the Fast Light Tool Kit (FLTK).
10 // Copyright 1998-2010 by Bill Spitzak and others.
12 // This library is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU Library General Public
14 // License as published by the Free Software Foundation; either
15 // version 2 of the License, or (at your option) any later version.
17 // This library is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 // Library General Public License for more details.
22 // You should have received a copy of the GNU Library General Public
23 // License along with this library; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
27 // Please report all bugs and problems on the following page:
29 // http://www.fltk.org/str.php
31 } {in_source in_header
34 decl {\#include <FL/Fl_Text_Buffer.H>} {public local
37 decl {\#include <FL/Fl_Text_Display.H>} {public local
40 decl {\#include <FL/filename.H>} {public local
43 decl {\#include <FL/Fl_Preferences.H>} {private global
46 decl {\#include <FL/fl_ask.H>} {private global
49 decl {extern void load_history();} {public local
52 decl {extern void redraw_browser();} {public local
55 decl {extern int show_comments;} {public local
58 decl {extern int show_coredevmenus;} {public local
61 decl {extern struct Fl_Menu_Item *dbmanager_item;} {public local
64 decl {extern Fl_Preferences fluid_prefs;} {public local
67 decl {Fl_Text_Buffer *shell_run_buffer;} {public local
70 Function {make_project_window()} {} {
71 Fl_Window project_window {
72 label {Project Settings} open
73 xywh {393 460 399 252} type Double
74 code0 {\#include <FL/Fl_Preferences.H>}
75 code1 {\#include <FL/Fl_Tooltip.H>} modal visible
79 callback {project_window->hide();}
80 tooltip {Close this dialog.} xywh {328 216 60 25}
83 xywh {10 10 378 195} selection_color 12
87 xywh {10 36 378 169} hide
90 label {Use "name.ext" to set a file name or just ".ext" to set extension.}
91 xywh {100 49 236 49} align 144
93 Fl_Input header_file_input {
95 user_data 1 user_data_type {void*}
96 callback header_input_cb
97 tooltip {The name of the generated header file.} xywh {99 103 272 20} box THIN_DOWN_BOX labelfont 1 when 1 textfont 4
99 Fl_Input code_file_input {
101 user_data 1 user_data_type {void*}
102 callback code_input_cb
103 tooltip {The name of the generated code file.} xywh {100 128 272 20} box THIN_DOWN_BOX labelfont 1 when 1 textfont 4
105 Fl_Check_Button include_H_from_C_button {
106 label {Include Header from Code}
107 callback include_H_from_C_button_cb
108 tooltip {Include the header file from the code file.} xywh {100 153 272 20} down_box DOWN_BOX
110 Fl_Check_Button use_FL_COMMAND_button {
111 label {Menu shortcuts use FL_COMMAND}
112 callback use_FL_COMMAND_button_cb
113 tooltip {Replace FL_CTRL with FL_COMMAND when generating menu shortcut code.} xywh {100 176 272 20} down_box DOWN_BOX
117 label Internationalization open
120 Fl_Choice i18n_type_chooser {
122 callback i18n_type_cb open
123 tooltip {Type of internationalization to use.} xywh {100 48 136 25} box THIN_UP_BOX down_box BORDER_BOX labelfont 1
134 label {POSIX catgets}
138 Fl_Input i18n_include_input {
140 callback i18n_text_cb
141 tooltip {The include file for internationalization.} xywh {100 78 272 20} box THIN_DOWN_BOX labelfont 1 textfont 4
143 Fl_Input i18n_file_input {
145 callback i18n_text_cb
146 tooltip {The name of the message catalog.} xywh {100 104 272 20} box THIN_DOWN_BOX labelfont 1 textfont 4
148 Fl_Input i18n_set_input {
151 tooltip {The message set number.} xywh {100 128 272 20} type Int box THIN_DOWN_BOX labelfont 1 textfont 4
153 Fl_Input i18n_function_input {
155 callback i18n_text_cb
156 tooltip {The function to call to internationalize the labels and tooltips.} xywh {100 103 272 20} box THIN_DOWN_BOX labelfont 1 textfont 4
163 decl {extern void i18n_cb(Fl_Choice *,void *);} {public local
166 decl {void scheme_cb(Fl_Choice *, void *);} {public local
169 Function {make_settings_window()} {} {
170 Fl_Window settings_window {
171 label {GUI Settings} open
172 xywh {393 191 339 241} type Double non_modal visible
174 Fl_Choice scheme_choice {
176 callback scheme_cb open
177 xywh {116 10 115 25} down_box BORDER_BOX labelfont 1
179 code1 {fluid_prefs.get("scheme", s, 0);}
180 code2 {scheme_choice->value(s);}
181 code3 {scheme_cb(0, 0);}
201 xywh {116 43 220 126} labelfont 1 align 0
205 xywh {116 43 1 25} labelfont 1 align 4
207 Fl_Check_Button tooltips_button {
208 label {Show Tooltips}
209 callback {Fl_Tooltip::enable(tooltips_button->value());
210 fluid_prefs.set("show_tooltips", tooltips_button->value());}
211 xywh {116 43 113 25} down_box DOWN_BOX
213 code1 {fluid_prefs.get("show_tooltips", b, 1);}
214 code2 {tooltips_button->value(b);}
215 code3 {Fl_Tooltip::enable(b);}
217 Fl_Check_Button completion_button {
218 label {Show Completion Dialogs}
219 callback {fluid_prefs.set("show_completion_dialogs", completion_button->value());}
220 xywh {116 68 186 25} down_box DOWN_BOX
222 code1 {fluid_prefs.get("show_completion_dialogs", b, 1);}
223 code2 {completion_button->value(b);}
225 Fl_Check_Button openlast_button {
226 label {Open Previous File on Startup}
227 callback {fluid_prefs.set("open_previous_file", openlast_button->value());}
228 xywh {116 93 214 25} down_box DOWN_BOX
230 code1 {fluid_prefs.get("open_previous_file", b, 0);}
231 code2 {openlast_button->value(b);}
233 Fl_Check_Button prevpos_button {
234 label {Remember Window Positions}
235 callback {fluid_prefs.set("prev_window_pos", prevpos_button->value());}
236 xywh {116 118 209 25} down_box DOWN_BOX
238 code1 {fluid_prefs.get("prev_window_pos", b, 1);}
239 code2 {prevpos_button->value(b);}
241 Fl_Check_Button show_comments_button {
242 label {Show Comments in Browser}
243 callback {show_comments = show_comments_button->value();
244 fluid_prefs.set("show_comments", show_comments);
246 xywh {116 143 209 25} down_box DOWN_BOX
247 code1 {fluid_prefs.get("show_comments", show_comments, 1);}
248 code2 {show_comments_button->value(show_comments);}
251 Fl_Spinner recent_spinner {
252 label {\# Recent Files: }
253 callback {fluid_prefs.set("recent_files", recent_spinner->value());
255 xywh {115 173 40 25} labelfont 1 when 1
257 code1 {fluid_prefs.get("recent_files", c, 5);}
258 code2 {recent_spinner->maximum(10);}
259 code3 {recent_spinner->value(c);}
263 callback {settings_window->hide();}
264 tooltip {Close this dialog.} xywh {266 205 64 25}
269 Function {make_shell_window()} {} {
270 Fl_Window shell_window {
271 label {Shell Command} open
272 xywh {741 195 365 125} type Double visible
274 Fl_Input shell_command_input {
276 callback {fluid_prefs.set("shell_command", shell_command_input->value());}
277 xywh {10 27 347 25} labelfont 1 align 5
278 code0 {char buf[1024];}
279 code1 {fluid_prefs.get("shell_command", buf, "", sizeof(buf));}
280 code2 {shell_command_input->value(buf);}
282 Fl_Check_Button shell_writecode_button {
284 callback {fluid_prefs.set("shell_writecode", shell_writecode_button->value());}
285 xywh {128 61 93 19} down_box DOWN_BOX
287 code1 {fluid_prefs.get("shell_writecode", b, 1);}
288 code2 {shell_writecode_button->value(b);}
290 Fl_Check_Button shell_writemsgs_button {
291 label {Write Messages}
292 callback {fluid_prefs.set("shell_writemsgs", shell_writemsgs_button->value());}
293 xywh {231 61 126 19} down_box DOWN_BOX
295 code1 {fluid_prefs.get("shell_writemsgs", b, 0);}
296 code2 {shell_writemsgs_button->value(b);}
298 Fl_Check_Button shell_savefl_button {
299 label {Save .FL File}
300 callback {fluid_prefs.set("shell_savefl", shell_savefl_button->value());}
301 xywh {10 62 108 19} down_box DOWN_BOX
303 code1 {fluid_prefs.get("shell_savefl", b, 1);}
304 code2 {shell_savefl_button->value(b);}
306 Fl_Return_Button {} {
308 callback do_shell_command
313 callback {shell_window->hide();}
317 Fl_Window shell_run_window {
318 label {Shell Command Output}
319 xywh {592 332 555 430} type Double hide resizable
321 Fl_Text_Display shell_run_display {
322 xywh {10 10 535 375} box DOWN_BOX textfont 4 resizable
323 code0 {shell_run_buffer = new Fl_Text_Buffer();}
324 code1 {shell_run_display->buffer(shell_run_buffer);}
326 Fl_Return_Button shell_run_button {
328 callback {shell_run_window->hide();}
334 Function {make_layout_window()} {} {
335 Fl_Window grid_window {
336 label {Layout Settings} open
337 xywh {760 427 285 245} type Double non_modal visible
339 Fl_Input horizontal_input {
341 user_data 1 user_data_type long
343 tooltip {Horizontal grid spacing.} xywh {106 10 50 25} type Int box THIN_DOWN_BOX align 8
344 code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
346 Fl_Input vertical_input {
348 user_data 2 user_data_type long
350 tooltip {Vertical grid spacing.} xywh {166 10 50 25} type Int box THIN_DOWN_BOX align 8
351 code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
353 Fl_Input snap_input {
355 user_data 3 user_data_type long
357 tooltip {Snap to grid within this many pixels.} xywh {106 45 50 25} type Int box THIN_DOWN_BOX align 8
358 code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
360 Fl_Check_Button guides_toggle {
362 user_data 4 user_data_type long
364 tooltip {Show distance and alignment guides in overlay} xywh {106 80 110 25} down_box DOWN_BOX
368 callback {grid_window->hide();}
369 tooltip {Close this dialog.} xywh {215 210 60 25}
373 xywh {26 10 70 25} labelfont 1 align 24
377 xywh {-1 115 97 25} labelfont 1 align 24
380 xywh {105 115 170 75}
382 Fl_Round_Button {def_widget_size[0]} {
383 user_data 8 user_data_type long
384 callback default_widget_size_cb
385 xywh {105 115 70 25} type Radio down_box ROUND_DOWN_BOX
389 xywh {120 115 50 25} labelsize 8 align 20
391 Fl_Round_Button {def_widget_size[1]} {
392 user_data 11 user_data_type long
393 callback default_widget_size_cb
394 xywh {180 115 70 25} type Radio down_box ROUND_DOWN_BOX
398 xywh {195 115 50 25} labelsize 11 align 20
400 Fl_Round_Button {def_widget_size[2]} {
401 user_data 14 user_data_type long
402 callback default_widget_size_cb
403 xywh {105 140 70 25} type Radio down_box ROUND_DOWN_BOX
407 xywh {120 140 50 25} align 20
409 Fl_Round_Button {def_widget_size[3]} {
410 user_data 18 user_data_type long
411 callback default_widget_size_cb
412 xywh {180 140 90 25} type Radio down_box ROUND_DOWN_BOX
416 xywh {195 140 68 25} labelsize 18 align 20
418 Fl_Round_Button {def_widget_size[4]} {
419 user_data 24 user_data_type long
420 callback default_widget_size_cb
421 xywh {105 165 75 25} type Radio down_box ROUND_DOWN_BOX
425 xywh {120 165 64 25} labelsize 24 align 20
427 Fl_Round_Button {def_widget_size[5]} {
428 user_data 32 user_data_type long
429 callback default_widget_size_cb
430 xywh {180 165 95 25} type Radio down_box ROUND_DOWN_BOX
434 xywh {195 165 76 25} labelsize 32 align 20
440 decl {int opt[10][2];} {
441 comment {Copy of all options in user and system mode} private local
444 Function {refreshUI()} {
445 comment {Update the UI using the values in the opt array} private return_type void
447 code {int mode = wUserOrSystem->value();
448 wVisibleFocus->value(opt[Fl::OPTION_VISIBLE_FOCUS][mode]);
449 wArrowFocus->value(opt[Fl::OPTION_ARROW_FOCUS][mode]);
450 wShowTooltips->value(opt[Fl::OPTION_SHOW_TOOLTIPS][mode]);
451 wDNDText->value(opt[Fl::OPTION_DND_TEXT][mode]);} {}
454 Function {readPrefs()} {
455 comment {read all preferences and refresh the GUI} private return_type void
457 code {// read all preferences and refresh the GUI
459 Fl_Preferences prefs(Fl_Preferences::SYSTEM, "fltk.org", "fltk");
460 Fl_Preferences opt_prefs(prefs, "options");
461 opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1], 2);
462 opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1], 2);
463 opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][1], 2);
464 opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1], 2);
467 Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk");
468 Fl_Preferences opt_prefs(prefs, "options");
469 opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0], 2);
470 opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0], 2);
471 opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][0], 2);
472 opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0], 2);
477 Function {writePrefs()} {
478 comment {write all preferences using the array} private return_type void
480 code {// write all preferences using the array
482 Fl_Preferences prefs(Fl_Preferences::SYSTEM, "fltk.org", "fltk");
483 Fl_Preferences opt_prefs(prefs, "options");
484 if (opt[Fl::OPTION_ARROW_FOCUS][1]==2) opt_prefs.deleteEntry("ArrowFocus");
485 else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1]);
486 if (opt[Fl::OPTION_VISIBLE_FOCUS][1]==2) opt_prefs.deleteEntry("VisibleFocus");
487 else opt_prefs.set("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1]);
488 if (opt[Fl::OPTION_DND_TEXT][1]==2) opt_prefs.deleteEntry("DNDText");
489 else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][1]);
490 if (opt[Fl::OPTION_SHOW_TOOLTIPS][1]==2) opt_prefs.deleteEntry("ShowTooltips");
491 else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1]);
494 Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk");
495 Fl_Preferences opt_prefs(prefs, "options");
496 if (opt[Fl::OPTION_ARROW_FOCUS][0]==2) opt_prefs.deleteEntry("ArrowFocus");
497 else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0]);
498 if (opt[Fl::OPTION_VISIBLE_FOCUS][0]==2) opt_prefs.deleteEntry("VisibleFocus");
499 else opt_prefs.set("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0]);
500 if (opt[Fl::OPTION_DND_TEXT][0]==2) opt_prefs.deleteEntry("DNDText");
501 else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][0]);
502 if (opt[Fl::OPTION_SHOW_TOOLTIPS][0]==2) opt_prefs.deleteEntry("ShowTooltips");
503 else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0]);
507 Function {show_global_settings_window()} {open return_type void
509 code {if (!global_settings_window)
510 make_global_settings_window();
515 "The following dialog changes the user interface behavior\\n"
516 "of ALL FLTK applications, for the current user, or for \\n"
517 "ALL users on this machine.\\n\\n"
518 "Please choose these settings carefully, or reset\\n"
519 "user and system settings to \\"default\\".");
520 global_settings_window->show();} {selected
524 Function {make_global_settings_window()} {} {
525 Fl_Window global_settings_window {
526 label {FLTK Preferences} open
527 xywh {444 220 403 317} type Double color 50 visible
530 label {Keyboard Focus Options} open
531 xywh {10 10 380 100} box GTK_DOWN_BOX labelfont 2 align 21
533 Fl_Choice wVisibleFocus {
534 label {Visible Keyboard Focus:}
535 callback {int mode = wUserOrSystem->value();
536 opt[Fl::OPTION_VISIBLE_FOCUS][mode] = wVisibleFocus->value();} open
537 tooltip {OPTION_VISIBLE_FOCUS
539 If visible focus is switched on, FLTK will draw a dotted rectangle inside the widget that will receive the next keystroke. If switched off, no such indicator will be drawn and keyboard navigation is disabled.
541 Default is on.} xywh {245 40 100 25} down_box BORDER_BOX
545 user_data 0 user_data_type long
550 user_data 1 user_data_type long
551 xywh {10 10 31 20} divider
555 user_data 2 user_data_type long
559 Fl_Choice wArrowFocus {
560 label {Arrow Keys move Focus:}
561 callback {int mode = wUserOrSystem->value();
562 opt[Fl::OPTION_ARROW_FOCUS][mode] = wArrowFocus->value();} open
563 tooltip {OPTION_ARROW_FOCUS
565 When switched on, moving the text cursor beyond the start or end of the text in a text widget will change focus to the next widget. When switched off, the cursor will stop at the end of the text. Pressing Tab or Ctrl-Tab will advance the keyboard focus. Switch this on, if you want the old behavior of FLTK 1.1.
567 Default is off.} xywh {245 75 100 25} down_box BORDER_BOX
571 user_data 0 user_data_type long
576 user_data 1 user_data_type long
577 xywh {0 0 31 20} divider
581 user_data 2 user_data_type long
587 label {Tooltip Options} open
588 xywh {10 120 380 65} box GTK_DOWN_BOX labelfont 2 align 21
590 Fl_Choice wShowTooltips {
591 label {Show Tooltips:}
592 callback {int mode = wUserOrSystem->value();
593 opt[Fl::OPTION_SHOW_TOOLTIPS][mode] = wShowTooltips->value();} open
594 tooltip {OPTION_SHOW_TOOLTIPS
596 If tooltips are enabled, hovering the mouse over a widget with a tooltip text will open a little tooltip window until the mouse leaves the widget. If disabled, no tooltip is shown.
598 Default is on.} xywh {245 150 100 25} down_box BORDER_BOX
602 user_data 0 user_data_type long
607 user_data 1 user_data_type long
608 xywh {10 10 31 20} divider
612 user_data 2 user_data_type long
618 label {Drag And Drop Options} open
619 xywh {10 194 380 66} box GTK_DOWN_BOX labelfont 2 align 21
622 label {Allow dragging Text:}
623 callback {int mode = wUserOrSystem->value();
624 opt[Fl::OPTION_DND_TEXT][mode] = wDNDText->value();} open
625 tooltip {OPTION_DND_TEXT
627 If text drag-and-drop is enabled, the user can select and drag text from any text widget. If disabled, no dragging is possible, however dropping text from other applications still works.
629 Default is on.} xywh {245 225 100 25} down_box BORDER_BOX
633 user_data 0 user_data_type long
638 user_data 1 user_data_type long
639 xywh {30 30 31 20} divider
643 user_data 2 user_data_type long
648 Fl_Choice wUserOrSystem {
649 callback {refreshUI();} open
650 tooltip {Change settings for the current user, or default values for all users of this computer. Individual users can override system options, if they set their options to specific values (not 'default').} xywh {14 275 141 25} down_box BORDER_BOX
653 label {User Settings}
654 user_data 0 user_data_type long
658 label {System Settings}
659 user_data 1 user_data_type long
665 callback {global_settings_window->hide();}
670 callback {writePrefs();
671 global_settings_window->hide();}
676 Fl::option(Fl::OPTION_SHOW_TOOLTIPS,1); // make sure tooltips are on !} {}
681 // End of "$Id: alignment_panel.fl 8089 2010-12-20 22:19:24Z matt $".
682 //} {in_source in_header