1 | // |
---|
2 | // "$Id$" |
---|
3 | // |
---|
4 | // Setting and shell dialogs for the Fast Light Tool Kit (FLTK). |
---|
5 | // |
---|
6 | // Copyright 1998-2005 by Bill Spitzak and others. |
---|
7 | // |
---|
8 | // This library is free software; you can redistribute it and/or |
---|
9 | // modify it under the terms of the GNU Library General Public |
---|
10 | // License as published by the Free Software Foundation; either |
---|
11 | // version 2 of the License, or (at your option) any later version. |
---|
12 | // |
---|
13 | // This library is distributed in the hope that it will be useful, |
---|
14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
16 | // Library General Public License for more details. |
---|
17 | // |
---|
18 | // You should have received a copy of the GNU Library General Public |
---|
19 | // License along with this library; if not, write to the Free Software |
---|
20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
---|
21 | // USA. |
---|
22 | // |
---|
23 | // Please report all bugs and problems on the following page: |
---|
24 | // |
---|
25 | // http://www.fltk.org/str.php |
---|
26 | // |
---|
27 | |
---|
28 | // generated by Fast Light User Interface Designer (fluid) version 1.0110 |
---|
29 | |
---|
30 | #include "alignment_panel.h" |
---|
31 | |
---|
32 | Fl_Double_Window *project_window=(Fl_Double_Window *)0; |
---|
33 | |
---|
34 | static void cb_Close(Fl_Button*, void*) { |
---|
35 | project_window->hide(); |
---|
36 | } |
---|
37 | |
---|
38 | Fl_Input *header_file_input=(Fl_Input *)0; |
---|
39 | |
---|
40 | Fl_Input *code_file_input=(Fl_Input *)0; |
---|
41 | |
---|
42 | Fl_Check_Button *include_H_from_C_button=(Fl_Check_Button *)0; |
---|
43 | |
---|
44 | Fl_Check_Button *use_FL_COMMAND_button=(Fl_Check_Button *)0; |
---|
45 | |
---|
46 | Fl_Choice *i18n_type_chooser=(Fl_Choice *)0; |
---|
47 | |
---|
48 | Fl_Menu_Item menu_i18n_type_chooser[] = { |
---|
49 | {"None", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0}, |
---|
50 | {"GNU gettext", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0}, |
---|
51 | {"POSIX catgets", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0}, |
---|
52 | {0,0,0,0,0,0,0,0,0} |
---|
53 | }; |
---|
54 | |
---|
55 | Fl_Input *i18n_include_input=(Fl_Input *)0; |
---|
56 | |
---|
57 | Fl_Input *i18n_file_input=(Fl_Input *)0; |
---|
58 | |
---|
59 | Fl_Input *i18n_set_input=(Fl_Input *)0; |
---|
60 | |
---|
61 | Fl_Input *i18n_function_input=(Fl_Input *)0; |
---|
62 | |
---|
63 | Fl_Double_Window* make_project_window() { |
---|
64 | { project_window = new Fl_Double_Window(358, 207, "Project Settings"); |
---|
65 | { Fl_Button* o = new Fl_Button(293, 175, 52, 20, "Close"); |
---|
66 | o->tooltip("Close this dialog."); |
---|
67 | o->labelsize(11); |
---|
68 | o->callback((Fl_Callback*)cb_Close); |
---|
69 | } // Fl_Button* o |
---|
70 | { Fl_Tabs* o = new Fl_Tabs(10, 10, 335, 151); |
---|
71 | o->selection_color((Fl_Color)12); |
---|
72 | o->labelsize(11); |
---|
73 | { Fl_Group* o = new Fl_Group(10, 30, 335, 131, "Output"); |
---|
74 | o->labelsize(11); |
---|
75 | { Fl_Box* o = new Fl_Box(15, 40, 325, 15, "Use \"name.ext\" to set name or just \".ext\" to set extension."); |
---|
76 | o->labelsize(11); |
---|
77 | o->align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE); |
---|
78 | } // Fl_Box* o |
---|
79 | { header_file_input = new Fl_Input(96, 60, 228, 20, "Header File:"); |
---|
80 | header_file_input->tooltip("The name of the generated header file."); |
---|
81 | header_file_input->box(FL_THIN_DOWN_BOX); |
---|
82 | header_file_input->labelfont(1); |
---|
83 | header_file_input->labelsize(11); |
---|
84 | header_file_input->textfont(4); |
---|
85 | header_file_input->textsize(11); |
---|
86 | header_file_input->callback((Fl_Callback*)header_input_cb, (void*)(1)); |
---|
87 | header_file_input->when(FL_WHEN_CHANGED); |
---|
88 | } // Fl_Input* header_file_input |
---|
89 | { code_file_input = new Fl_Input(97, 85, 227, 20, "Code File:"); |
---|
90 | code_file_input->tooltip("The name of the generated code file."); |
---|
91 | code_file_input->box(FL_THIN_DOWN_BOX); |
---|
92 | code_file_input->labelfont(1); |
---|
93 | code_file_input->labelsize(11); |
---|
94 | code_file_input->textfont(4); |
---|
95 | code_file_input->textsize(11); |
---|
96 | code_file_input->callback((Fl_Callback*)code_input_cb, (void*)(1)); |
---|
97 | code_file_input->when(FL_WHEN_CHANGED); |
---|
98 | } // Fl_Input* code_file_input |
---|
99 | { include_H_from_C_button = new Fl_Check_Button(95, 110, 145, 20, "Include Header from Code"); |
---|
100 | include_H_from_C_button->tooltip("Include the header file from the code file."); |
---|
101 | include_H_from_C_button->down_box(FL_DOWN_BOX); |
---|
102 | include_H_from_C_button->labelsize(11); |
---|
103 | include_H_from_C_button->callback((Fl_Callback*)include_H_from_C_button_cb); |
---|
104 | } // Fl_Check_Button* include_H_from_C_button |
---|
105 | { use_FL_COMMAND_button = new Fl_Check_Button(95, 130, 245, 20, "Generate menu shortcuts using FL_COMMAND"); |
---|
106 | use_FL_COMMAND_button->tooltip("Replace FL_CTRL with FL_COMMAND when generating menu shortcut code."); |
---|
107 | use_FL_COMMAND_button->down_box(FL_DOWN_BOX); |
---|
108 | use_FL_COMMAND_button->labelsize(11); |
---|
109 | use_FL_COMMAND_button->callback((Fl_Callback*)use_FL_COMMAND_button_cb); |
---|
110 | } // Fl_Check_Button* use_FL_COMMAND_button |
---|
111 | o->end(); |
---|
112 | } // Fl_Group* o |
---|
113 | { Fl_Group* o = new Fl_Group(10, 30, 335, 131, "Internationalization"); |
---|
114 | o->labelsize(11); |
---|
115 | o->hide(); |
---|
116 | { i18n_type_chooser = new Fl_Choice(80, 42, 100, 20, "Use:"); |
---|
117 | i18n_type_chooser->tooltip("Type of internationalization to use."); |
---|
118 | i18n_type_chooser->box(FL_THIN_UP_BOX); |
---|
119 | i18n_type_chooser->down_box(FL_BORDER_BOX); |
---|
120 | i18n_type_chooser->labelfont(1); |
---|
121 | i18n_type_chooser->labelsize(11); |
---|
122 | i18n_type_chooser->textsize(11); |
---|
123 | i18n_type_chooser->callback((Fl_Callback*)i18n_type_cb); |
---|
124 | i18n_type_chooser->menu(menu_i18n_type_chooser); |
---|
125 | } // Fl_Choice* i18n_type_chooser |
---|
126 | { i18n_include_input = new Fl_Input(80, 67, 245, 20, "#include:"); |
---|
127 | i18n_include_input->tooltip("The include file for internationalization."); |
---|
128 | i18n_include_input->box(FL_THIN_DOWN_BOX); |
---|
129 | i18n_include_input->labelfont(1); |
---|
130 | i18n_include_input->labelsize(11); |
---|
131 | i18n_include_input->textfont(4); |
---|
132 | i18n_include_input->textsize(11); |
---|
133 | i18n_include_input->callback((Fl_Callback*)i18n_text_cb); |
---|
134 | } // Fl_Input* i18n_include_input |
---|
135 | { i18n_file_input = new Fl_Input(80, 92, 245, 20, "File:"); |
---|
136 | i18n_file_input->tooltip("The name of the message catalog."); |
---|
137 | i18n_file_input->box(FL_THIN_DOWN_BOX); |
---|
138 | i18n_file_input->labelfont(1); |
---|
139 | i18n_file_input->labelsize(11); |
---|
140 | i18n_file_input->textfont(4); |
---|
141 | i18n_file_input->textsize(11); |
---|
142 | i18n_file_input->callback((Fl_Callback*)i18n_text_cb); |
---|
143 | } // Fl_Input* i18n_file_input |
---|
144 | { i18n_set_input = new Fl_Input(80, 117, 245, 20, "Set:"); |
---|
145 | i18n_set_input->tooltip("The message set number."); |
---|
146 | i18n_set_input->type(2); |
---|
147 | i18n_set_input->box(FL_THIN_DOWN_BOX); |
---|
148 | i18n_set_input->labelfont(1); |
---|
149 | i18n_set_input->labelsize(11); |
---|
150 | i18n_set_input->textfont(4); |
---|
151 | i18n_set_input->textsize(11); |
---|
152 | i18n_set_input->callback((Fl_Callback*)i18n_text_cb); |
---|
153 | } // Fl_Input* i18n_set_input |
---|
154 | { i18n_function_input = new Fl_Input(80, 92, 245, 20, "Function:"); |
---|
155 | i18n_function_input->tooltip("The function to call to internationalize the labels and tooltips."); |
---|
156 | i18n_function_input->box(FL_THIN_DOWN_BOX); |
---|
157 | i18n_function_input->labelfont(1); |
---|
158 | i18n_function_input->labelsize(11); |
---|
159 | i18n_function_input->textfont(4); |
---|
160 | i18n_function_input->textsize(11); |
---|
161 | i18n_function_input->callback((Fl_Callback*)i18n_text_cb); |
---|
162 | } // Fl_Input* i18n_function_input |
---|
163 | o->end(); |
---|
164 | } // Fl_Group* o |
---|
165 | o->end(); |
---|
166 | } // Fl_Tabs* o |
---|
167 | project_window->set_modal(); |
---|
168 | project_window->end(); |
---|
169 | } // Fl_Double_Window* project_window |
---|
170 | return project_window; |
---|
171 | } |
---|
172 | Fl_Text_Buffer *shell_run_buffer; |
---|
173 | void scheme_cb(Fl_Choice *, void *); |
---|
174 | |
---|
175 | Fl_Double_Window *settings_window=(Fl_Double_Window *)0; |
---|
176 | |
---|
177 | Fl_Choice *scheme_choice=(Fl_Choice *)0; |
---|
178 | |
---|
179 | Fl_Menu_Item menu_scheme_choice[] = { |
---|
180 | {"Default", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, |
---|
181 | {"None", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, |
---|
182 | {"Plastic", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, |
---|
183 | {"GTK+", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, |
---|
184 | {0,0,0,0,0,0,0,0,0} |
---|
185 | }; |
---|
186 | |
---|
187 | Fl_Check_Button *tooltips_button=(Fl_Check_Button *)0; |
---|
188 | |
---|
189 | static void cb_tooltips_button(Fl_Check_Button*, void*) { |
---|
190 | Fl_Tooltip::enable(tooltips_button->value()); |
---|
191 | fluid_prefs.set("show_tooltips", tooltips_button->value()); |
---|
192 | } |
---|
193 | |
---|
194 | Fl_Check_Button *completion_button=(Fl_Check_Button *)0; |
---|
195 | |
---|
196 | static void cb_completion_button(Fl_Check_Button*, void*) { |
---|
197 | fluid_prefs.set("show_completion_dialogs", completion_button->value()); |
---|
198 | } |
---|
199 | |
---|
200 | Fl_Check_Button *openlast_button=(Fl_Check_Button *)0; |
---|
201 | |
---|
202 | static void cb_openlast_button(Fl_Check_Button*, void*) { |
---|
203 | fluid_prefs.set("open_previous_file", openlast_button->value()); |
---|
204 | } |
---|
205 | |
---|
206 | Fl_Check_Button *prevpos_button=(Fl_Check_Button *)0; |
---|
207 | |
---|
208 | static void cb_prevpos_button(Fl_Check_Button*, void*) { |
---|
209 | fluid_prefs.set("prev_window_pos", prevpos_button->value()); |
---|
210 | } |
---|
211 | |
---|
212 | static void cb_Close1(Fl_Button*, void*) { |
---|
213 | settings_window->hide(); |
---|
214 | } |
---|
215 | |
---|
216 | Fl_Spinner *recent_spinner=(Fl_Spinner *)0; |
---|
217 | |
---|
218 | static void cb_recent_spinner(Fl_Spinner*, void*) { |
---|
219 | fluid_prefs.set("recent_files", recent_spinner->value()); |
---|
220 | load_history(); |
---|
221 | } |
---|
222 | |
---|
223 | Fl_Double_Window* make_settings_window() { |
---|
224 | { settings_window = new Fl_Double_Window(340, 225, "GUI Settings"); |
---|
225 | { scheme_choice = new Fl_Choice(116, 10, 115, 25, "Scheme:"); |
---|
226 | scheme_choice->down_box(FL_BORDER_BOX); |
---|
227 | scheme_choice->labelfont(1); |
---|
228 | scheme_choice->callback((Fl_Callback*)scheme_cb); |
---|
229 | scheme_choice->menu(menu_scheme_choice); |
---|
230 | int s; |
---|
231 | fluid_prefs.get("scheme", s, 0); |
---|
232 | scheme_choice->value(s); |
---|
233 | scheme_cb(0, 0); |
---|
234 | } // Fl_Choice* scheme_choice |
---|
235 | { Fl_Group* o = new Fl_Group(116, 45, 215, 100, "Options:\n\n\n\n\n"); |
---|
236 | o->labelfont(1); |
---|
237 | o->align(FL_ALIGN_LEFT); |
---|
238 | { tooltips_button = new Fl_Check_Button(116, 45, 113, 25, "Show Tooltips"); |
---|
239 | tooltips_button->down_box(FL_DOWN_BOX); |
---|
240 | tooltips_button->callback((Fl_Callback*)cb_tooltips_button); |
---|
241 | int b; |
---|
242 | fluid_prefs.get("show_tooltips", b, 1); |
---|
243 | tooltips_button->value(b); |
---|
244 | Fl_Tooltip::enable(b); |
---|
245 | } // Fl_Check_Button* tooltips_button |
---|
246 | { completion_button = new Fl_Check_Button(116, 70, 186, 25, "Show Completion Dialogs"); |
---|
247 | completion_button->down_box(FL_DOWN_BOX); |
---|
248 | completion_button->callback((Fl_Callback*)cb_completion_button); |
---|
249 | int b; |
---|
250 | fluid_prefs.get("show_completion_dialogs", b, 1); |
---|
251 | completion_button->value(b); |
---|
252 | } // Fl_Check_Button* completion_button |
---|
253 | { openlast_button = new Fl_Check_Button(116, 95, 215, 25, "Open Previous File on Startup"); |
---|
254 | openlast_button->down_box(FL_DOWN_BOX); |
---|
255 | openlast_button->callback((Fl_Callback*)cb_openlast_button); |
---|
256 | int b; |
---|
257 | fluid_prefs.get("open_previous_file", b, 0); |
---|
258 | openlast_button->value(b); |
---|
259 | } // Fl_Check_Button* openlast_button |
---|
260 | { prevpos_button = new Fl_Check_Button(116, 120, 210, 25, "Remember Window Positions"); |
---|
261 | prevpos_button->down_box(FL_DOWN_BOX); |
---|
262 | prevpos_button->callback((Fl_Callback*)cb_prevpos_button); |
---|
263 | int b; |
---|
264 | fluid_prefs.get("prev_window_pos", b, 1); |
---|
265 | prevpos_button->value(b); |
---|
266 | } // Fl_Check_Button* prevpos_button |
---|
267 | o->end(); |
---|
268 | } // Fl_Group* o |
---|
269 | { Fl_Button* o = new Fl_Button(266, 190, 64, 25, "Close"); |
---|
270 | o->tooltip("Close this dialog."); |
---|
271 | o->callback((Fl_Callback*)cb_Close1); |
---|
272 | } // Fl_Button* o |
---|
273 | { recent_spinner = new Fl_Spinner(116, 155, 40, 25, "# Recent Files:"); |
---|
274 | recent_spinner->labelfont(1); |
---|
275 | recent_spinner->callback((Fl_Callback*)cb_recent_spinner); |
---|
276 | recent_spinner->when(FL_WHEN_CHANGED); |
---|
277 | int c; |
---|
278 | fluid_prefs.get("recent_files", c, 5); |
---|
279 | recent_spinner->maximum(10); |
---|
280 | recent_spinner->value(c); |
---|
281 | } // Fl_Spinner* recent_spinner |
---|
282 | settings_window->set_non_modal(); |
---|
283 | settings_window->end(); |
---|
284 | } // Fl_Double_Window* settings_window |
---|
285 | return settings_window; |
---|
286 | } |
---|
287 | |
---|
288 | Fl_Double_Window *shell_window=(Fl_Double_Window *)0; |
---|
289 | |
---|
290 | Fl_Input *shell_command_input=(Fl_Input *)0; |
---|
291 | |
---|
292 | static void cb_shell_command_input(Fl_Input*, void*) { |
---|
293 | fluid_prefs.set("shell_command", shell_command_input->value()); |
---|
294 | } |
---|
295 | |
---|
296 | Fl_Check_Button *shell_writecode_button=(Fl_Check_Button *)0; |
---|
297 | |
---|
298 | static void cb_shell_writecode_button(Fl_Check_Button*, void*) { |
---|
299 | fluid_prefs.set("shell_writecode", shell_writecode_button->value()); |
---|
300 | } |
---|
301 | |
---|
302 | Fl_Check_Button *shell_writemsgs_button=(Fl_Check_Button *)0; |
---|
303 | |
---|
304 | static void cb_shell_writemsgs_button(Fl_Check_Button*, void*) { |
---|
305 | fluid_prefs.set("shell_writemsgs", shell_writemsgs_button->value()); |
---|
306 | } |
---|
307 | |
---|
308 | Fl_Check_Button *shell_savefl_button=(Fl_Check_Button *)0; |
---|
309 | |
---|
310 | static void cb_shell_savefl_button(Fl_Check_Button*, void*) { |
---|
311 | fluid_prefs.set("shell_savefl", shell_savefl_button->value()); |
---|
312 | } |
---|
313 | |
---|
314 | static void cb_Cancel(Fl_Button*, void*) { |
---|
315 | shell_window->hide(); |
---|
316 | } |
---|
317 | |
---|
318 | Fl_Double_Window *shell_run_window=(Fl_Double_Window *)0; |
---|
319 | |
---|
320 | Fl_Text_Display *shell_run_display=(Fl_Text_Display *)0; |
---|
321 | |
---|
322 | Fl_Return_Button *shell_run_button=(Fl_Return_Button *)0; |
---|
323 | |
---|
324 | static void cb_shell_run_button(Fl_Return_Button*, void*) { |
---|
325 | shell_run_window->hide(); |
---|
326 | } |
---|
327 | |
---|
328 | Fl_Double_Window* make_shell_window() { |
---|
329 | { shell_window = new Fl_Double_Window(365, 125, "Shell Command"); |
---|
330 | { shell_command_input = new Fl_Input(10, 27, 347, 25, "Command:"); |
---|
331 | shell_command_input->labelfont(1); |
---|
332 | shell_command_input->callback((Fl_Callback*)cb_shell_command_input); |
---|
333 | shell_command_input->align(FL_ALIGN_TOP_LEFT); |
---|
334 | char buf[1024]; |
---|
335 | fluid_prefs.get("shell_command", buf, "", sizeof(buf)); |
---|
336 | shell_command_input->value(buf); |
---|
337 | } // Fl_Input* shell_command_input |
---|
338 | { shell_writecode_button = new Fl_Check_Button(128, 61, 93, 19, "Write Code"); |
---|
339 | shell_writecode_button->down_box(FL_DOWN_BOX); |
---|
340 | shell_writecode_button->callback((Fl_Callback*)cb_shell_writecode_button); |
---|
341 | int b; |
---|
342 | fluid_prefs.get("shell_writecode", b, 1); |
---|
343 | shell_writecode_button->value(b); |
---|
344 | } // Fl_Check_Button* shell_writecode_button |
---|
345 | { shell_writemsgs_button = new Fl_Check_Button(231, 61, 126, 19, "Write Messages"); |
---|
346 | shell_writemsgs_button->down_box(FL_DOWN_BOX); |
---|
347 | shell_writemsgs_button->callback((Fl_Callback*)cb_shell_writemsgs_button); |
---|
348 | int b; |
---|
349 | fluid_prefs.get("shell_writemsgs", b, 0); |
---|
350 | shell_writemsgs_button->value(b); |
---|
351 | } // Fl_Check_Button* shell_writemsgs_button |
---|
352 | { shell_savefl_button = new Fl_Check_Button(10, 62, 108, 19, "Save .FL File"); |
---|
353 | shell_savefl_button->down_box(FL_DOWN_BOX); |
---|
354 | shell_savefl_button->callback((Fl_Callback*)cb_shell_savefl_button); |
---|
355 | int b; |
---|
356 | fluid_prefs.get("shell_savefl", b, 1); |
---|
357 | shell_savefl_button->value(b); |
---|
358 | } // Fl_Check_Button* shell_savefl_button |
---|
359 | { Fl_Return_Button* o = new Fl_Return_Button(132, 90, 143, 25, "Run Command"); |
---|
360 | o->callback((Fl_Callback*)do_shell_command); |
---|
361 | } // Fl_Return_Button* o |
---|
362 | { Fl_Button* o = new Fl_Button(285, 90, 72, 25, "Cancel"); |
---|
363 | o->callback((Fl_Callback*)cb_Cancel); |
---|
364 | } // Fl_Button* o |
---|
365 | shell_window->end(); |
---|
366 | } // Fl_Double_Window* shell_window |
---|
367 | { shell_run_window = new Fl_Double_Window(555, 430, "Shell Command Output"); |
---|
368 | { shell_run_display = new Fl_Text_Display(10, 10, 535, 375); |
---|
369 | shell_run_display->box(FL_DOWN_BOX); |
---|
370 | shell_run_display->textfont(4); |
---|
371 | Fl_Group::current()->resizable(shell_run_display); |
---|
372 | shell_run_buffer = new Fl_Text_Buffer(); |
---|
373 | shell_run_display->buffer(shell_run_buffer); |
---|
374 | } // Fl_Text_Display* shell_run_display |
---|
375 | { shell_run_button = new Fl_Return_Button(468, 395, 77, 25, "Close"); |
---|
376 | shell_run_button->callback((Fl_Callback*)cb_shell_run_button); |
---|
377 | } // Fl_Return_Button* shell_run_button |
---|
378 | shell_run_window->end(); |
---|
379 | } // Fl_Double_Window* shell_run_window |
---|
380 | return shell_run_window; |
---|
381 | } |
---|
382 | |
---|
383 | Fl_Double_Window *grid_window=(Fl_Double_Window *)0; |
---|
384 | |
---|
385 | Fl_Input *horizontal_input=(Fl_Input *)0; |
---|
386 | |
---|
387 | Fl_Input *vertical_input=(Fl_Input *)0; |
---|
388 | |
---|
389 | Fl_Input *snap_input=(Fl_Input *)0; |
---|
390 | |
---|
391 | Fl_Check_Button *guides_toggle=(Fl_Check_Button *)0; |
---|
392 | |
---|
393 | static void cb_Close2(Fl_Button*, void*) { |
---|
394 | grid_window->hide(); |
---|
395 | } |
---|
396 | |
---|
397 | Fl_Round_Button *def_widget_size[6]={(Fl_Round_Button *)0}; |
---|
398 | |
---|
399 | Fl_Double_Window* make_layout_window() { |
---|
400 | { grid_window = new Fl_Double_Window(285, 245, "Layout Settings"); |
---|
401 | { Fl_Input* o = horizontal_input = new Fl_Input(106, 10, 50, 25, "x"); |
---|
402 | horizontal_input->tooltip("Horizontal grid spacing."); |
---|
403 | horizontal_input->type(2); |
---|
404 | horizontal_input->box(FL_THIN_DOWN_BOX); |
---|
405 | horizontal_input->callback((Fl_Callback*)grid_cb, (void*)(1)); |
---|
406 | horizontal_input->align(FL_ALIGN_RIGHT); |
---|
407 | o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); |
---|
408 | } // Fl_Input* horizontal_input |
---|
409 | { Fl_Input* o = vertical_input = new Fl_Input(166, 10, 50, 25, "pixels"); |
---|
410 | vertical_input->tooltip("Vertical grid spacing."); |
---|
411 | vertical_input->type(2); |
---|
412 | vertical_input->box(FL_THIN_DOWN_BOX); |
---|
413 | vertical_input->callback((Fl_Callback*)grid_cb, (void*)(2)); |
---|
414 | vertical_input->align(FL_ALIGN_RIGHT); |
---|
415 | o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); |
---|
416 | } // Fl_Input* vertical_input |
---|
417 | { Fl_Input* o = snap_input = new Fl_Input(106, 45, 50, 25, "pixel snap"); |
---|
418 | snap_input->tooltip("Snap to grid within this many pixels."); |
---|
419 | snap_input->type(2); |
---|
420 | snap_input->box(FL_THIN_DOWN_BOX); |
---|
421 | snap_input->callback((Fl_Callback*)grid_cb, (void*)(3)); |
---|
422 | snap_input->align(FL_ALIGN_RIGHT); |
---|
423 | o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); |
---|
424 | } // Fl_Input* snap_input |
---|
425 | { guides_toggle = new Fl_Check_Button(106, 80, 110, 25, "Show Guides"); |
---|
426 | guides_toggle->tooltip("Show distance and alignment guides in overlay"); |
---|
427 | guides_toggle->down_box(FL_DOWN_BOX); |
---|
428 | guides_toggle->callback((Fl_Callback*)guides_cb, (void*)(4)); |
---|
429 | } // Fl_Check_Button* guides_toggle |
---|
430 | { Fl_Button* o = new Fl_Button(215, 210, 60, 25, "Close"); |
---|
431 | o->tooltip("Close this dialog."); |
---|
432 | o->callback((Fl_Callback*)cb_Close2); |
---|
433 | } // Fl_Button* o |
---|
434 | { Fl_Box* o = new Fl_Box(26, 10, 70, 25, "Grid:"); |
---|
435 | o->labelfont(1); |
---|
436 | o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE); |
---|
437 | } // Fl_Box* o |
---|
438 | { Fl_Box* o = new Fl_Box(-1, 115, 97, 25, "Widget Size:"); |
---|
439 | o->labelfont(1); |
---|
440 | o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE); |
---|
441 | } // Fl_Box* o |
---|
442 | { Fl_Group* o = new Fl_Group(105, 115, 170, 75); |
---|
443 | { def_widget_size[0] = new Fl_Round_Button(105, 115, 70, 25); |
---|
444 | def_widget_size[0]->type(102); |
---|
445 | def_widget_size[0]->down_box(FL_ROUND_DOWN_BOX); |
---|
446 | def_widget_size[0]->callback((Fl_Callback*)default_widget_size_cb, (void*)(8)); |
---|
447 | } // Fl_Round_Button* def_widget_size[0] |
---|
448 | { Fl_Box* o = new Fl_Box(120, 115, 50, 25, "tiny"); |
---|
449 | o->labelsize(8); |
---|
450 | o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); |
---|
451 | } // Fl_Box* o |
---|
452 | { def_widget_size[1] = new Fl_Round_Button(180, 115, 70, 25); |
---|
453 | def_widget_size[1]->type(102); |
---|
454 | def_widget_size[1]->down_box(FL_ROUND_DOWN_BOX); |
---|
455 | def_widget_size[1]->callback((Fl_Callback*)default_widget_size_cb, (void*)(11)); |
---|
456 | } // Fl_Round_Button* def_widget_size[1] |
---|
457 | { Fl_Box* o = new Fl_Box(195, 115, 50, 25, "small"); |
---|
458 | o->labelsize(11); |
---|
459 | o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); |
---|
460 | } // Fl_Box* o |
---|
461 | { def_widget_size[2] = new Fl_Round_Button(105, 140, 70, 25); |
---|
462 | def_widget_size[2]->type(102); |
---|
463 | def_widget_size[2]->down_box(FL_ROUND_DOWN_BOX); |
---|
464 | def_widget_size[2]->callback((Fl_Callback*)default_widget_size_cb, (void*)(14)); |
---|
465 | } // Fl_Round_Button* def_widget_size[2] |
---|
466 | { Fl_Box* o = new Fl_Box(120, 140, 50, 25, "normal"); |
---|
467 | o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); |
---|
468 | } // Fl_Box* o |
---|
469 | { def_widget_size[3] = new Fl_Round_Button(180, 140, 90, 25); |
---|
470 | def_widget_size[3]->type(102); |
---|
471 | def_widget_size[3]->down_box(FL_ROUND_DOWN_BOX); |
---|
472 | def_widget_size[3]->callback((Fl_Callback*)default_widget_size_cb, (void*)(18)); |
---|
473 | } // Fl_Round_Button* def_widget_size[3] |
---|
474 | { Fl_Box* o = new Fl_Box(195, 140, 68, 25, "medium"); |
---|
475 | o->labelsize(18); |
---|
476 | o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); |
---|
477 | } // Fl_Box* o |
---|
478 | { def_widget_size[4] = new Fl_Round_Button(105, 165, 75, 25); |
---|
479 | def_widget_size[4]->type(102); |
---|
480 | def_widget_size[4]->down_box(FL_ROUND_DOWN_BOX); |
---|
481 | def_widget_size[4]->callback((Fl_Callback*)default_widget_size_cb, (void*)(24)); |
---|
482 | } // Fl_Round_Button* def_widget_size[4] |
---|
483 | { Fl_Box* o = new Fl_Box(120, 165, 64, 25, "large"); |
---|
484 | o->labelsize(24); |
---|
485 | o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); |
---|
486 | } // Fl_Box* o |
---|
487 | { def_widget_size[5] = new Fl_Round_Button(180, 165, 95, 25); |
---|
488 | def_widget_size[5]->type(102); |
---|
489 | def_widget_size[5]->down_box(FL_ROUND_DOWN_BOX); |
---|
490 | def_widget_size[5]->callback((Fl_Callback*)default_widget_size_cb, (void*)(32)); |
---|
491 | } // Fl_Round_Button* def_widget_size[5] |
---|
492 | { Fl_Box* o = new Fl_Box(195, 165, 76, 25, "huge"); |
---|
493 | o->labelsize(32); |
---|
494 | o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); |
---|
495 | } // Fl_Box* o |
---|
496 | o->end(); |
---|
497 | } // Fl_Group* o |
---|
498 | grid_window->set_non_modal(); |
---|
499 | grid_window->end(); |
---|
500 | } // Fl_Double_Window* grid_window |
---|
501 | return grid_window; |
---|
502 | } |
---|
503 | |
---|
504 | // |
---|
505 | // End of "$Id$". |
---|
506 | // |
---|