1998-10-06 22:21:25 +04:00
# data file for the Fltk User Interface Designer (fluid)
2016-01-30 03:56:42 +03:00
version 1.0400
2015-07-09 05:09:33 +03:00
header_name {.h}
2002-04-30 22:11:49 +04:00
code_name {.cxx}
2005-03-18 09:29:11 +03:00
comment {//
// Setting and shell dialogs for the Fast Light Tool Kit (FLTK).
//
2020-04-06 21:04:16 +03:00
// Copyright 1998-2020 by Bill Spitzak and others.
2005-03-18 09:29:11 +03:00
//
2011-07-19 08:49:30 +04:00
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
2005-03-18 09:29:11 +03:00
//
2020-04-06 21:04:16 +03:00
// https://www.fltk.org/COPYING.php
2005-03-18 09:29:11 +03:00
//
2020-07-01 19:03:10 +03:00
// Please see the following page on how to report bugs and issues:
2005-03-18 09:29:11 +03:00
//
2020-07-01 19:03:10 +03:00
// https://www.fltk.org/bugs.php
2005-03-18 09:29:11 +03:00
//
} {in_source in_header
2015-07-09 05:09:33 +03:00
}
2005-03-18 09:29:11 +03:00
2010-02-28 01:38:25 +03:00
decl {\#include <FL/Fl_Text_Buffer.H>} {public local
2015-07-09 05:09:33 +03:00
}
2003-04-01 23:58:08 +04:00
2010-02-28 01:38:25 +03:00
decl {\#include <FL/Fl_Text_Display.H>} {public local
2015-07-09 05:09:33 +03:00
}
2003-04-01 23:58:08 +04:00
2010-12-20 15:21:24 +03:00
decl {\#include <FL/filename.H>} {public local
2015-07-09 05:09:33 +03:00
}
2010-12-20 00:20:10 +03:00
2010-12-21 01:19:24 +03:00
decl {\#include <FL/Fl_Preferences.H>} {private global
2015-07-09 05:09:33 +03:00
}
2010-12-21 01:19:24 +03:00
decl {\#include <FL/fl_ask.H>} {private global
2015-07-09 05:09:33 +03:00
}
2010-12-21 01:19:24 +03:00
2019-01-14 02:09:31 +03:00
decl {\#include <string.h>} {private global
2018-10-22 04:04:57 +03:00
}
2010-02-28 01:38:25 +03:00
decl {extern void load_history();} {public local
2015-07-09 05:09:33 +03:00
}
2005-03-24 20:45:50 +03:00
2010-02-28 01:38:25 +03:00
decl {extern void redraw_browser();} {public local
2015-07-09 05:09:33 +03:00
}
2008-09-19 01:11:28 +04:00
2010-02-28 01:38:25 +03:00
decl {extern int show_comments;} {public local
2015-07-09 05:09:33 +03:00
}
2008-09-19 01:11:28 +04:00
2016-07-19 00:12:25 +03:00
decl {extern int G_use_external_editor;} {public local
}
decl {extern char G_external_editor_command[512];} {public local
}
2010-02-28 01:38:25 +03:00
decl {extern int show_coredevmenus;} {public local
2015-07-09 05:09:33 +03:00
}
2010-02-28 01:38:25 +03:00
2010-03-22 01:55:18 +03:00
decl {extern struct Fl_Menu_Item *dbmanager_item;} {public local
2015-07-09 05:09:33 +03:00
}
2010-02-28 01:38:25 +03:00
2010-11-12 14:55:10 +03:00
decl {extern Fl_Preferences fluid_prefs;} {public local
2015-07-09 05:09:33 +03:00
}
2010-11-12 14:55:10 +03:00
2014-10-05 04:03:27 +04:00
Function {make_project_window()} {open
} {
2002-05-01 23:17:24 +04:00
Fl_Window project_window {
2010-11-12 14:55:10 +03:00
label {Project Settings} open
2016-09-20 16:31:38 +03:00
xywh {396 475 399 252} type Double hide
2002-05-01 14:36:08 +04:00
code0 {\#include <FL/Fl_Preferences.H>}
2016-09-20 16:31:38 +03:00
code1 {\#include <FL/Fl_Tooltip.H>} modal
1998-10-06 22:21:25 +04:00
} {
Fl_Button {} {
1999-01-27 00:59:41 +03:00
label Close
2002-05-31 23:27:56 +04:00
callback {project_window->hide();}
2010-11-12 14:55:10 +03:00
tooltip {Close this dialog.} xywh {328 216 60 25}
1998-10-06 22:21:25 +04:00
}
2005-09-09 15:36:36 +04:00
Fl_Tabs {} {open
2010-11-12 14:55:10 +03:00
xywh {10 10 378 195} selection_color 12
2000-04-24 22:22:50 +04:00
} {
2002-05-01 23:17:24 +04:00
Fl_Group {} {
2005-03-08 16:46:31 +03:00
label Output open
2010-11-12 14:55:10 +03:00
xywh {10 36 378 169} hide
2002-05-01 23:17:24 +04:00
} {
Fl_Box {} {
2010-11-12 14:55:10 +03:00
label {Use "name.ext" to set a file name or just ".ext" to set extension.}
2014-05-18 00:46:25 +04:00
xywh {20 49 340 49} align 148
2002-05-01 23:17:24 +04:00
}
Fl_Input header_file_input {
label {Header File:}
user_data 1 user_data_type {void*}
callback header_input_cb
2014-05-18 00:46:25 +04:00
tooltip {The name of the generated header file.} xywh {119 103 252 20} box THIN_DOWN_BOX labelfont 1 when 1 textfont 4
2002-05-01 23:17:24 +04:00
}
Fl_Input code_file_input {
label {Code File:}
user_data 1 user_data_type {void*}
callback code_input_cb
2014-05-18 00:46:25 +04:00
tooltip {The name of the generated code file.} xywh {119 128 252 20} box THIN_DOWN_BOX labelfont 1 when 1 textfont 4
2002-05-01 23:17:24 +04:00
}
2007-05-10 16:06:31 +04:00
Fl_Check_Button include_H_from_C_button {
2002-05-01 23:17:24 +04:00
label {Include Header from Code}
callback include_H_from_C_button_cb
2014-05-18 00:46:25 +04:00
tooltip {Include the header file from the code file.} xywh {117 153 272 20} down_box DOWN_BOX
2007-05-10 16:06:31 +04:00
}
Fl_Check_Button use_FL_COMMAND_button {
2010-11-12 14:55:10 +03:00
label {Menu shortcuts use FL_COMMAND}
2008-09-19 01:11:28 +04:00
callback use_FL_COMMAND_button_cb
2014-05-18 00:46:25 +04:00
tooltip {Replace FL_CTRL with FL_COMMAND when generating menu shortcut code.} xywh {117 176 272 20} down_box DOWN_BOX
2002-05-01 23:17:24 +04:00
}
2000-04-24 22:22:50 +04:00
}
2002-05-01 23:17:24 +04:00
Fl_Group {} {
label Internationalization open
2010-11-12 14:55:10 +03:00
xywh {10 36 378 169}
2002-05-01 23:17:24 +04:00
} {
Fl_Choice i18n_type_chooser {
label {Use:}
callback i18n_type_cb open
2010-11-12 14:55:10 +03:00
tooltip {Type of internationalization to use.} xywh {100 48 136 25} box THIN_UP_BOX down_box BORDER_BOX labelfont 1
2002-05-01 23:17:24 +04:00
} {
2005-03-20 03:51:02 +03:00
MenuItem {} {
2002-05-01 23:17:24 +04:00
label None
2010-11-12 14:55:10 +03:00
xywh {0 0 100 20}
2002-05-01 23:17:24 +04:00
}
2005-03-20 03:51:02 +03:00
MenuItem {} {
2010-12-20 00:20:10 +03:00
label {GNU gettext}
2010-11-12 14:55:10 +03:00
xywh {0 0 100 20}
2002-05-01 23:17:24 +04:00
}
2005-03-20 03:51:02 +03:00
MenuItem {} {
2002-05-01 23:17:24 +04:00
label {POSIX catgets}
2010-11-12 14:55:10 +03:00
xywh {0 0 100 20}
2002-05-01 23:17:24 +04:00
}
}
Fl_Input i18n_include_input {
label {\#include:}
2019-01-14 02:09:31 +03:00
callback i18n_text_cb
2010-11-12 14:55:10 +03:00
tooltip {The include file for internationalization.} xywh {100 78 272 20} box THIN_DOWN_BOX labelfont 1 textfont 4
2002-05-01 23:17:24 +04:00
}
Fl_Input i18n_file_input {
label {File:}
callback i18n_text_cb
2010-11-12 14:55:10 +03:00
tooltip {The name of the message catalog.} xywh {100 104 272 20} box THIN_DOWN_BOX labelfont 1 textfont 4
2002-05-01 23:17:24 +04:00
}
Fl_Input i18n_set_input {
label {Set:}
2010-12-21 01:19:24 +03:00
callback i18n_int_cb
2010-11-12 14:55:10 +03:00
tooltip {The message set number.} xywh {100 128 272 20} type Int box THIN_DOWN_BOX labelfont 1 textfont 4
2002-05-01 23:17:24 +04:00
}
Fl_Input i18n_function_input {
label {Function:}
callback i18n_text_cb
2010-11-12 14:55:10 +03:00
tooltip {The function to call to internationalize the labels and tooltips.} xywh {100 103 272 20} box THIN_DOWN_BOX labelfont 1 textfont 4
2005-03-08 16:46:31 +03:00
}
}
2000-04-24 22:22:50 +04:00
}
1998-10-06 22:21:25 +04:00
}
2015-07-09 05:09:33 +03:00
}
2000-04-24 22:22:50 +04:00
2010-02-28 01:38:25 +03:00
decl {extern void i18n_cb(Fl_Choice *,void *);} {public local
2015-07-09 05:09:33 +03:00
}
2002-04-30 22:11:49 +04:00
2010-02-28 01:38:25 +03:00
decl {void scheme_cb(Fl_Choice *, void *);} {public local
2015-07-09 05:09:33 +03:00
}
2005-03-20 03:51:02 +03:00
2010-11-12 14:55:10 +03:00
Function {make_settings_window()} {} {
2002-04-30 22:11:49 +04:00
Fl_Window settings_window {
2006-09-17 18:58:25 +04:00
label {GUI Settings} open
2016-09-20 16:31:38 +03:00
xywh {355 85 360 355} type Double hide resizable
code0 {o->size_range(o->w(), o->h());} non_modal
2002-04-30 22:11:49 +04:00
} {
2005-03-20 03:51:02 +03:00
Fl_Choice scheme_choice {
2010-02-28 01:38:25 +03:00
label {Scheme: }
2006-09-17 18:58:25 +04:00
callback scheme_cb open
2014-05-18 00:46:25 +04:00
xywh {140 10 115 25} down_box BORDER_BOX labelfont 1
2005-03-20 03:51:02 +03:00
code0 {int s;}
code1 {fluid_prefs.get("scheme", s, 0);}
code2 {scheme_choice->value(s);}
code3 {scheme_cb(0, 0);}
} {
MenuItem {} {
label Default
2005-11-04 01:16:52 +03:00
xywh {0 0 35 25}
2005-03-20 03:51:02 +03:00
}
MenuItem {} {
label None
2005-11-04 01:16:52 +03:00
xywh {0 0 35 25}
2005-03-20 03:51:02 +03:00
}
MenuItem {} {
label Plastic
2005-11-04 01:16:52 +03:00
xywh {0 0 35 25}
2005-03-20 03:51:02 +03:00
}
2006-09-17 18:58:25 +04:00
MenuItem {} {
label {GTK+}
xywh {10 10 35 25}
}
2014-02-25 08:24:41 +04:00
MenuItem {} {
2014-09-30 17:06:35 +04:00
label Gleam
2014-02-25 08:24:41 +04:00
xywh {20 20 35 25}
}
2005-03-19 11:38:21 +03:00
}
2010-11-12 14:55:10 +03:00
Fl_Group {} {open
2016-07-19 00:12:25 +03:00
xywh {20 43 330 161} labelfont 1 align 0
2005-03-20 03:51:02 +03:00
} {
2010-02-28 01:38:25 +03:00
Fl_Box {} {
label {Options: }
2014-05-18 00:46:25 +04:00
xywh {140 43 1 25} labelfont 1 align 4
2010-02-28 01:38:25 +03:00
}
2005-03-20 03:51:02 +03:00
Fl_Check_Button tooltips_button {
label {Show Tooltips}
callback {Fl_Tooltip::enable(tooltips_button->value());
fluid_prefs.set("show_tooltips", tooltips_button->value());}
2014-05-18 00:46:25 +04:00
xywh {138 43 113 25} down_box DOWN_BOX labelsize 12
2005-03-20 03:51:02 +03:00
code0 {int b;}
code1 {fluid_prefs.get("show_tooltips", b, 1);}
code2 {tooltips_button->value(b);}
code3 {Fl_Tooltip::enable(b);}
}
Fl_Check_Button completion_button {
label {Show Completion Dialogs}
callback {fluid_prefs.set("show_completion_dialogs", completion_button->value());}
2014-05-18 00:46:25 +04:00
xywh {138 68 186 25} down_box DOWN_BOX labelsize 12
2005-03-20 03:51:02 +03:00
code0 {int b;}
code1 {fluid_prefs.get("show_completion_dialogs", b, 1);}
code2 {completion_button->value(b);}
}
Fl_Check_Button openlast_button {
label {Open Previous File on Startup}
callback {fluid_prefs.set("open_previous_file", openlast_button->value());}
2014-05-18 00:46:25 +04:00
xywh {138 93 214 25} down_box DOWN_BOX labelsize 12
2005-03-20 03:51:02 +03:00
code0 {int b;}
code1 {fluid_prefs.get("open_previous_file", b, 0);}
code2 {openlast_button->value(b);}
}
Fl_Check_Button prevpos_button {
label {Remember Window Positions}
callback {fluid_prefs.set("prev_window_pos", prevpos_button->value());}
2014-05-18 00:46:25 +04:00
xywh {138 118 209 25} down_box DOWN_BOX labelsize 12
2005-03-20 03:51:02 +03:00
code0 {int b;}
code1 {fluid_prefs.get("prev_window_pos", b, 1);}
code2 {prevpos_button->value(b);}
}
2008-09-19 01:11:28 +04:00
Fl_Check_Button show_comments_button {
label {Show Comments in Browser}
callback {show_comments = show_comments_button->value();
fluid_prefs.set("show_comments", show_comments);
redraw_browser();}
2014-05-18 00:46:25 +04:00
xywh {138 143 209 25} down_box DOWN_BOX labelsize 12
2008-09-19 01:11:28 +04:00
code1 {fluid_prefs.get("show_comments", show_comments, 1);}
code2 {show_comments_button->value(show_comments);}
}
2005-03-24 20:45:50 +03:00
}
Fl_Spinner recent_spinner {
2010-02-28 01:38:25 +03:00
label {\# Recent Files: }
2005-03-24 20:45:50 +03:00
callback {fluid_prefs.set("recent_files", recent_spinner->value());
load_history();}
2014-05-18 00:46:25 +04:00
xywh {140 173 40 25} labelfont 1 when 1
2005-03-24 20:45:50 +03:00
code0 {int c;}
code1 {fluid_prefs.get("recent_files", c, 5);}
code2 {recent_spinner->maximum(10);}
code3 {recent_spinner->value(c);}
2002-04-30 22:11:49 +04:00
}
2016-07-19 00:12:25 +03:00
Fl_Group {} {open
xywh {10 210 337 95} box THIN_UP_BOX color 47 resizable
} {
Fl_Check_Button use_external_editor_button {
label {Use external editor?}
callback {G_use_external_editor = use_external_editor_button->value();
fluid_prefs.set("use_external_editor", G_use_external_editor);
redraw_browser();}
xywh {25 218 209 22} down_box DOWN_BOX labelsize 12
code1 {fluid_prefs.get("use_external_editor", G_use_external_editor, 0);}
code2 {use_external_editor_button->value(G_use_external_editor);}
}
Fl_Input editor_command_input {
label {Editor Command}
callback {strncpy(G_external_editor_command, editor_command_input->value(), sizeof(G_external_editor_command)-1);
G_external_editor_command[sizeof(G_external_editor_command)-1] = 0;
fluid_prefs.set("external_editor_command", G_external_editor_command);
2019-01-14 02:09:31 +03:00
redraw_browser();}
2016-07-19 00:12:25 +03:00
tooltip {The editor command to open your external text editor.
Include any necessary flags to ensure your editor does not background itself.
Examples:
gvim -f
gedit
emacs} xywh {25 264 305 21} labelsize 12 align 5 when 1 textsize 12
code1 {fluid_prefs.get("external_editor_command", G_external_editor_command, "", sizeof(G_external_editor_command)-1);}
code2 {editor_command_input->value(G_external_editor_command);}
}
}
2008-09-19 01:11:28 +04:00
Fl_Button {} {
label Close
callback {settings_window->hide();}
2016-07-19 00:12:25 +03:00
tooltip {Close this dialog.} xywh {285 320 64 25}
2008-09-19 01:11:28 +04:00
}
2002-04-30 22:11:49 +04:00
}
2015-07-09 05:09:33 +03:00
}
2002-05-01 14:36:08 +04:00
2019-01-14 02:09:31 +03:00
Function {make_shell_window()} {open
} {
2002-05-01 14:36:08 +04:00
Fl_Window shell_window {
2010-11-12 14:55:10 +03:00
label {Shell Command} open
2015-03-10 04:41:55 +03:00
xywh {761 190 365 125} type Double hide
2002-05-01 14:36:08 +04:00
} {
2005-03-19 11:38:21 +03:00
Fl_Input shell_command_input {
label {Command:}
callback {fluid_prefs.set("shell_command", shell_command_input->value());}
xywh {10 27 347 25} labelfont 1 align 5
code0 {char buf[1024];}
code1 {fluid_prefs.get("shell_command", buf, "", sizeof(buf));}
code2 {shell_command_input->value(buf);}
2002-05-01 14:36:08 +04:00
}
2005-03-19 11:38:21 +03:00
Fl_Check_Button shell_writecode_button {
label {Write Code}
callback {fluid_prefs.set("shell_writecode", shell_writecode_button->value());}
xywh {128 61 93 19} down_box DOWN_BOX
code0 {int b;}
code1 {fluid_prefs.get("shell_writecode", b, 1);}
code2 {shell_writecode_button->value(b);}
}
Fl_Check_Button shell_writemsgs_button {
label {Write Messages}
callback {fluid_prefs.set("shell_writemsgs", shell_writemsgs_button->value());}
xywh {231 61 126 19} down_box DOWN_BOX
code0 {int b;}
code1 {fluid_prefs.get("shell_writemsgs", b, 0);}
code2 {shell_writemsgs_button->value(b);}
}
Fl_Check_Button shell_savefl_button {
label {Save .FL File}
callback {fluid_prefs.set("shell_savefl", shell_savefl_button->value());}
xywh {10 62 108 19} down_box DOWN_BOX
code0 {int b;}
code1 {fluid_prefs.get("shell_savefl", b, 1);}
code2 {shell_savefl_button->value(b);}
2002-05-01 14:36:08 +04:00
}
Fl_Return_Button {} {
label {Run Command}
callback do_shell_command
2005-03-19 11:38:21 +03:00
xywh {132 90 143 25}
}
Fl_Button {} {
label Cancel
2007-05-10 16:06:31 +04:00
callback {shell_window->hide();}
2005-03-19 11:38:21 +03:00
xywh {285 90 72 25}
2002-05-01 14:36:08 +04:00
}
}
Fl_Window shell_run_window {
2019-01-14 03:43:17 +03:00
label {Shell Command Output} open
2020-04-06 21:04:16 +03:00
xywh {454 363 555 430} type Double hide resizable
2002-05-01 14:36:08 +04:00
} {
2019-01-14 03:43:17 +03:00
Fl_Simple_Terminal shell_run_terminal {
xywh {10 10 535 375} resizable
2005-03-19 11:38:21 +03:00
}
2002-05-01 14:36:08 +04:00
Fl_Return_Button shell_run_button {
label Close
2019-01-14 02:09:31 +03:00
callback {Fl_Preferences pos(fluid_prefs, "shell_run_Window_pos");
pos.set("x", shell_run_window->x());
pos.set("y", shell_run_window->y());
pos.set("w", shell_run_window->w());
pos.set("h", shell_run_window->h());
shell_run_window->hide();}
2005-03-19 11:38:21 +03:00
xywh {468 395 77 25}
2003-04-01 23:58:08 +04:00
}
2002-05-01 14:36:08 +04:00
}
2015-07-09 05:09:33 +03:00
}
2002-05-01 23:17:24 +04:00
2010-12-21 01:19:24 +03:00
Function {make_layout_window()} {} {
2002-05-01 23:17:24 +04:00
Fl_Window grid_window {
2008-09-19 01:11:28 +04:00
label {Layout Settings} open
2015-03-10 04:41:55 +03:00
xywh {812 369 310 245} type Double hide non_modal
2002-05-01 23:17:24 +04:00
} {
2005-03-19 11:38:21 +03:00
Fl_Input horizontal_input {
2005-09-09 15:36:36 +04:00
label x
2005-03-19 11:38:21 +03:00
user_data 1 user_data_type long
callback grid_cb
2014-05-18 00:46:25 +04:00
tooltip {Horizontal grid spacing.} xywh {116 10 50 25} type Int box THIN_DOWN_BOX align 8
2005-03-19 11:38:21 +03:00
code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
}
Fl_Input vertical_input {
2005-09-09 15:36:36 +04:00
label pixels
2005-03-19 11:38:21 +03:00
user_data 2 user_data_type long
callback grid_cb
2014-05-18 00:46:25 +04:00
tooltip {Vertical grid spacing.} xywh {179 10 50 25} type Int box THIN_DOWN_BOX align 8
2005-03-19 11:38:21 +03:00
code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
}
Fl_Input snap_input {
2005-09-09 15:36:36 +04:00
label {pixel snap}
2005-03-19 11:38:21 +03:00
user_data 3 user_data_type long
callback grid_cb
2014-05-18 00:46:25 +04:00
tooltip {Snap to grid within this many pixels.} xywh {116 45 50 25} type Int box THIN_DOWN_BOX align 8
2005-03-19 11:38:21 +03:00
code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
}
Fl_Check_Button guides_toggle {
label {Show Guides}
user_data 4 user_data_type long
callback guides_cb
2014-05-18 00:46:25 +04:00
tooltip {Show distance and alignment guides in overlay} xywh {116 80 110 25} down_box DOWN_BOX
2002-05-01 23:17:24 +04:00
}
Fl_Button {} {
label Close
callback {grid_window->hide();}
2014-05-18 00:46:25 +04:00
tooltip {Close this dialog.} xywh {240 210 60 25}
2005-09-09 15:36:36 +04:00
}
Fl_Box {} {
label {Grid:}
2014-05-18 00:46:25 +04:00
xywh {47 10 70 25} labelfont 1 align 24
2005-09-09 15:36:36 +04:00
}
Fl_Box {} {
label {Widget Size:}
2014-05-18 00:46:25 +04:00
xywh {10 115 107 25} labelfont 1 align 24
2005-09-09 15:36:36 +04:00
}
Fl_Group {} {open
xywh {105 115 170 75}
} {
Fl_Round_Button {def_widget_size[0]} {
user_data 8 user_data_type long
2005-11-04 01:16:52 +03:00
callback default_widget_size_cb
2014-05-18 00:46:25 +04:00
xywh {115 115 70 25} type Radio down_box ROUND_DOWN_BOX
2005-09-09 15:36:36 +04:00
}
Fl_Box {} {
label tiny
2014-05-18 00:46:25 +04:00
xywh {130 115 50 25} labelsize 8 align 20
2005-09-09 15:36:36 +04:00
}
Fl_Round_Button {def_widget_size[1]} {
user_data 11 user_data_type long
2005-11-04 01:16:52 +03:00
callback default_widget_size_cb
2014-05-18 00:46:25 +04:00
xywh {202 115 70 25} type Radio down_box ROUND_DOWN_BOX
2005-09-09 15:36:36 +04:00
}
Fl_Box {} {
label small
2014-05-18 00:46:25 +04:00
xywh {218 115 50 25} labelsize 11 align 20
2005-09-09 15:36:36 +04:00
}
Fl_Round_Button {def_widget_size[2]} {
user_data 14 user_data_type long
2005-11-04 01:16:52 +03:00
callback default_widget_size_cb
2014-05-18 00:46:25 +04:00
xywh {115 140 70 25} type Radio down_box ROUND_DOWN_BOX
2005-09-09 15:36:36 +04:00
}
Fl_Box {} {
label normal
2014-05-18 00:46:25 +04:00
xywh {130 140 50 25} align 20
2005-09-09 15:36:36 +04:00
}
Fl_Round_Button {def_widget_size[3]} {
user_data 18 user_data_type long
2005-11-04 01:16:52 +03:00
callback default_widget_size_cb
2014-05-18 00:46:25 +04:00
xywh {202 140 90 25} type Radio down_box ROUND_DOWN_BOX
2005-09-09 15:36:36 +04:00
}
Fl_Box {} {
label medium
2014-05-18 00:46:25 +04:00
xywh {218 140 68 25} labelsize 18 align 20
2005-09-09 15:36:36 +04:00
}
Fl_Round_Button {def_widget_size[4]} {
user_data 24 user_data_type long
2005-11-04 01:16:52 +03:00
callback default_widget_size_cb
2014-05-18 00:46:25 +04:00
xywh {115 165 75 25} type Radio down_box ROUND_DOWN_BOX
2005-09-09 15:36:36 +04:00
}
Fl_Box {} {
label large
2014-05-18 00:46:25 +04:00
xywh {130 165 64 25} labelsize 24 align 20
2005-09-09 15:36:36 +04:00
}
Fl_Round_Button {def_widget_size[5]} {
user_data 32 user_data_type long
2005-11-04 01:16:52 +03:00
callback default_widget_size_cb
2014-05-18 00:46:25 +04:00
xywh {202 165 95 25} type Radio down_box ROUND_DOWN_BOX
2005-09-09 15:36:36 +04:00
}
Fl_Box {} {
label huge
2014-05-18 00:46:25 +04:00
xywh {218 165 76 25} labelsize 32 align 20
2005-09-09 15:36:36 +04:00
}
2002-05-01 23:17:24 +04:00
}
}
2015-07-09 05:09:33 +03:00
}
2005-03-18 09:29:11 +03:00
2010-12-21 01:19:24 +03:00
decl {int opt[10][2];} {
comment {Copy of all options in user and system mode} private local
2015-07-09 05:09:33 +03:00
}
2010-12-21 01:19:24 +03:00
Function {refreshUI()} {
comment {Update the UI using the values in the opt array} private return_type void
} {
code {int mode = wUserOrSystem->value();
wVisibleFocus->value(opt[Fl::OPTION_VISIBLE_FOCUS][mode]);
wArrowFocus->value(opt[Fl::OPTION_ARROW_FOCUS][mode]);
wShowTooltips->value(opt[Fl::OPTION_SHOW_TOOLTIPS][mode]);
2014-09-30 17:06:35 +04:00
wDNDText->value(opt[Fl::OPTION_DND_TEXT][mode]);
2019-09-15 16:57:29 +03:00
wGTKText->value(opt[Fl::OPTION_FNFC_USES_GTK][mode]);
wPrintGTKText->value(opt[Fl::OPTION_PRINTER_USES_GTK][mode]);} {}
2015-07-09 05:09:33 +03:00
}
2010-12-21 01:19:24 +03:00
Function {readPrefs()} {
comment {read all preferences and refresh the GUI} private return_type void
} {
code {// read all preferences and refresh the GUI
{
Fl_Preferences prefs(Fl_Preferences::SYSTEM, "fltk.org", "fltk");
Fl_Preferences opt_prefs(prefs, "options");
opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1], 2);
opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1], 2);
opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][1], 2);
opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1], 2);
2014-09-30 17:06:35 +04:00
opt_prefs.get("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK ][1], 2);
2019-09-15 16:57:29 +03:00
opt_prefs.get("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK ][1], 2);
2010-12-21 01:19:24 +03:00
}
{
Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk");
Fl_Preferences opt_prefs(prefs, "options");
opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0], 2);
opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0], 2);
opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][0], 2);
opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0], 2);
2014-09-30 17:06:35 +04:00
opt_prefs.get("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK ][0], 2);
2019-09-15 16:57:29 +03:00
opt_prefs.get("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK ][0], 2);
2010-12-21 01:19:24 +03:00
}
refreshUI();} {}
2015-07-09 05:09:33 +03:00
}
2010-12-21 01:19:24 +03:00
Function {writePrefs()} {
comment {write all preferences using the array} private return_type void
} {
code {// write all preferences using the array
{
Fl_Preferences prefs(Fl_Preferences::SYSTEM, "fltk.org", "fltk");
Fl_Preferences opt_prefs(prefs, "options");
if (opt[Fl::OPTION_ARROW_FOCUS][1]==2) opt_prefs.deleteEntry("ArrowFocus");
else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1]);
if (opt[Fl::OPTION_VISIBLE_FOCUS][1]==2) opt_prefs.deleteEntry("VisibleFocus");
else opt_prefs.set("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1]);
if (opt[Fl::OPTION_DND_TEXT][1]==2) opt_prefs.deleteEntry("DNDText");
else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][1]);
if (opt[Fl::OPTION_SHOW_TOOLTIPS][1]==2) opt_prefs.deleteEntry("ShowTooltips");
else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1]);
2014-09-30 17:06:35 +04:00
if (opt[Fl::OPTION_FNFC_USES_GTK][1]==2) opt_prefs.deleteEntry("FNFCUsesGTK");
else opt_prefs.set("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK][1]);
2019-09-15 16:57:29 +03:00
if (opt[Fl::OPTION_PRINTER_USES_GTK][1]==2) opt_prefs.deleteEntry("PrintUsesGTK");
else opt_prefs.set("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK][1]);
2010-12-21 01:19:24 +03:00
}
{
Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk");
Fl_Preferences opt_prefs(prefs, "options");
if (opt[Fl::OPTION_ARROW_FOCUS][0]==2) opt_prefs.deleteEntry("ArrowFocus");
else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0]);
if (opt[Fl::OPTION_VISIBLE_FOCUS][0]==2) opt_prefs.deleteEntry("VisibleFocus");
else opt_prefs.set("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0]);
if (opt[Fl::OPTION_DND_TEXT][0]==2) opt_prefs.deleteEntry("DNDText");
else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][0]);
if (opt[Fl::OPTION_SHOW_TOOLTIPS][0]==2) opt_prefs.deleteEntry("ShowTooltips");
else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0]);
2014-09-30 17:06:35 +04:00
if (opt[Fl::OPTION_FNFC_USES_GTK][0]==2) opt_prefs.deleteEntry("FNFCUsesGTK");
else opt_prefs.set("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK][0]);
2019-09-15 16:57:29 +03:00
if (opt[Fl::OPTION_PRINTER_USES_GTK][0]==2) opt_prefs.deleteEntry("PrintUsesGTK");
else opt_prefs.set("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK][0]);
2010-12-21 01:19:24 +03:00
}} {}
2015-07-09 05:09:33 +03:00
}
2010-12-21 01:19:24 +03:00
Function {show_global_settings_window()} {open return_type void
} {
code {if (!global_settings_window)
make_global_settings_window();
readPrefs();
refreshUI();
fl_message(
2020-07-01 19:03:10 +03:00
"WARNING!\\n\\n"
"The following dialog changes the user interface behavior\\n"
"of ALL FLTK applications, for the current user, or for \\n"
"ALL users on this machine.\\n\\n"
"Please choose these settings carefully, or reset\\n"
"user and system settings to \\"default\\".");
2014-10-05 04:03:27 +04:00
global_settings_window->show();} {}
2015-07-09 05:09:33 +03:00
}
2010-12-21 01:19:24 +03:00
Function {make_global_settings_window()} {} {
Fl_Window global_settings_window {
label {FLTK Preferences} open
2019-09-15 16:57:29 +03:00
xywh {715 96 400 455} type Double color 50 hide
2010-12-21 01:19:24 +03:00
} {
Fl_Group {} {
label {Keyboard Focus Options} open
xywh {10 10 380 100} box GTK_DOWN_BOX labelfont 2 align 21
} {
Fl_Choice wVisibleFocus {
label {Visible Keyboard Focus:}
callback {int mode = wUserOrSystem->value();
opt[Fl::OPTION_VISIBLE_FOCUS][mode] = wVisibleFocus->value();} open
tooltip {OPTION_VISIBLE_FOCUS
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.
Default is on.} xywh {245 40 100 25} down_box BORDER_BOX
} {
MenuItem {} {
label off
user_data 0 user_data_type long
xywh {10 10 31 20}
}
MenuItem {} {
label on
user_data 1 user_data_type long
xywh {10 10 31 20} divider
}
MenuItem {} {
label default
user_data 2 user_data_type long
xywh {10 10 31 20}
}
}
Fl_Choice wArrowFocus {
label {Arrow Keys move Focus:}
callback {int mode = wUserOrSystem->value();
opt[Fl::OPTION_ARROW_FOCUS][mode] = wArrowFocus->value();} open
tooltip {OPTION_ARROW_FOCUS
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.
Default is off.} xywh {245 75 100 25} down_box BORDER_BOX
} {
MenuItem {} {
label off
user_data 0 user_data_type long
xywh {0 0 31 20}
}
MenuItem {} {
label on
user_data 1 user_data_type long
xywh {0 0 31 20} divider
}
MenuItem {} {
label default
user_data 2 user_data_type long
xywh {0 0 31 20}
}
}
}
Fl_Group {} {
label {Tooltip Options} open
xywh {10 120 380 65} box GTK_DOWN_BOX labelfont 2 align 21
} {
Fl_Choice wShowTooltips {
label {Show Tooltips:}
callback {int mode = wUserOrSystem->value();
opt[Fl::OPTION_SHOW_TOOLTIPS][mode] = wShowTooltips->value();} open
tooltip {OPTION_SHOW_TOOLTIPS
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.
Default is on.} xywh {245 150 100 25} down_box BORDER_BOX
} {
MenuItem {} {
label off
user_data 0 user_data_type long
xywh {10 10 31 20}
}
MenuItem {} {
label on
user_data 1 user_data_type long
xywh {10 10 31 20} divider
}
MenuItem {} {
label default
user_data 2 user_data_type long
xywh {10 10 31 20}
}
}
}
Fl_Group {} {
label {Drag And Drop Options} open
xywh {10 194 380 66} box GTK_DOWN_BOX labelfont 2 align 21
} {
Fl_Choice wDNDText {
label {Allow dragging Text:}
callback {int mode = wUserOrSystem->value();
opt[Fl::OPTION_DND_TEXT][mode] = wDNDText->value();} open
tooltip {OPTION_DND_TEXT
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.
Default is on.} xywh {245 225 100 25} down_box BORDER_BOX
} {
MenuItem {} {
label off
user_data 0 user_data_type long
xywh {30 30 31 20}
}
MenuItem {} {
label on
user_data 1 user_data_type long
xywh {30 30 31 20} divider
}
MenuItem {} {
label default
user_data 2 user_data_type long
xywh {30 30 31 20}
}
}
}
2014-09-30 17:06:35 +04:00
Fl_Group {} {
label {Native File Chooser Options} open
xywh {10 269 380 66} box GTK_DOWN_BOX labelfont 2 align 21
} {
Fl_Choice wGTKText {
label {Native File Chooser uses GTK:}
callback {int mode = wUserOrSystem->value();
opt[Fl::OPTION_FNFC_USES_GTK ][mode] = wGTKText->value();} open
tooltip {OPTION_FNFC_USES_GTK
2020-07-01 19:03:10 +03:00
2014-09-30 17:06:35 +04:00
If 'Native File Chooser uses GTK' is enabled, the Fl_Native_File_Chooser class
calls the GTK open/save file dialogs when they are available on the platfom. If disabled, the Fl_Native_File_Chooser class
always uses FLTK's own file dialog (i.e., Fl_File_Chooser) even if GTK is available.
Default is on.} xywh {245 300 100 25} down_box BORDER_BOX
} {
MenuItem {} {
label off
user_data 0 user_data_type long
xywh {30 30 31 20}
}
MenuItem {} {
label on
user_data 1 user_data_type long
xywh {30 30 31 20} divider
}
MenuItem {} {
label default
user_data 2 user_data_type long
xywh {30 30 31 20}
}
}
}
2019-09-15 16:57:29 +03:00
Fl_Group {} {
label {Print dialog Options} open
xywh {10 345 380 66} box GTK_DOWN_BOX labelfont 2 align 21
} {
Fl_Choice wPrintGTKText {
label {Print dialog uses GTK:}
callback {int mode = wUserOrSystem->value();
opt[Fl::OPTION_PRINTER_USES_GTK ][mode] = wPrintGTKText->value();} open
tooltip {OPTION_PRINTER_USES_GTK
If 'Print dialog uses GTK' is enabled, the Fl_Printer class
calls the GTK print dialog when it's available on the platfom. If disabled, the Fl_Printer class
always uses FLTK's own print dialog even if GTK is available.
Default is on.} xywh {245 366 100 25} down_box BORDER_BOX
} {
MenuItem {} {
label off
user_data 0 user_data_type long selected
xywh {30 30 31 20}
}
MenuItem {} {
label on
user_data 1 user_data_type long
xywh {30 30 31 20} divider
}
MenuItem {} {
label default
user_data 2 user_data_type long
xywh {30 30 31 20}
}
}
}
2010-12-21 01:19:24 +03:00
Fl_Choice wUserOrSystem {
callback {refreshUI();} open
2019-09-15 16:57:29 +03:00
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 {10 420 141 25} down_box BORDER_BOX
2010-12-21 01:19:24 +03:00
} {
MenuItem {} {
label {User Settings}
user_data 0 user_data_type long
xywh {0 0 31 20}
}
MenuItem {} {
label {System Settings}
user_data 1 user_data_type long
xywh {0 0 31 20}
}
}
Fl_Button {} {
label Cancel
callback {global_settings_window->hide();}
2019-09-15 16:57:29 +03:00
xywh {230 420 75 25}
2010-12-21 01:19:24 +03:00
}
Fl_Button {} {
label OK
callback {writePrefs();
global_settings_window->hide();}
2019-09-15 16:57:29 +03:00
xywh {315 420 75 25}
2010-12-21 01:19:24 +03:00
}
}
code {readPrefs();
Fl::option(Fl::OPTION_SHOW_TOOLTIPS,1); // make sure tooltips are on !} {}
2015-07-09 05:09:33 +03:00
}