fltk  1.3.5-source
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X.
  Fossies Dox: fltk-1.3.5-source.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

alignment_panel.cxx
Go to the documentation of this file.
1 //
2 // "$Id$"
3 //
4 // Setting and shell dialogs for the Fast Light Tool Kit (FLTK).
5 //
6 // Copyright 1998-2017 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.0305
20 
21 #include "alignment_panel.h"
22 #include <FL/Fl_Preferences.H>
23 #include <FL/fl_ask.H>
25 
27 
28 static void cb_Close(Fl_Button*, void*) {
30 }
31 
33 
35 
37 
39 
41 
43  {"None", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
44  {"GNU gettext", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
45  {"POSIX catgets", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
46  {0,0,0,0,0,0,0,0,0}
47 };
48 
50 
52 
54 
56 
58  { project_window = new Fl_Double_Window(399, 252, "Project Settings");
59  { Fl_Button* o = new Fl_Button(328, 216, 60, 25, "Close");
60  o->tooltip("Close this dialog.");
62  } // Fl_Button* o
63  { Fl_Tabs* o = new Fl_Tabs(10, 10, 378, 195);
64  o->selection_color((Fl_Color)12);
65  { Fl_Group* o = new Fl_Group(10, 36, 378, 169, "Output");
66  o->hide();
67  { Fl_Box* o = new Fl_Box(20, 49, 340, 49, "Use \"name.ext\" to set a file name or just \".ext\" to set extension.");
69  } // Fl_Box* o
70  { header_file_input = new Fl_Input(119, 103, 252, 20, "Header File:");
71  header_file_input->tooltip("The name of the generated header file.");
77  } // Fl_Input* header_file_input
78  { code_file_input = new Fl_Input(119, 128, 252, 20, "Code File:");
79  code_file_input->tooltip("The name of the generated code file.");
85  } // Fl_Input* code_file_input
86  { include_H_from_C_button = new Fl_Check_Button(117, 153, 272, 20, "Include Header from Code");
87  include_H_from_C_button->tooltip("Include the header file from the code file.");
90  } // Fl_Check_Button* include_H_from_C_button
91  { use_FL_COMMAND_button = new Fl_Check_Button(117, 176, 272, 20, "Menu shortcuts use FL_COMMAND");
92  use_FL_COMMAND_button->tooltip("Replace FL_CTRL with FL_COMMAND when generating menu shortcut code.");
95  } // Fl_Check_Button* use_FL_COMMAND_button
96  o->end();
97  } // Fl_Group* o
98  { Fl_Group* o = new Fl_Group(10, 36, 378, 169, "Internationalization");
99  { i18n_type_chooser = new Fl_Choice(100, 48, 136, 25, "Use:");
100  i18n_type_chooser->tooltip("Type of internationalization to use.");
106  } // Fl_Choice* i18n_type_chooser
107  { i18n_include_input = new Fl_Input(100, 78, 272, 20, "#include:");
108  i18n_include_input->tooltip("The include file for internationalization.");
113  } // Fl_Input* i18n_include_input
114  { i18n_file_input = new Fl_Input(100, 104, 272, 20, "File:");
115  i18n_file_input->tooltip("The name of the message catalog.");
120  } // Fl_Input* i18n_file_input
121  { i18n_set_input = new Fl_Int_Input(100, 128, 272, 20, "Set:");
122  i18n_set_input->tooltip("The message set number.");
123  i18n_set_input->type(2);
128  } // Fl_Int_Input* i18n_set_input
129  { i18n_function_input = new Fl_Input(100, 103, 272, 20, "Function:");
130  i18n_function_input->tooltip("The function to call to internationalize the labels and tooltips.");
135  } // Fl_Input* i18n_function_input
136  o->end();
137  } // Fl_Group* o
138  o->end();
139  } // Fl_Tabs* o
141  project_window->end();
142  } // Fl_Double_Window* project_window
143  return project_window;
144 }
145 void scheme_cb(Fl_Choice *, void *);
146 
148 
150 
152  {"Default", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
153  {"None", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
154  {"Plastic", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
155  {"GTK+", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
156  {"Gleam", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
157  {0,0,0,0,0,0,0,0,0}
158 };
159 
161 
162 static void cb_tooltips_button(Fl_Check_Button*, void*) {
164 fluid_prefs.set("show_tooltips", tooltips_button->value());
165 }
166 
168 
169 static void cb_completion_button(Fl_Check_Button*, void*) {
170  fluid_prefs.set("show_completion_dialogs", completion_button->value());
171 }
172 
174 
175 static void cb_openlast_button(Fl_Check_Button*, void*) {
176  fluid_prefs.set("open_previous_file", openlast_button->value());
177 }
178 
180 
181 static void cb_prevpos_button(Fl_Check_Button*, void*) {
182  fluid_prefs.set("prev_window_pos", prevpos_button->value());
183 }
184 
186 
189 fluid_prefs.set("show_comments", show_comments);
191 }
192 
194 
195 static void cb_recent_spinner(Fl_Spinner*, void*) {
196  fluid_prefs.set("recent_files", recent_spinner->value());
197 load_history();
198 }
199 
201 
204 fluid_prefs.set("use_external_editor", G_use_external_editor);
206 }
207 
209 
210 static void cb_editor_command_input(Fl_Input*, void*) {
213 fluid_prefs.set("external_editor_command", G_external_editor_command);
215 }
216 
217 static void cb_Close1(Fl_Button*, void*) {
219 }
220 
222  { Fl_Double_Window* o = settings_window = new Fl_Double_Window(360, 355, "GUI Settings");
223  { scheme_choice = new Fl_Choice(140, 10, 115, 25, "Scheme: ");
228  int s;
229  fluid_prefs.get("scheme", s, 0);
230  scheme_choice->value(s);
231  scheme_cb(0, 0);
232  } // Fl_Choice* scheme_choice
233  { Fl_Group* o = new Fl_Group(20, 43, 330, 161);
234  o->labelfont(1);
236  { Fl_Box* o = new Fl_Box(140, 43, 1, 25, "Options: ");
237  o->labelfont(1);
239  } // Fl_Box* o
240  { tooltips_button = new Fl_Check_Button(138, 43, 113, 25, "Show Tooltips");
244  int b;
245  fluid_prefs.get("show_tooltips", b, 1);
248  } // Fl_Check_Button* tooltips_button
249  { completion_button = new Fl_Check_Button(138, 68, 186, 25, "Show Completion Dialogs");
253  int b;
254  fluid_prefs.get("show_completion_dialogs", b, 1);
256  } // Fl_Check_Button* completion_button
257  { openlast_button = new Fl_Check_Button(138, 93, 214, 25, "Open Previous File on Startup");
261  int b;
262  fluid_prefs.get("open_previous_file", b, 0);
264  } // Fl_Check_Button* openlast_button
265  { prevpos_button = new Fl_Check_Button(138, 118, 209, 25, "Remember Window Positions");
269  int b;
270  fluid_prefs.get("prev_window_pos", b, 1);
272  } // Fl_Check_Button* prevpos_button
273  { show_comments_button = new Fl_Check_Button(138, 143, 209, 25, "Show Comments in Browser");
277  fluid_prefs.get("show_comments", show_comments, 1);
279  } // Fl_Check_Button* show_comments_button
280  o->end();
281  } // Fl_Group* o
282  { recent_spinner = new Fl_Spinner(140, 173, 40, 25, "# Recent Files: ");
286  int c;
287  fluid_prefs.get("recent_files", c, 5);
288  recent_spinner->maximum(10);
289  recent_spinner->value(c);
290  } // Fl_Spinner* recent_spinner
291  { Fl_Group* o = new Fl_Group(10, 210, 337, 95);
292  o->box(FL_THIN_UP_BOX);
293  o->color(FL_DARK1);
294  { use_external_editor_button = new Fl_Check_Button(25, 218, 209, 22, "Use external editor?");
298  fluid_prefs.get("use_external_editor", G_use_external_editor, 0);
300  } // Fl_Check_Button* use_external_editor_button
301  { editor_command_input = new Fl_Input(25, 264, 305, 21, "Editor Command");
302  editor_command_input->tooltip("The editor command to open your external text editor.\nInclude any necessary \
303 flags to ensure your editor does not background itself.\nExamples:\n gvim -\
304 f\n gedit\n emacs");
310  fluid_prefs.get("external_editor_command", G_external_editor_command, "", sizeof(G_external_editor_command)-1);
312  } // Fl_Input* editor_command_input
313  o->end();
315  } // Fl_Group* o
316  { Fl_Button* o = new Fl_Button(285, 320, 64, 25, "Close");
317  o->tooltip("Close this dialog.");
319  } // Fl_Button* o
320  o->size_range(o->w(), o->h());
322  settings_window->end();
323  } // Fl_Double_Window* settings_window
324  return settings_window;
325 }
326 
328 
330 
331 static void cb_shell_command_input(Fl_Input*, void*) {
332  fluid_prefs.set("shell_command", shell_command_input->value());
333 }
334 
336 
338  fluid_prefs.set("shell_writecode", shell_writecode_button->value());
339 }
340 
342 
344  fluid_prefs.set("shell_writemsgs", shell_writemsgs_button->value());
345 }
346 
348 
350  fluid_prefs.set("shell_savefl", shell_savefl_button->value());
351 }
352 
353 static void cb_Cancel(Fl_Button*, void*) {
354  shell_window->hide();
355 }
356 
358 
360 
362 
363 static void cb_shell_run_button(Fl_Return_Button*, void*) {
365 }
366 
368  { shell_window = new Fl_Double_Window(365, 125, "Shell Command");
369  { shell_command_input = new Fl_Input(10, 27, 347, 25, "Command:");
373  char buf[1024];
374  fluid_prefs.get("shell_command", buf, "", sizeof(buf));
376  } // Fl_Input* shell_command_input
377  { shell_writecode_button = new Fl_Check_Button(128, 61, 93, 19, "Write Code");
380  int b;
381  fluid_prefs.get("shell_writecode", b, 1);
383  } // Fl_Check_Button* shell_writecode_button
384  { shell_writemsgs_button = new Fl_Check_Button(231, 61, 126, 19, "Write Messages");
387  int b;
388  fluid_prefs.get("shell_writemsgs", b, 0);
390  } // Fl_Check_Button* shell_writemsgs_button
391  { shell_savefl_button = new Fl_Check_Button(10, 62, 108, 19, "Save .FL File");
394  int b;
395  fluid_prefs.get("shell_savefl", b, 1);
397  } // Fl_Check_Button* shell_savefl_button
398  { Fl_Return_Button* o = new Fl_Return_Button(132, 90, 143, 25, "Run Command");
400  } // Fl_Return_Button* o
401  { Fl_Button* o = new Fl_Button(285, 90, 72, 25, "Cancel");
403  } // Fl_Button* o
404  shell_window->end();
405  } // Fl_Double_Window* shell_window
406  { shell_run_window = new Fl_Double_Window(555, 430, "Shell Command Output");
407  { shell_run_display = new Fl_Text_Display(10, 10, 535, 375);
413  } // Fl_Text_Display* shell_run_display
414  { shell_run_button = new Fl_Return_Button(468, 395, 77, 25, "Close");
416  } // Fl_Return_Button* shell_run_button
418  } // Fl_Double_Window* shell_run_window
419  return shell_run_window;
420 }
421 
423 
425 
427 
429 
431 
432 static void cb_Close2(Fl_Button*, void*) {
433  grid_window->hide();
434 }
435 
437 
439  { grid_window = new Fl_Double_Window(310, 245, "Layout Settings");
440  { Fl_Int_Input* o = horizontal_input = new Fl_Int_Input(116, 10, 50, 25, "x");
441  horizontal_input->tooltip("Horizontal grid spacing.");
447  } // Fl_Int_Input* horizontal_input
448  { Fl_Int_Input* o = vertical_input = new Fl_Int_Input(179, 10, 50, 25, "pixels");
449  vertical_input->tooltip("Vertical grid spacing.");
450  vertical_input->type(2);
452  vertical_input->callback((Fl_Callback*)grid_cb, (void*)(2));
455  } // Fl_Int_Input* vertical_input
456  { Fl_Int_Input* o = snap_input = new Fl_Int_Input(116, 45, 50, 25, "pixel snap");
457  snap_input->tooltip("Snap to grid within this many pixels.");
458  snap_input->type(2);
460  snap_input->callback((Fl_Callback*)grid_cb, (void*)(3));
463  } // Fl_Int_Input* snap_input
464  { guides_toggle = new Fl_Check_Button(116, 80, 110, 25, "Show Guides");
465  guides_toggle->tooltip("Show distance and alignment guides in overlay");
468  } // Fl_Check_Button* guides_toggle
469  { Fl_Button* o = new Fl_Button(240, 210, 60, 25, "Close");
470  o->tooltip("Close this dialog.");
472  } // Fl_Button* o
473  { Fl_Box* o = new Fl_Box(47, 10, 70, 25, "Grid:");
474  o->labelfont(1);
476  } // Fl_Box* o
477  { Fl_Box* o = new Fl_Box(10, 115, 107, 25, "Widget Size:");
478  o->labelfont(1);
480  } // Fl_Box* o
481  { Fl_Group* o = new Fl_Group(105, 115, 170, 75);
482  { def_widget_size[0] = new Fl_Round_Button(115, 115, 70, 25);
483  def_widget_size[0]->type(102);
486  } // Fl_Round_Button* def_widget_size[0]
487  { Fl_Box* o = new Fl_Box(130, 115, 50, 25, "tiny");
488  o->labelsize(8);
490  } // Fl_Box* o
491  { def_widget_size[1] = new Fl_Round_Button(202, 115, 70, 25);
492  def_widget_size[1]->type(102);
495  } // Fl_Round_Button* def_widget_size[1]
496  { Fl_Box* o = new Fl_Box(218, 115, 50, 25, "small");
497  o->labelsize(11);
499  } // Fl_Box* o
500  { def_widget_size[2] = new Fl_Round_Button(115, 140, 70, 25);
501  def_widget_size[2]->type(102);
504  } // Fl_Round_Button* def_widget_size[2]
505  { Fl_Box* o = new Fl_Box(130, 140, 50, 25, "normal");
507  } // Fl_Box* o
508  { def_widget_size[3] = new Fl_Round_Button(202, 140, 90, 25);
509  def_widget_size[3]->type(102);
512  } // Fl_Round_Button* def_widget_size[3]
513  { Fl_Box* o = new Fl_Box(218, 140, 68, 25, "medium");
514  o->labelsize(18);
516  } // Fl_Box* o
517  { def_widget_size[4] = new Fl_Round_Button(115, 165, 75, 25);
518  def_widget_size[4]->type(102);
521  } // Fl_Round_Button* def_widget_size[4]
522  { Fl_Box* o = new Fl_Box(130, 165, 64, 25, "large");
523  o->labelsize(24);
525  } // Fl_Box* o
526  { def_widget_size[5] = new Fl_Round_Button(202, 165, 95, 25);
527  def_widget_size[5]->type(102);
530  } // Fl_Round_Button* def_widget_size[5]
531  { Fl_Box* o = new Fl_Box(218, 165, 76, 25, "huge");
532  o->labelsize(32);
534  } // Fl_Box* o
535  o->end();
536  } // Fl_Group* o
538  grid_window->end();
539  } // Fl_Double_Window* grid_window
540  return grid_window;
541 }
545 static int opt[10][2];
546 
550 static void refreshUI() {
551  int mode = wUserOrSystem->value();
557 }
558 
562 static void readPrefs() {
563  // read all preferences and refresh the GUI
564  {
565  Fl_Preferences prefs(Fl_Preferences::SYSTEM, "fltk.org", "fltk");
566  Fl_Preferences opt_prefs(prefs, "options");
567  opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1], 2);
568  opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1], 2);
569  opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][1], 2);
570  opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1], 2);
571  opt_prefs.get("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK ][1], 2);
572  }
573  {
574  Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk");
575  Fl_Preferences opt_prefs(prefs, "options");
576  opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0], 2);
577  opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0], 2);
578  opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][0], 2);
579  opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0], 2);
580  opt_prefs.get("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK ][0], 2);
581  }
582  refreshUI();
583 }
584 
588 static void writePrefs() {
589  // write all preferences using the array
590  {
591  Fl_Preferences prefs(Fl_Preferences::SYSTEM, "fltk.org", "fltk");
592  Fl_Preferences opt_prefs(prefs, "options");
593  if (opt[Fl::OPTION_ARROW_FOCUS][1]==2) opt_prefs.deleteEntry("ArrowFocus");
594  else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1]);
595  if (opt[Fl::OPTION_VISIBLE_FOCUS][1]==2) opt_prefs.deleteEntry("VisibleFocus");
596  else opt_prefs.set("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1]);
597  if (opt[Fl::OPTION_DND_TEXT][1]==2) opt_prefs.deleteEntry("DNDText");
598  else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][1]);
599  if (opt[Fl::OPTION_SHOW_TOOLTIPS][1]==2) opt_prefs.deleteEntry("ShowTooltips");
600  else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1]);
601  if (opt[Fl::OPTION_FNFC_USES_GTK][1]==2) opt_prefs.deleteEntry("FNFCUsesGTK");
602  else opt_prefs.set("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK][1]);
603  }
604  {
605  Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk");
606  Fl_Preferences opt_prefs(prefs, "options");
607  if (opt[Fl::OPTION_ARROW_FOCUS][0]==2) opt_prefs.deleteEntry("ArrowFocus");
608  else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0]);
609  if (opt[Fl::OPTION_VISIBLE_FOCUS][0]==2) opt_prefs.deleteEntry("VisibleFocus");
610  else opt_prefs.set("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0]);
611  if (opt[Fl::OPTION_DND_TEXT][0]==2) opt_prefs.deleteEntry("DNDText");
612  else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][0]);
613  if (opt[Fl::OPTION_SHOW_TOOLTIPS][0]==2) opt_prefs.deleteEntry("ShowTooltips");
614  else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0]);
615  if (opt[Fl::OPTION_FNFC_USES_GTK][0]==2) opt_prefs.deleteEntry("FNFCUsesGTK");
616  else opt_prefs.set("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK][0]);
617  }
618 }
619 
623  readPrefs();
624  refreshUI();
625  fl_message(
626  "WARNING!\n\n"
627  "The following dialog changes the user interface behavior\n"
628  "of ALL FLTK applications, for the current user, or for \n"
629  "ALL users on this machine.\n\n"
630  "Please choose these settings carefully, or reset\n"
631  "user and system settings to \"default\".");
633 }
634 
636 
638 
639 static void cb_wVisibleFocus(Fl_Choice*, void*) {
640  int mode = wUserOrSystem->value();
642 }
643 
645  {"off", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
646  {"on", 0, 0, (void*)(1), 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
647  {"default", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
648  {0,0,0,0,0,0,0,0,0}
649 };
650 
652 
653 static void cb_wArrowFocus(Fl_Choice*, void*) {
654  int mode = wUserOrSystem->value();
656 }
657 
659  {"off", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
660  {"on", 0, 0, (void*)(1), 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
661  {"default", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
662  {0,0,0,0,0,0,0,0,0}
663 };
664 
666 
667 static void cb_wShowTooltips(Fl_Choice*, void*) {
668  int mode = wUserOrSystem->value();
670 }
671 
673  {"off", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
674  {"on", 0, 0, (void*)(1), 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
675  {"default", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
676  {0,0,0,0,0,0,0,0,0}
677 };
678 
680 
681 static void cb_wDNDText(Fl_Choice*, void*) {
682  int mode = wUserOrSystem->value();
684 }
685 
687  {"off", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
688  {"on", 0, 0, (void*)(1), 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
689  {"default", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
690  {0,0,0,0,0,0,0,0,0}
691 };
692 
694 
695 static void cb_wGTKText(Fl_Choice*, void*) {
696  int mode = wUserOrSystem->value();
698 }
699 
701  {"off", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
702  {"on", 0, 0, (void*)(1), 128, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
703  {"default", 0, 0, (void*)(2), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
704  {0,0,0,0,0,0,0,0,0}
705 };
706 
708 
709 static void cb_wUserOrSystem(Fl_Choice*, void*) {
710  refreshUI();
711 }
712 
714  {"User Settings", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
715  {"System Settings", 0, 0, (void*)(1), 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
716  {0,0,0,0,0,0,0,0,0}
717 };
718 
719 static void cb_Cancel1(Fl_Button*, void*) {
721 }
722 
723 static void cb_OK(Fl_Button*, void*) {
724  writePrefs();
726 }
727 
729  { global_settings_window = new Fl_Double_Window(400, 378, "FLTK Preferences");
731  { Fl_Group* o = new Fl_Group(10, 10, 380, 100, "Keyboard Focus Options");
732  o->box(FL_GTK_DOWN_BOX);
733  o->labelfont(2);
735  { wVisibleFocus = new Fl_Choice(245, 40, 100, 25, "Visible Keyboard Focus:");
736  wVisibleFocus->tooltip("OPTION_VISIBLE_FOCUS\n\nIf visible focus is switched on, FLTK will draw a dot\
737 ted rectangle inside the widget that will receive the next keystroke. If switc\
738 hed off, no such indicator will be drawn and keyboard navigation is disabled.\
739 \n\nDefault is on.");
743  } // Fl_Choice* wVisibleFocus
744  { wArrowFocus = new Fl_Choice(245, 75, 100, 25, "Arrow Keys move Focus:");
745  wArrowFocus->tooltip("OPTION_ARROW_FOCUS\n\nWhen switched on, moving the text cursor beyond the sta\
746 rt or end of the text in a text widget will change focus to the next widget. W\
747 hen switched off, the cursor will stop at the end of the text. Pressing Tab or\
748  Ctrl-Tab will advance the keyboard focus. Switch this on, if you want the old\
749  behavior of FLTK 1.1.\n\nDefault is off.");
753  } // Fl_Choice* wArrowFocus
754  o->end();
755  } // Fl_Group* o
756  { Fl_Group* o = new Fl_Group(10, 120, 380, 65, "Tooltip Options");
757  o->box(FL_GTK_DOWN_BOX);
758  o->labelfont(2);
760  { wShowTooltips = new Fl_Choice(245, 150, 100, 25, "Show Tooltips:");
761  wShowTooltips->tooltip("OPTION_SHOW_TOOLTIPS\n\nIf tooltips are enabled, hovering the mouse over a wi\
762 dget with a tooltip text will open a little tooltip window until the mouse lea\
763 ves the widget. If disabled, no tooltip is shown.\n\nDefault is on.");
767  } // Fl_Choice* wShowTooltips
768  o->end();
769  } // Fl_Group* o
770  { Fl_Group* o = new Fl_Group(10, 194, 380, 66, "Drag And Drop Options");
771  o->box(FL_GTK_DOWN_BOX);
772  o->labelfont(2);
774  { wDNDText = new Fl_Choice(245, 225, 100, 25, "Allow dragging Text:");
775  wDNDText->tooltip("OPTION_DND_TEXT\n\nIf text drag-and-drop is enabled, the user can select and \
776 drag text from any text widget. If disabled, no dragging is possible, however \
777 dropping text from other applications still works.\n\nDefault is on.");
781  } // Fl_Choice* wDNDText
782  o->end();
783  } // Fl_Group* o
784  { Fl_Group* o = new Fl_Group(10, 269, 380, 66, "Native File Chooser Options");
785  o->box(FL_GTK_DOWN_BOX);
786  o->labelfont(2);
788  { wGTKText = new Fl_Choice(245, 300, 100, 25, "Native File Chooser uses GTK:");
789  wGTKText->tooltip("OPTION_FNFC_USES_GTK\n \nIf \'Native File Chooser uses GTK\' is enable\
790 d, the Fl_Native_File_Chooser class\ncalls the GTK open/save file dialogs when\
791  they are available on the platfom. If disabled, the Fl_Native_File_Chooser cl\
792 ass\nalways uses FLTK\'s own file dialog (i.e., Fl_File_Chooser) even if GTK i\
793 s available.\n\nDefault is on.");
797  } // Fl_Choice* wGTKText
798  o->end();
799  } // Fl_Group* o
800  { wUserOrSystem = new Fl_Choice(10, 345, 141, 25);
801  wUserOrSystem->tooltip("Change settings for the current user, or default values for all users of this\
802  computer. Individual users can override system options, if they set their opt\
803 ions to specific values (not \'default\').");
807  } // Fl_Choice* wUserOrSystem
808  { Fl_Button* o = new Fl_Button(230, 345, 75, 25, "Cancel");
810  } // Fl_Button* o
811  { Fl_Button* o = new Fl_Button(315, 345, 75, 25, "OK");
812  o->callback((Fl_Callback*)cb_OK);
813  } // Fl_Button* o
815  } // Fl_Double_Window* global_settings_window
816  readPrefs();
817  Fl::option(Fl::OPTION_SHOW_TOOLTIPS,1); // make sure tooltips are on !
818  return global_settings_window;
819 }
820 
821 //
822 // End of "$Id$".
823 //
Fl_Text_Display::buffer
void buffer(Fl_Text_Buffer *buf)
Definition: Fl_Text_Display.cxx:384
make_shell_window
Fl_Double_Window * make_shell_window()
Definition: alignment_panel.cxx:367
menu_wArrowFocus
Fl_Menu_Item menu_wArrowFocus[]
Definition: alignment_panel.cxx:658
FL_ALIGN_LEFT
const Fl_Align FL_ALIGN_LEFT
Definition: Enumerations.H:839
Fl_Choice
A button that is used to pop up a menu.
Definition: Fl_Choice.H:83
wVisibleFocus
Fl_Choice * wVisibleFocus
Definition: alignment_panel.cxx:637
include_H_from_C_button
Fl_Check_Button * include_H_from_C_button
Definition: alignment_panel.cxx:36
shell_writecode_button
Fl_Check_Button * shell_writecode_button
Definition: alignment_panel.cxx:335
shell_run_window
Fl_Double_Window * shell_run_window
Definition: alignment_panel.cxx:357
buf
static char * buf
Definition: fl_encoding_mac_roman.cxx:76
Fl_Widget::align
Fl_Align align() const
Definition: Fl_Widget.H:348
Fl_Button::value
int value(int v)
Definition: Fl_Button.cxx:41
Fl_Round_Button
Definition: Fl_Round_Button.H:36
menu_wVisibleFocus
Fl_Menu_Item menu_wVisibleFocus[]
Definition: alignment_panel.cxx:644
Fl_Color
unsigned int Fl_Color
Definition: Enumerations.H:934
Fl_Group::end
void end()
Definition: Fl_Group.cxx:75
Fl_Menu_::menu
const Fl_Menu_Item * menu() const
Definition: Fl_Menu_.H:110
Fl::OPTION_VISIBLE_FOCUS
Definition: Fl.H:212
fl_message
void fl_message(const char *,...)
Definition: fl_ask.cxx:338
menu_scheme_choice
Fl_Menu_Item menu_scheme_choice[]
Definition: alignment_panel.cxx:151
cb_completion_button
static void cb_completion_button(Fl_Check_Button *, void *)
Definition: alignment_panel.cxx:169
Fl_Button::down_box
Fl_Boxtype down_box() const
Definition: Fl_Button.H:152
menu_wGTKText
Fl_Menu_Item menu_wGTKText[]
Definition: alignment_panel.cxx:700
wUserOrSystem
Fl_Choice * wUserOrSystem
Definition: alignment_panel.cxx:707
G_use_external_editor
int G_use_external_editor
Definition: fluid.cxx:97
G_external_editor_command
char G_external_editor_command[512]
Definition: fluid.cxx:99
Fl_Input_::textsize
Fl_Fontsize textsize() const
Definition: Fl_Input_.H:395
shell_writemsgs_button
Fl_Check_Button * shell_writemsgs_button
Definition: alignment_panel.cxx:341
tooltips_button
Fl_Check_Button * tooltips_button
Definition: alignment_panel.cxx:160
cb_Cancel
static void cb_Cancel(Fl_Button *, void *)
Definition: alignment_panel.cxx:353
i18n_type_cb
void i18n_type_cb(Fl_Choice *, void *)
Definition: Fl_Window_Type.cxx:120
use_external_editor_button
Fl_Check_Button * use_external_editor_button
Definition: alignment_panel.cxx:200
Fl_Text_Display::textfont
Fl_Font textfont() const
Definition: Fl_Text_Display.H:290
fl_ask.H
Fl_Int_Input
Definition: Fl_Int_Input.H:31
Fl_Preferences::USER
Preferences apply only to the current user.
Definition: Fl_Preferences.H:68
Fl_Input_::value
int value(const char *)
Definition: Fl_Input_.cxx:1284
scheme_cb
void scheme_cb(Fl_Choice *, void *)
Definition: fluid.cxx:1158
Fl_Button
Buttons generate callbacks when they are clicked by the user.
Definition: Fl_Button.H:79
header_file_input
Fl_Input * header_file_input
Definition: alignment_panel.cxx:32
FL_WHEN_RELEASE
Do the callback when the button or key is released and the value changes.
Definition: Enumerations.H:443
horizontal_input
Fl_Int_Input * horizontal_input
Definition: alignment_panel.cxx:424
Fl_Widget::labelfont
Fl_Font labelfont() const
Definition: Fl_Widget.H:487
FL_ROUND_DOWN_BOX
#define FL_ROUND_DOWN_BOX
Definition: Enumerations.H:665
editor_command_input
Fl_Input * editor_command_input
Definition: alignment_panel.cxx:208
make_project_window
Fl_Double_Window * make_project_window()
Definition: alignment_panel.cxx:57
guides_cb
void guides_cb(Fl_Check_Button *, long)
Definition: Fl_Window_Type.cxx:66
use_FL_COMMAND_button_cb
void use_FL_COMMAND_button_cb(Fl_Check_Button *, void *)
Definition: Fl_Window_Type.cxx:262
i18n_set_input
Fl_Int_Input * i18n_set_input
Definition: alignment_panel.cxx:53
Fl_Tabs
Definition: Fl_Tabs.H:201
Fl_Widget::when
Fl_When when() const
Definition: Fl_Widget.H:621
writePrefs
static void writePrefs()
Definition: alignment_panel.cxx:588
cb_show_comments_button
static void cb_show_comments_button(Fl_Check_Button *, void *)
Definition: alignment_panel.cxx:187
i18n_include_input
Fl_Input * i18n_include_input
Definition: alignment_panel.cxx:49
snap_input
Fl_Int_Input * snap_input
Definition: alignment_panel.cxx:428
i18n_text_cb
void i18n_text_cb(Fl_Input *, void *)
Definition: Fl_Window_Type.cxx:157
Fl_Callback
void() Fl_Callback(Fl_Widget *, void *)
Definition: Fl_Widget.H:49
b
long b
Definition: jpegint.h:397
menu_wDNDText
Fl_Menu_Item menu_wDNDText[]
Definition: alignment_panel.cxx:686
Fl::OPTION_ARROW_FOCUS
Definition: Fl.H:197
cb_shell_writecode_button
static void cb_shell_writecode_button(Fl_Check_Button *, void *)
Definition: alignment_panel.cxx:337
scheme_choice
Fl_Choice * scheme_choice
Definition: alignment_panel.cxx:149
Fl::OPTION_SHOW_TOOLTIPS
Definition: Fl.H:220
cb_shell_writemsgs_button
static void cb_shell_writemsgs_button(Fl_Check_Button *, void *)
Definition: alignment_panel.cxx:343
wGTKText
Fl_Choice * wGTKText
Definition: alignment_panel.cxx:693
show_comments
int show_comments
Definition: fluid.cxx:96
shell_savefl_button
Fl_Check_Button * shell_savefl_button
Definition: alignment_panel.cxx:347
do_shell_command
void do_shell_command(Fl_Return_Button *, void *)
Definition: fluid.cxx:1515
FL_ALIGN_INSIDE
const Fl_Align FL_ALIGN_INSIDE
Definition: Enumerations.H:843
Fl_Widget::color
Fl_Color color() const
Definition: Fl_Widget.H:378
Fl::OPTION_DND_TEXT
Definition: Fl.H:216
wShowTooltips
Fl_Choice * wShowTooltips
Definition: alignment_panel.cxx:665
menu_wShowTooltips
Fl_Menu_Item menu_wShowTooltips[]
Definition: alignment_panel.cxx:672
FL_WHEN_CHANGED
Do the callback only when the widget value changes.
Definition: Enumerations.H:441
Fl_Widget::w
void w(int v)
Definition: Fl_Widget.H:143
cb_wDNDText
static void cb_wDNDText(Fl_Choice *, void *)
Definition: alignment_panel.cxx:681
cb_shell_command_input
static void cb_shell_command_input(Fl_Input *, void *)
Definition: alignment_panel.cxx:331
Fl_Widget::selection_color
Fl_Color selection_color() const
Definition: Fl_Widget.H:396
cb_wArrowFocus
static void cb_wArrowFocus(Fl_Choice *, void *)
Definition: alignment_panel.cxx:653
FL_THIN_UP_BOX
see figure 1
Definition: Enumerations.H:611
FL_ALIGN_TOP_LEFT
const Fl_Align FL_ALIGN_TOP_LEFT
Definition: Enumerations.H:858
refreshUI
static void refreshUI()
Definition: alignment_panel.cxx:550
code_input_cb
void code_input_cb(Fl_Input *, void *)
Definition: Fl_Window_Type.cxx:249
cb_tooltips_button
static void cb_tooltips_button(Fl_Check_Button *, void *)
Definition: alignment_panel.cxx:162
show_comments_button
Fl_Check_Button * show_comments_button
Definition: alignment_panel.cxx:185
cb_Close
static void cb_Close(Fl_Button *, void *)
Definition: alignment_panel.cxx:28
Fl::option
static bool option(Fl_Option opt)
FLTK library options management.
Definition: Fl.cxx:2182
cb_wShowTooltips
static void cb_wShowTooltips(Fl_Choice *, void *)
Definition: alignment_panel.cxx:667
FL_DOWN_BOX
see figure 1
Definition: Enumerations.H:608
openlast_button
Fl_Check_Button * openlast_button
Definition: alignment_panel.cxx:173
Fl_Spinner::value
double value() const
Definition: Fl_Spinner.H:230
Fl_Window::set_modal
void set_modal()
Definition: Fl_Window.H:289
shell_window
Fl_Double_Window * shell_window
Definition: alignment_panel.cxx:327
Fl_Preferences::get
char get(const char *entry, int &value, int defaultValue)
Definition: Fl_Preferences.cxx:509
Fl_Preferences::set
char set(const char *entry, int value)
Definition: Fl_Preferences.cxx:525
Fl_Window::size_range
void size_range(int minw, int minh, int maxw=0, int maxh=0, int dw=0, int dh=0, int aspect=0)
Definition: Fl_Window.H:438
Fl_Choice::value
int value() const
Definition: Fl_Choice.H:95
Fl_Return_Button
Definition: Fl_Return_Button.H:33
Fl_Double_Window::hide
void hide()
Definition: Fl_Double_Window.cxx:505
Fl_Widget::hide
virtual void hide()
Definition: Fl_Widget.cxx:283
FL_BORDER_BOX
see figure 1
Definition: Enumerations.H:619
Fl_Menu_::down_box
Fl_Boxtype down_box() const
Definition: Fl_Menu_.H:173
Fl_Input
Definition: Fl_Input.H:222
shell_run_display
Fl_Text_Display * shell_run_display
Definition: alignment_panel.cxx:359
menu_i18n_type_chooser
Fl_Menu_Item menu_i18n_type_chooser[]
Definition: alignment_panel.cxx:42
Fl_Tooltip::enable
static void enable(int b=1)
Definition: Fl_Tooltip.H:55
header_input_cb
void header_input_cb(Fl_Input *, void *)
Definition: Fl_Window_Type.cxx:244
completion_button
Fl_Check_Button * completion_button
Definition: alignment_panel.cxx:167
Fl::OPTION_FNFC_USES_GTK
Definition: Fl.H:224
cb_Cancel1
static void cb_Cancel1(Fl_Button *, void *)
Definition: alignment_panel.cxx:719
Fl_Preferences::SYSTEM
Preferences are used system-wide.
Definition: Fl_Preferences.H:67
include_H_from_C_button_cb
void include_H_from_C_button_cb(Fl_Check_Button *, void *)
Definition: Fl_Window_Type.cxx:255
Fl_Group
Definition: Fl_Group.H:41
Fl_Group::current
static Fl_Group * current()
Definition: Fl_Group.cxx:84
alignment_panel.h
cb_shell_savefl_button
static void cb_shell_savefl_button(Fl_Check_Button *, void *)
Definition: alignment_panel.cxx:349
prevpos_button
Fl_Check_Button * prevpos_button
Definition: alignment_panel.cxx:179
Fl_Widget::box
Fl_Boxtype box() const
Definition: Fl_Widget.H:363
Fl_Input_::textfont
Fl_Font textfont() const
Definition: Fl_Input_.H:386
FL_LIGHT1
const Fl_Color FL_LIGHT1
Definition: Enumerations.H:950
cb_Close1
static void cb_Close1(Fl_Button *, void *)
Definition: alignment_panel.cxx:217
cb_Close2
static void cb_Close2(Fl_Button *, void *)
Definition: alignment_panel.cxx:432
Fl_Widget::h
void h(int v)
Definition: Fl_Widget.H:145
cb_shell_run_button
static void cb_shell_run_button(Fl_Return_Button *, void *)
Definition: alignment_panel.cxx:363
wArrowFocus
Fl_Choice * wArrowFocus
Definition: alignment_panel.cxx:651
global_settings_window
Fl_Double_Window * global_settings_window
Definition: alignment_panel.cxx:635
cb_openlast_button
static void cb_openlast_button(Fl_Check_Button *, void *)
Definition: alignment_panel.cxx:175
i18n_type_chooser
Fl_Choice * i18n_type_chooser
Definition: alignment_panel.cxx:40
def_widget_size
Fl_Round_Button * def_widget_size[6]
Definition: alignment_panel.cxx:436
settings_window
Fl_Double_Window * settings_window
Definition: alignment_panel.cxx:147
readPrefs
static void readPrefs()
Definition: alignment_panel.cxx:562
cb_wGTKText
static void cb_wGTKText(Fl_Choice *, void *)
Definition: alignment_panel.cxx:695
Fl_Box
Definition: Fl_Box.H:34
project_window
Fl_Double_Window * project_window
Definition: alignment_panel.cxx:26
recent_spinner
Fl_Spinner * recent_spinner
Definition: alignment_panel.cxx:193
grid_window
Fl_Double_Window * grid_window
Definition: alignment_panel.cxx:422
FL_GTK_DOWN_BOX
#define FL_GTK_DOWN_BOX
Definition: Enumerations.H:697
load_history
void load_history()
Definition: fluid.cxx:1270
Fl_Widget::callback
Fl_Callback_p callback() const
Definition: Fl_Widget.H:561
Fl_Text_Display
Rich text display widget.
Definition: Fl_Text_Display.H:82
shell_run_button
Fl_Return_Button * shell_run_button
Definition: alignment_panel.cxx:361
default_widget_size_cb
void default_widget_size_cb(Fl_Round_Button *, long)
Definition: Fl_Window_Type.cxx:112
FL_ALIGN_CENTER
const Fl_Align FL_ALIGN_CENTER
Definition: Enumerations.H:830
make_settings_window
Fl_Double_Window * make_settings_window()
Definition: alignment_panel.cxx:221
shell_run_buffer
Fl_Text_Buffer * shell_run_buffer
Definition: alignment_panel.cxx:24
Fl_Double_Window
Definition: Fl_Double_Window.H:40
cb_wUserOrSystem
static void cb_wUserOrSystem(Fl_Choice *, void *)
Definition: alignment_panel.cxx:709
opt
static int opt[10][2]
Definition: alignment_panel.cxx:545
Fl_Spinner::maximum
double maximum() const
Definition: Fl_Spinner.H:155
Fl_Menu_Item
Definition: Fl_Menu_Item.H:112
grid_cb
void grid_cb(Fl_Int_Input *, long)
Definition: Fl_Window_Type.cxx:78
make_layout_window
Fl_Double_Window * make_layout_window()
Definition: alignment_panel.cxx:438
Fl_Window::set_non_modal
void set_non_modal()
Definition: Fl_Window.H:298
Fl_Widget::tooltip
const char * tooltip() const
Definition: Fl_Widget.H:552
FL_NORMAL_LABEL
draws the text (0)
Definition: Enumerations.H:764
show_global_settings_window
void show_global_settings_window()
Definition: alignment_panel.cxx:620
Fl_Preferences
Fl_Preferences provides methods to store user settings between application starts.
Definition: Fl_Preferences.H:60
cb_prevpos_button
static void cb_prevpos_button(Fl_Check_Button *, void *)
Definition: alignment_panel.cxx:181
vertical_input
Fl_Int_Input * vertical_input
Definition: alignment_panel.cxx:426
shell_command_input
Fl_Input * shell_command_input
Definition: alignment_panel.cxx:329
Fl_Widget::type
uchar type() const
Definition: Fl_Widget.H:274
fluid_prefs
Fl_Preferences fluid_prefs
code_file_input
Fl_Input * code_file_input
Definition: alignment_panel.cxx:34
Fl_Preferences::deleteEntry
char deleteEntry(const char *entry)
Definition: Fl_Preferences.cxx:478
Fl_Double_Window::show
void show()
Definition: Fl_Double_Window.cxx:79
wDNDText
Fl_Choice * wDNDText
Definition: alignment_panel.cxx:679
Fl_Preferences.H
FL_DARK1
const Fl_Color FL_DARK1
Definition: Enumerations.H:948
FL_ALIGN_RIGHT
const Fl_Align FL_ALIGN_RIGHT
Definition: Enumerations.H:841
cb_use_external_editor_button
static void cb_use_external_editor_button(Fl_Check_Button *, void *)
Definition: alignment_panel.cxx:202
i18n_int_cb
void i18n_int_cb(Fl_Int_Input *, void *)
Definition: Fl_Window_Type.cxx:170
use_FL_COMMAND_button
Fl_Check_Button * use_FL_COMMAND_button
Definition: alignment_panel.cxx:38
Fl_Text_Buffer
This class manages Unicode text displayed in one or more Fl_Text_Display widgets.
Definition: Fl_Text_Buffer.H:158
Fl_Widget::labelsize
Fl_Fontsize labelsize() const
Definition: Fl_Widget.H:502
i18n_function_input
Fl_Input * i18n_function_input
Definition: alignment_panel.cxx:55
Fl_Align
unsigned Fl_Align
Definition: Enumerations.H:828
uchar
unsigned char uchar
Definition: fl_types.h:30
redraw_browser
void redraw_browser()
Definition: Fl_Type.cxx:452
cb_OK
static void cb_OK(Fl_Button *, void *)
Definition: alignment_panel.cxx:723
Fl_Check_Button
A button with a "checkmark" to show its status.
Definition: Fl_Check_Button.H:30
make_global_settings_window
Fl_Double_Window * make_global_settings_window()
Definition: alignment_panel.cxx:728
i18n_file_input
Fl_Input * i18n_file_input
Definition: alignment_panel.cxx:51
cb_recent_spinner
static void cb_recent_spinner(Fl_Spinner *, void *)
Definition: alignment_panel.cxx:195
guides_toggle
Fl_Check_Button * guides_toggle
Definition: alignment_panel.cxx:430
menu_wUserOrSystem
Fl_Menu_Item menu_wUserOrSystem[]
Definition: alignment_panel.cxx:713
Fl_Group::resizable
void resizable(Fl_Widget &o)
Definition: Fl_Group.H:117
Fl_Spinner
Definition: Fl_Spinner.H:45
cb_wVisibleFocus
static void cb_wVisibleFocus(Fl_Choice *, void *)
Definition: alignment_panel.cxx:639
cb_editor_command_input
static void cb_editor_command_input(Fl_Input *, void *)
Definition: alignment_panel.cxx:210
FL_WHEN_ENTER_KEY
Do the callback when the user presses the ENTER key and the value changes.
Definition: Enumerations.H:445
FL_THIN_DOWN_BOX
see figure 1
Definition: Enumerations.H:612