Bug fixes and UI tweaking...

src/Fl_Menu_.cxx:
    - Fl_Menu_::find_item(): wasn't checking for a non-NULL label()...

fluid/alignment_panel.*:
fluid/widget_panel.*:
    - Use small controls, normalize layout.
    - Add FLTK header/footer comments.

fluid/Fluid_Image.cxx:
    - Use relative paths for images.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4127 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2005-03-18 06:29:11 +00:00
parent 1e742cc41f
commit a218f44b5d
8 changed files with 633 additions and 277 deletions
+1 -1
View File
@@ -212,7 +212,7 @@ Fluid_Image::~Fluid_Image() {
const char *ui_find_image_name; const char *ui_find_image_name;
Fluid_Image *ui_find_image(const char *oldname) { Fluid_Image *ui_find_image(const char *oldname) {
goto_source_dir(); goto_source_dir();
const char *name = fl_file_chooser("Image?","Image Files (*.{bm,bmp,gif,jpg,pbm,pgm,png,ppm,xbm,xpm})",oldname); const char *name = fl_file_chooser("Image?","Image Files (*.{bm,bmp,gif,jpg,pbm,pgm,png,ppm,xbm,xpm})",oldname,1);
ui_find_image_name = name; ui_find_image_name = name;
Fluid_Image *ret = (name && *name) ? Fluid_Image::find(name) : 0; Fluid_Image *ret = (name && *name) ? Fluid_Image::find(name) : 0;
leave_source_dir(); leave_source_dir();
+121 -43
View File
@@ -1,3 +1,30 @@
//
// "$Id$"
//
// Setting and shell dialogs for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// generated by Fast Light User Interface Designer (fluid) version 1.0107 // generated by Fast Light User Interface Designer (fluid) version 1.0107
#include "alignment_panel.h" #include "alignment_panel.h"
@@ -33,40 +60,43 @@ Fl_Input *i18n_function_input=(Fl_Input *)0;
Fl_Double_Window* make_project_window() { Fl_Double_Window* make_project_window() {
Fl_Double_Window* w; Fl_Double_Window* w;
{ Fl_Double_Window* o = project_window = new Fl_Double_Window(365, 210, "Project Settings"); { Fl_Double_Window* o = project_window = new Fl_Double_Window(345, 185, "Project Settings");
w = o; w = o;
{ Fl_Button* o = new Fl_Button(295, 175, 60, 25, "Close"); { Fl_Button* o = new Fl_Button(293, 156, 42, 20, "Close");
o->tooltip("Close this dialog."); o->tooltip("Close this dialog.");
o->labelsize(11);
o->callback((Fl_Callback*)cb_Close); o->callback((Fl_Callback*)cb_Close);
} }
{ Fl_Tabs* o = new Fl_Tabs(10, 10, 345, 154); { Fl_Tabs* o = new Fl_Tabs(10, 10, 325, 138);
o->selection_color(FL_INACTIVE_COLOR);
o->labelsize(11); o->labelsize(11);
{ Fl_Group* o = new Fl_Group(10, 30, 345, 134, "Output"); { Fl_Group* o = new Fl_Group(10, 30, 325, 116, "Output");
o->labelsize(11); o->labelsize(11);
o->hide(); { Fl_Box* o = new Fl_Box(20, 40, 304, 15, "Use \"name.ext\" to set name or just \".ext\" to set extension.");
{ Fl_Box* o = new Fl_Box(23, 40, 319, 15, "Use \"name.ext\" to set name or just \".ext\" to set only extension.");
o->labelsize(11); o->labelsize(11);
o->align(132|FL_ALIGN_INSIDE); o->align(132|FL_ALIGN_INSIDE);
} }
{ Fl_Input* o = header_file_input = new Fl_Input(97, 60, 245, 20, "Header File:"); { Fl_Input* o = header_file_input = new Fl_Input(96, 60, 228, 20, "Header File:");
o->tooltip("The name of the generated header file."); o->tooltip("The name of the generated header file.");
o->box(FL_THIN_DOWN_BOX); o->box(FL_THIN_DOWN_BOX);
o->labelfont(1);
o->labelsize(11); o->labelsize(11);
o->textfont(4); o->textfont(4);
o->textsize(11); o->textsize(11);
o->callback((Fl_Callback*)header_input_cb, (void*)(1)); o->callback((Fl_Callback*)header_input_cb, (void*)(1));
o->when(FL_WHEN_CHANGED); o->when(FL_WHEN_CHANGED);
} }
{ Fl_Input* o = code_file_input = new Fl_Input(98, 85, 244, 20, "Code File:"); { Fl_Input* o = code_file_input = new Fl_Input(97, 85, 227, 20, "Code File:");
o->tooltip("The name of the generated code file."); o->tooltip("The name of the generated code file.");
o->box(FL_THIN_DOWN_BOX); o->box(FL_THIN_DOWN_BOX);
o->labelfont(1);
o->labelsize(11); o->labelsize(11);
o->textfont(4); o->textfont(4);
o->textsize(11); o->textsize(11);
o->callback((Fl_Callback*)code_input_cb, (void*)(1)); o->callback((Fl_Callback*)code_input_cb, (void*)(1));
o->when(FL_WHEN_CHANGED); o->when(FL_WHEN_CHANGED);
} }
{ Fl_Light_Button* o = include_H_from_C_button = new Fl_Light_Button(177, 110, 165, 20, "Include Header from Code"); { Fl_Light_Button* o = include_H_from_C_button = new Fl_Light_Button(166, 110, 158, 20, "Include Header from Code");
o->tooltip("Include the header file from the code file."); o->tooltip("Include the header file from the code file.");
o->value(1); o->value(1);
o->labelsize(11); o->labelsize(11);
@@ -74,45 +104,51 @@ Fl_Double_Window* make_project_window() {
} }
o->end(); o->end();
} }
{ Fl_Group* o = new Fl_Group(10, 30, 345, 134, "Internationalization"); { Fl_Group* o = new Fl_Group(10, 30, 325, 116, "Internationalization");
o->labelsize(11); o->labelsize(11);
{ Fl_Choice* o = i18n_type_chooser = new Fl_Choice(100, 42, 100, 20, "Use:"); o->hide();
{ Fl_Choice* o = i18n_type_chooser = new Fl_Choice(80, 42, 100, 20, "Use:");
o->tooltip("Type of internationalization to use."); o->tooltip("Type of internationalization to use.");
o->box(FL_THIN_UP_BOX); o->box(FL_THIN_UP_BOX);
o->down_box(FL_BORDER_BOX); o->down_box(FL_BORDER_BOX);
o->labelfont(1);
o->labelsize(11); o->labelsize(11);
o->textsize(11); o->textsize(11);
o->callback((Fl_Callback*)i18n_type_cb); o->callback((Fl_Callback*)i18n_type_cb);
o->menu(menu_i18n_type_chooser); o->menu(menu_i18n_type_chooser);
} }
{ Fl_Input* o = i18n_include_input = new Fl_Input(100, 67, 245, 20, "#include:"); { Fl_Input* o = i18n_include_input = new Fl_Input(80, 67, 245, 20, "#include:");
o->tooltip("The include file for internationalization."); o->tooltip("The include file for internationalization.");
o->box(FL_THIN_DOWN_BOX); o->box(FL_THIN_DOWN_BOX);
o->labelfont(1);
o->labelsize(11); o->labelsize(11);
o->textfont(4); o->textfont(4);
o->textsize(11); o->textsize(11);
o->callback((Fl_Callback*)i18n_text_cb); o->callback((Fl_Callback*)i18n_text_cb);
} }
{ Fl_Input* o = i18n_file_input = new Fl_Input(100, 92, 245, 20, "File:"); { Fl_Input* o = i18n_file_input = new Fl_Input(80, 92, 245, 20, "File:");
o->tooltip("The name of the message catalog."); o->tooltip("The name of the message catalog.");
o->box(FL_THIN_DOWN_BOX); o->box(FL_THIN_DOWN_BOX);
o->labelfont(1);
o->labelsize(11); o->labelsize(11);
o->textfont(4); o->textfont(4);
o->textsize(11); o->textsize(11);
o->callback((Fl_Callback*)i18n_text_cb); o->callback((Fl_Callback*)i18n_text_cb);
} }
{ Fl_Input* o = i18n_set_input = new Fl_Input(100, 117, 245, 20, "Set:"); { Fl_Input* o = i18n_set_input = new Fl_Input(80, 117, 245, 20, "Set:");
o->tooltip("The message set number."); o->tooltip("The message set number.");
o->type(2); o->type(2);
o->box(FL_THIN_DOWN_BOX); o->box(FL_THIN_DOWN_BOX);
o->labelfont(1);
o->labelsize(11); o->labelsize(11);
o->textfont(4); o->textfont(4);
o->textsize(11); o->textsize(11);
o->callback((Fl_Callback*)i18n_text_cb); o->callback((Fl_Callback*)i18n_text_cb);
} }
{ Fl_Input* o = i18n_function_input = new Fl_Input(100, 92, 245, 20, "Function:"); { Fl_Input* o = i18n_function_input = new Fl_Input(80, 92, 245, 20, "Function:");
o->tooltip("The function to call to internationalize the labels and tooltips."); o->tooltip("The function to call to internationalize the labels and tooltips.");
o->box(FL_THIN_DOWN_BOX); o->box(FL_THIN_DOWN_BOX);
o->labelfont(1);
o->labelsize(11); o->labelsize(11);
o->textfont(4); o->textfont(4);
o->textsize(11); o->textsize(11);
@@ -162,39 +198,48 @@ static void cb_prevpos_button(Fl_Check_Button*, void*) {
Fl_Double_Window* make_settings_window() { Fl_Double_Window* make_settings_window() {
Fl_Double_Window* w; Fl_Double_Window* w;
{ Fl_Double_Window* o = settings_window = new Fl_Double_Window(255, 210, "GUI Settings"); { Fl_Double_Window* o = settings_window = new Fl_Double_Window(215, 185, "GUI Settings");
w = o; w = o;
{ Fl_Button* o = new Fl_Button(185, 179, 60, 25, "Close"); o->labelsize(11);
{ Fl_Button* o = new Fl_Button(163, 155, 42, 20, "Close");
o->tooltip("Close this dialog."); o->tooltip("Close this dialog.");
o->labelsize(11);
o->callback((Fl_Callback*)cb_Close1); o->callback((Fl_Callback*)cb_Close1);
} }
{ Fl_Tabs* o = new Fl_Tabs(10, 10, 235, 158); { Fl_Tabs* o = new Fl_Tabs(10, 10, 195, 135);
{ Fl_Group* o = new Fl_Group(10, 35, 235, 133, "GUI:"); o->selection_color(FL_INACTIVE_COLOR);
o->labelsize(11);
{ Fl_Group* o = new Fl_Group(10, 30, 195, 115, "GUI:");
o->labelsize(11);
o->align(FL_ALIGN_TOP_LEFT); o->align(FL_ALIGN_TOP_LEFT);
{ Fl_Check_Button* o = tooltips_button = new Fl_Check_Button(20, 45, 215, 20, "Show Tooltips"); { Fl_Check_Button* o = tooltips_button = new Fl_Check_Button(20, 40, 97, 20, "Show Tooltips");
o->down_box(FL_DOWN_BOX); o->down_box(FL_DOWN_BOX);
o->labelsize(11);
o->callback((Fl_Callback*)cb_tooltips_button); o->callback((Fl_Callback*)cb_tooltips_button);
int b; int b;
fluid_prefs.get("show_tooltips", b, 1); fluid_prefs.get("show_tooltips", b, 1);
tooltips_button->value(b); tooltips_button->value(b);
Fl_Tooltip::enable(b); Fl_Tooltip::enable(b);
} }
{ Fl_Check_Button* o = completion_button = new Fl_Check_Button(20, 75, 215, 20, "Show Completion Dialogs"); { Fl_Check_Button* o = completion_button = new Fl_Check_Button(20, 65, 152, 20, "Show Completion Dialogs");
o->down_box(FL_DOWN_BOX); o->down_box(FL_DOWN_BOX);
o->labelsize(11);
o->callback((Fl_Callback*)cb_completion_button); o->callback((Fl_Callback*)cb_completion_button);
int b; int b;
fluid_prefs.get("show_completion_dialogs", b, 1); fluid_prefs.get("show_completion_dialogs", b, 1);
completion_button->value(b); completion_button->value(b);
} }
{ Fl_Check_Button* o = openlast_button = new Fl_Check_Button(20, 105, 215, 20, "Open Previous File on Startup"); { Fl_Check_Button* o = openlast_button = new Fl_Check_Button(20, 90, 175, 20, "Open Previous File on Startup");
o->down_box(FL_DOWN_BOX); o->down_box(FL_DOWN_BOX);
o->labelsize(11);
o->callback((Fl_Callback*)cb_openlast_button); o->callback((Fl_Callback*)cb_openlast_button);
int b; int b;
fluid_prefs.get("open_previous_file", b, 0); fluid_prefs.get("open_previous_file", b, 0);
openlast_button->value(b); openlast_button->value(b);
} }
{ Fl_Check_Button* o = prevpos_button = new Fl_Check_Button(20, 135, 215, 20, "Remember Window Positions"); { Fl_Check_Button* o = prevpos_button = new Fl_Check_Button(20, 115, 175, 20, "Remember Window Positions");
o->down_box(FL_DOWN_BOX); o->down_box(FL_DOWN_BOX);
o->labelsize(11);
o->callback((Fl_Callback*)cb_prevpos_button); o->callback((Fl_Callback*)cb_prevpos_button);
int b; int b;
fluid_prefs.get("prev_window_pos", b, 1); fluid_prefs.get("prev_window_pos", b, 1);
@@ -251,33 +296,42 @@ Fl_Text_Display *shell_run_display=(Fl_Text_Display *)0;
Fl_Double_Window* make_shell_window() { Fl_Double_Window* make_shell_window() {
Fl_Double_Window* w; Fl_Double_Window* w;
{ Fl_Double_Window* o = shell_window = new Fl_Double_Window(450, 145, "Shell Command"); { Fl_Double_Window* o = shell_window = new Fl_Double_Window(335, 135, "Shell Command");
w = o; w = o;
{ Fl_Tabs* o = new Fl_Tabs(10, 10, 430, 90); o->labelsize(11);
{ Fl_Group* o = new Fl_Group(10, 30, 430, 70, "Shell Command"); { Fl_Tabs* o = new Fl_Tabs(10, 10, 314, 85);
o->selection_color(FL_INACTIVE_COLOR);
o->labelsize(11);
{ Fl_Group* o = new Fl_Group(10, 30, 314, 65, "Shell Command");
o->labelsize(11);
o->align(FL_ALIGN_TOP_LEFT); o->align(FL_ALIGN_TOP_LEFT);
{ Fl_Input* o = shell_command_input = new Fl_Input(20, 40, 410, 20); { Fl_Input* o = shell_command_input = new Fl_Input(20, 40, 294, 21);
o->labelsize(11);
o->textsize(11);
o->callback((Fl_Callback*)cb_shell_command_input); o->callback((Fl_Callback*)cb_shell_command_input);
char buf[1024]; char buf[1024];
fluid_prefs.get("shell_command", buf, "", sizeof(buf)); fluid_prefs.get("shell_command", buf, "", sizeof(buf));
shell_command_input->value(buf); shell_command_input->value(buf);
} }
{ Fl_Check_Button* o = shell_savefl_button = new Fl_Check_Button(20, 65, 110, 20, "Save .FL File"); { Fl_Check_Button* o = shell_savefl_button = new Fl_Check_Button(20, 66, 93, 19, "Save .FL File");
o->down_box(FL_DOWN_BOX); o->down_box(FL_DOWN_BOX);
o->labelsize(11);
o->callback((Fl_Callback*)cb_shell_savefl_button); o->callback((Fl_Callback*)cb_shell_savefl_button);
int b; int b;
fluid_prefs.get("shell_savefl", b, 1); fluid_prefs.get("shell_savefl", b, 1);
shell_savefl_button->value(b); shell_savefl_button->value(b);
} }
{ Fl_Check_Button* o = shell_writecode_button = new Fl_Check_Button(140, 65, 95, 20, "Write Code"); { Fl_Check_Button* o = shell_writecode_button = new Fl_Check_Button(118, 66, 83, 19, "Write Code");
o->down_box(FL_DOWN_BOX); o->down_box(FL_DOWN_BOX);
o->labelsize(11);
o->callback((Fl_Callback*)cb_shell_writecode_button); o->callback((Fl_Callback*)cb_shell_writecode_button);
int b; int b;
fluid_prefs.get("shell_writecode", b, 1); fluid_prefs.get("shell_writecode", b, 1);
shell_writecode_button->value(b); shell_writecode_button->value(b);
} }
{ Fl_Check_Button* o = shell_writemsgs_button = new Fl_Check_Button(245, 65, 130, 20, "Write Messages"); { Fl_Check_Button* o = shell_writemsgs_button = new Fl_Check_Button(206, 66, 108, 19, "Write Messages");
o->down_box(FL_DOWN_BOX); o->down_box(FL_DOWN_BOX);
o->labelsize(11);
o->callback((Fl_Callback*)cb_shell_writemsgs_button); o->callback((Fl_Callback*)cb_shell_writemsgs_button);
int b; int b;
fluid_prefs.get("shell_writemsgs", b, 0); fluid_prefs.get("shell_writemsgs", b, 0);
@@ -287,22 +341,27 @@ Fl_Double_Window* make_shell_window() {
} }
o->end(); o->end();
} }
{ Fl_Button* o = new Fl_Button(375, 110, 65, 25, "Cancel"); { Fl_Button* o = new Fl_Button(276, 105, 48, 20, "Cancel");
o->labelsize(11);
o->callback((Fl_Callback*)cb_Cancel); o->callback((Fl_Callback*)cb_Cancel);
} }
{ Fl_Return_Button* o = new Fl_Return_Button(225, 110, 140, 25, "Run Command"); { Fl_Return_Button* o = new Fl_Return_Button(162, 105, 109, 20, "Run Command");
o->labelsize(11);
o->callback((Fl_Callback*)do_shell_command); o->callback((Fl_Callback*)do_shell_command);
} }
o->end(); o->end();
} }
{ Fl_Double_Window* o = shell_run_window = new Fl_Double_Window(555, 435, "Shell Command Output"); { Fl_Double_Window* o = shell_run_window = new Fl_Double_Window(555, 430, "Shell Command Output");
w = o; w = o;
{ Fl_Return_Button* o = shell_run_button = new Fl_Return_Button(465, 400, 80, 25, "Close"); o->labelsize(11);
{ Fl_Return_Button* o = shell_run_button = new Fl_Return_Button(486, 400, 59, 20, "Close");
o->labelsize(11);
o->callback((Fl_Callback*)cb_shell_run_button); o->callback((Fl_Callback*)cb_shell_run_button);
} }
{ Fl_Text_Display* o = shell_run_display = new Fl_Text_Display(10, 10, 530, 380); { Fl_Text_Display* o = shell_run_display = new Fl_Text_Display(10, 10, 530, 380);
o->labelsize(11);
o->textfont(4); o->textfont(4);
o->textsize(12); o->textsize(11);
Fl_Group::current()->resizable(o); Fl_Group::current()->resizable(o);
shell_run_buffer = new Fl_Text_Buffer(); shell_run_buffer = new Fl_Text_Buffer();
shell_run_display->buffer(shell_run_buffer); shell_run_display->buffer(shell_run_buffer);
@@ -328,47 +387,66 @@ static void cb_Close2(Fl_Button*, void*) {
Fl_Double_Window* make_grid_window() { Fl_Double_Window* make_grid_window() {
Fl_Double_Window* w; Fl_Double_Window* w;
{ Fl_Double_Window* o = grid_window = new Fl_Double_Window(155, 205, "Grid"); { Fl_Double_Window* o = grid_window = new Fl_Double_Window(145, 180, "Grid");
w = o; w = o;
{ Fl_Tabs* o = new Fl_Tabs(10, 10, 135, 150); o->labelsize(11);
{ Fl_Tabs* o = new Fl_Tabs(10, 10, 124, 131);
o->selection_color(FL_INACTIVE_COLOR);
o->labelsize(11);
o->align(FL_ALIGN_TOP_LEFT); o->align(FL_ALIGN_TOP_LEFT);
{ Fl_Group* o = new Fl_Group(10, 30, 135, 130, "Grid"); { Fl_Group* o = new Fl_Group(10, 30, 124, 111, "Grid");
o->labelsize(11);
o->align(FL_ALIGN_TOP_LEFT); o->align(FL_ALIGN_TOP_LEFT);
{ Fl_Input* o = horizontal_input = new Fl_Input(95, 40, 40, 20, "Horizontal:"); { Fl_Input* o = horizontal_input = new Fl_Input(84, 40, 40, 20, "Horizontal:");
o->tooltip("Horizontal grid spacing."); o->tooltip("Horizontal grid spacing.");
o->type(2); o->type(2);
o->box(FL_THIN_DOWN_BOX); o->box(FL_THIN_DOWN_BOX);
o->labelfont(1);
o->labelsize(11);
o->textsize(11);
o->callback((Fl_Callback*)grid_cb, (void*)(1)); o->callback((Fl_Callback*)grid_cb, (void*)(1));
o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
} }
{ Fl_Input* o = vertical_input = new Fl_Input(95, 70, 40, 20, "Vertical:"); { Fl_Input* o = vertical_input = new Fl_Input(84, 65, 40, 20, "Vertical:");
o->tooltip("Vertical grid spacing."); o->tooltip("Vertical grid spacing.");
o->type(2); o->type(2);
o->box(FL_THIN_DOWN_BOX); o->box(FL_THIN_DOWN_BOX);
o->labelfont(1);
o->labelsize(11);
o->textsize(11);
o->callback((Fl_Callback*)grid_cb, (void*)(2)); o->callback((Fl_Callback*)grid_cb, (void*)(2));
o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
} }
{ Fl_Input* o = snap_input = new Fl_Input(95, 100, 40, 20, "Snap:"); { Fl_Input* o = snap_input = new Fl_Input(84, 90, 40, 20, "Snap:");
o->tooltip("Snap to grid within this many pixels."); o->tooltip("Snap to grid within this many pixels.");
o->type(2); o->type(2);
o->box(FL_THIN_DOWN_BOX); o->box(FL_THIN_DOWN_BOX);
o->labelfont(1);
o->labelsize(11);
o->textsize(11);
o->callback((Fl_Callback*)grid_cb, (void*)(3)); o->callback((Fl_Callback*)grid_cb, (void*)(3));
o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
} }
{ Fl_Check_Button* o = guides_toggle = new Fl_Check_Button(30, 125, 105, 25, "Show Guides"); { Fl_Check_Button* o = guides_toggle = new Fl_Check_Button(30, 115, 94, 16, "Show Guides");
o->tooltip("Show distance and alignment guides in overlay"); o->tooltip("Show distance and alignment guides in overlay");
o->down_box(FL_DOWN_BOX); o->down_box(FL_DOWN_BOX);
o->labelsize(11);
o->callback((Fl_Callback*)guides_cb, (void*)(4)); o->callback((Fl_Callback*)guides_cb, (void*)(4));
} }
o->end(); o->end();
} }
o->end(); o->end();
} }
{ Fl_Button* o = new Fl_Button(85, 170, 60, 25, "Close"); { Fl_Button* o = new Fl_Button(92, 151, 42, 20, "Close");
o->tooltip("Close this dialog."); o->tooltip("Close this dialog.");
o->labelsize(11);
o->callback((Fl_Callback*)cb_Close2); o->callback((Fl_Callback*)cb_Close2);
} }
o->end(); o->end();
} }
return w; return w;
} }
//
// End of "$Id$".
//
+81 -46
View File
@@ -2,6 +2,35 @@
version 1.0107 version 1.0107
header_name {.h} header_name {.h}
code_name {.cxx} code_name {.cxx}
comment {//
// "$Id$"
//
// Setting and shell dialogs for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
} {in_source in_header
}
decl {\#include <FL/Fl_Text_Buffer.H>} {public decl {\#include <FL/Fl_Text_Buffer.H>} {public
} }
@@ -12,52 +41,52 @@ Function {make_project_window()} {open
} { } {
Fl_Window project_window { Fl_Window project_window {
label {Project Settings} open label {Project Settings} open
xywh {312 395 365 210} type Double xywh {312 395 345 185} type Double hide
code0 {\#include <FL/Fl_Preferences.H>} code0 {\#include <FL/Fl_Preferences.H>}
code1 {\#include <FL/Fl_Tooltip.H>} modal visible code1 {\#include <FL/Fl_Tooltip.H>} modal
} { } {
Fl_Button {} { Fl_Button {} {
label Close label Close
callback {project_window->hide();} callback {project_window->hide();}
tooltip {Close this dialog.} xywh {295 175 60 25} tooltip {Close this dialog.} xywh {293 156 42 20} labelsize 11
} }
Fl_Tabs {} {open selected Fl_Tabs {} {open
xywh {10 10 345 154} labelsize 11 xywh {10 10 325 138} selection_color 8 labelsize 11
} { } {
Fl_Group {} { Fl_Group {} {
label Output open label Output open
xywh {10 30 345 134} labelsize 11 hide xywh {10 30 325 116} labelsize 11
} { } {
Fl_Box {} { Fl_Box {} {
label {Use "name.ext" to set name or just ".ext" to set only extension.} label {Use "name.ext" to set name or just ".ext" to set extension.}
xywh {23 40 319 15} labelsize 11 align 148 xywh {20 40 304 15} labelsize 11 align 148
} }
Fl_Input header_file_input { Fl_Input header_file_input {
label {Header File:} label {Header File:}
user_data 1 user_data_type {void*} user_data 1 user_data_type {void*}
callback header_input_cb callback header_input_cb
tooltip {The name of the generated header file.} xywh {97 60 245 20} box THIN_DOWN_BOX labelsize 11 when 1 textfont 4 textsize 11 tooltip {The name of the generated header file.} xywh {96 60 228 20} box THIN_DOWN_BOX labelfont 1 labelsize 11 when 1 textfont 4 textsize 11
} }
Fl_Input code_file_input { Fl_Input code_file_input {
label {Code File:} label {Code File:}
user_data 1 user_data_type {void*} user_data 1 user_data_type {void*}
callback code_input_cb callback code_input_cb
tooltip {The name of the generated code file.} xywh {98 85 244 20} box THIN_DOWN_BOX labelsize 11 when 1 textfont 4 textsize 11 tooltip {The name of the generated code file.} xywh {97 85 227 20} box THIN_DOWN_BOX labelfont 1 labelsize 11 when 1 textfont 4 textsize 11
} }
Fl_Light_Button include_H_from_C_button { Fl_Light_Button include_H_from_C_button {
label {Include Header from Code} label {Include Header from Code}
callback include_H_from_C_button_cb callback include_H_from_C_button_cb
tooltip {Include the header file from the code file.} xywh {177 110 165 20} value 1 labelsize 11 tooltip {Include the header file from the code file.} xywh {166 110 158 20} value 1 labelsize 11
} }
} }
Fl_Group {} { Fl_Group {} {
label Internationalization open label Internationalization open
xywh {10 30 345 134} labelsize 11 xywh {10 30 325 116} labelsize 11 hide
} { } {
Fl_Choice i18n_type_chooser { Fl_Choice i18n_type_chooser {
label {Use:} label {Use:}
callback i18n_type_cb open callback i18n_type_cb open
tooltip {Type of internationalization to use.} xywh {100 42 100 20} box THIN_UP_BOX down_box BORDER_BOX labelsize 11 textsize 11 tooltip {Type of internationalization to use.} xywh {80 42 100 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11
} { } {
menuitem {} { menuitem {} {
label None label None
@@ -75,22 +104,22 @@ Function {make_project_window()} {open
Fl_Input i18n_include_input { Fl_Input i18n_include_input {
label {\#include:} label {\#include:}
callback i18n_text_cb callback i18n_text_cb
tooltip {The include file for internationalization.} xywh {100 67 245 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 tooltip {The include file for internationalization.} xywh {80 67 245 20} box THIN_DOWN_BOX labelfont 1 labelsize 11 textfont 4 textsize 11
} }
Fl_Input i18n_file_input { Fl_Input i18n_file_input {
label {File:} label {File:}
callback i18n_text_cb callback i18n_text_cb
tooltip {The name of the message catalog.} xywh {100 92 245 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 tooltip {The name of the message catalog.} xywh {80 92 245 20} box THIN_DOWN_BOX labelfont 1 labelsize 11 textfont 4 textsize 11
} }
Fl_Input i18n_set_input { Fl_Input i18n_set_input {
label {Set:} label {Set:}
callback i18n_text_cb callback i18n_text_cb
tooltip {The message set number.} xywh {100 117 245 20} type Int box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 tooltip {The message set number.} xywh {80 117 245 20} type Int box THIN_DOWN_BOX labelfont 1 labelsize 11 textfont 4 textsize 11
} }
Fl_Input i18n_function_input { Fl_Input i18n_function_input {
label {Function:} label {Function:}
callback i18n_text_cb callback i18n_text_cb
tooltip {The function to call to internationalize the labels and tooltips.} xywh {100 92 245 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 tooltip {The function to call to internationalize the labels and tooltips.} xywh {80 92 245 20} box THIN_DOWN_BOX labelfont 1 labelsize 11 textfont 4 textsize 11
} }
} }
} }
@@ -110,25 +139,25 @@ Function {make_settings_window()} {open
} { } {
Fl_Window settings_window { Fl_Window settings_window {
label {GUI Settings} open label {GUI Settings} open
xywh {321 150 255 210} type Double visible xywh {321 150 215 185} type Double labelsize 11 hide
} { } {
Fl_Button {} { Fl_Button {} {
label Close label Close
callback {settings_window->hide();} callback {settings_window->hide();}
tooltip {Close this dialog.} xywh {185 179 60 25} tooltip {Close this dialog.} xywh {163 155 42 20} labelsize 11
} }
Fl_Tabs {} { Fl_Tabs {} {
xywh {10 10 235 158} xywh {10 10 195 135} selection_color 8 labelsize 11
} { } {
Fl_Group {} { Fl_Group {} {
label {GUI:} label {GUI:}
xywh {10 35 235 133} align 5 xywh {10 30 195 115} labelsize 11 align 5
} { } {
Fl_Check_Button tooltips_button { Fl_Check_Button tooltips_button {
label {Show Tooltips} label {Show Tooltips}
callback {Fl_Tooltip::enable(tooltips_button->value()); callback {Fl_Tooltip::enable(tooltips_button->value());
fluid_prefs.set("show_tooltips", tooltips_button->value());} fluid_prefs.set("show_tooltips", tooltips_button->value());}
xywh {20 45 215 20} down_box DOWN_BOX xywh {20 40 97 20} down_box DOWN_BOX labelsize 11
code0 {int b;} code0 {int b;}
code1 {fluid_prefs.get("show_tooltips", b, 1);} code1 {fluid_prefs.get("show_tooltips", b, 1);}
code2 {tooltips_button->value(b);} code2 {tooltips_button->value(b);}
@@ -137,7 +166,7 @@ fluid_prefs.set("show_tooltips", tooltips_button->value());}
Fl_Check_Button completion_button { Fl_Check_Button completion_button {
label {Show Completion Dialogs} label {Show Completion Dialogs}
callback {fluid_prefs.set("show_completion_dialogs", completion_button->value());} callback {fluid_prefs.set("show_completion_dialogs", completion_button->value());}
xywh {20 75 215 20} down_box DOWN_BOX xywh {20 65 152 20} down_box DOWN_BOX labelsize 11
code0 {int b;} code0 {int b;}
code1 {fluid_prefs.get("show_completion_dialogs", b, 1);} code1 {fluid_prefs.get("show_completion_dialogs", b, 1);}
code2 {completion_button->value(b);} code2 {completion_button->value(b);}
@@ -145,7 +174,7 @@ fluid_prefs.set("show_tooltips", tooltips_button->value());}
Fl_Check_Button openlast_button { Fl_Check_Button openlast_button {
label {Open Previous File on Startup} label {Open Previous File on Startup}
callback {fluid_prefs.set("open_previous_file", openlast_button->value());} callback {fluid_prefs.set("open_previous_file", openlast_button->value());}
xywh {20 105 215 20} down_box DOWN_BOX xywh {20 90 175 20} down_box DOWN_BOX labelsize 11
code0 {int b;} code0 {int b;}
code1 {fluid_prefs.get("open_previous_file", b, 0);} code1 {fluid_prefs.get("open_previous_file", b, 0);}
code2 {openlast_button->value(b);} code2 {openlast_button->value(b);}
@@ -153,7 +182,7 @@ fluid_prefs.set("show_tooltips", tooltips_button->value());}
Fl_Check_Button prevpos_button { Fl_Check_Button prevpos_button {
label {Remember Window Positions} label {Remember Window Positions}
callback {fluid_prefs.set("prev_window_pos", prevpos_button->value());} callback {fluid_prefs.set("prev_window_pos", prevpos_button->value());}
xywh {20 135 215 20} down_box DOWN_BOX xywh {20 115 175 20} down_box DOWN_BOX labelsize 11
code0 {int b;} code0 {int b;}
code1 {fluid_prefs.get("prev_window_pos", b, 1);} code1 {fluid_prefs.get("prev_window_pos", b, 1);}
code2 {prevpos_button->value(b);} code2 {prevpos_button->value(b);}
@@ -167,18 +196,18 @@ Function {make_shell_window()} {open
} { } {
Fl_Window shell_window { Fl_Window shell_window {
label {Shell Command} open label {Shell Command} open
xywh {588 153 450 145} type Double visible xywh {588 153 335 135} type Double labelsize 11 hide
} { } {
Fl_Tabs {} {open Fl_Tabs {} {open
xywh {10 10 430 90} xywh {10 10 314 85} selection_color 8 labelsize 11
} { } {
Fl_Group {} { Fl_Group {} {
label {Shell Command} open label {Shell Command} open
xywh {10 30 430 70} align 5 xywh {10 30 314 65} labelsize 11 align 5
} { } {
Fl_Input shell_command_input { Fl_Input shell_command_input {
callback {fluid_prefs.set("shell_command", shell_command_input->value());} callback {fluid_prefs.set("shell_command", shell_command_input->value());}
xywh {20 40 410 20} xywh {20 40 294 21} labelsize 11 textsize 11
code0 {char buf[1024];} code0 {char buf[1024];}
code1 {fluid_prefs.get("shell_command", buf, "", sizeof(buf));} code1 {fluid_prefs.get("shell_command", buf, "", sizeof(buf));}
code2 {shell_command_input->value(buf);} code2 {shell_command_input->value(buf);}
@@ -186,7 +215,7 @@ Function {make_shell_window()} {open
Fl_Check_Button shell_savefl_button { Fl_Check_Button shell_savefl_button {
label {Save .FL File} label {Save .FL File}
callback {fluid_prefs.set("shell_savefl", shell_savefl_button->value());} callback {fluid_prefs.set("shell_savefl", shell_savefl_button->value());}
xywh {20 65 110 20} down_box DOWN_BOX xywh {20 66 93 19} down_box DOWN_BOX labelsize 11
code0 {int b;} code0 {int b;}
code1 {fluid_prefs.get("shell_savefl", b, 1);} code1 {fluid_prefs.get("shell_savefl", b, 1);}
code2 {shell_savefl_button->value(b);} code2 {shell_savefl_button->value(b);}
@@ -194,7 +223,7 @@ Function {make_shell_window()} {open
Fl_Check_Button shell_writecode_button { Fl_Check_Button shell_writecode_button {
label {Write Code} label {Write Code}
callback {fluid_prefs.set("shell_writecode", shell_writecode_button->value());} callback {fluid_prefs.set("shell_writecode", shell_writecode_button->value());}
xywh {140 65 95 20} down_box DOWN_BOX xywh {118 66 83 19} down_box DOWN_BOX labelsize 11
code0 {int b;} code0 {int b;}
code1 {fluid_prefs.get("shell_writecode", b, 1);} code1 {fluid_prefs.get("shell_writecode", b, 1);}
code2 {shell_writecode_button->value(b);} code2 {shell_writecode_button->value(b);}
@@ -202,7 +231,7 @@ Function {make_shell_window()} {open
Fl_Check_Button shell_writemsgs_button { Fl_Check_Button shell_writemsgs_button {
label {Write Messages} label {Write Messages}
callback {fluid_prefs.set("shell_writemsgs", shell_writemsgs_button->value());} callback {fluid_prefs.set("shell_writemsgs", shell_writemsgs_button->value());}
xywh {245 65 130 20} down_box DOWN_BOX xywh {206 66 108 19} down_box DOWN_BOX labelsize 11
code0 {int b;} code0 {int b;}
code1 {fluid_prefs.get("shell_writemsgs", b, 0);} code1 {fluid_prefs.get("shell_writemsgs", b, 0);}
code2 {shell_writemsgs_button->value(b);} code2 {shell_writemsgs_button->value(b);}
@@ -212,25 +241,25 @@ Function {make_shell_window()} {open
Fl_Button {} { Fl_Button {} {
label Cancel label Cancel
callback {shell_window->hide();} callback {shell_window->hide();}
xywh {375 110 65 25} xywh {276 105 48 20} labelsize 11
} }
Fl_Return_Button {} { Fl_Return_Button {} {
label {Run Command} label {Run Command}
callback do_shell_command callback do_shell_command
xywh {225 110 140 25} xywh {162 105 109 20} labelsize 11
} }
} }
Fl_Window shell_run_window { Fl_Window shell_run_window {
label {Shell Command Output} open label {Shell Command Output} open
xywh {592 332 555 435} type Double resizable visible xywh {592 332 555 430} type Double labelsize 11 resizable visible
} { } {
Fl_Return_Button shell_run_button { Fl_Return_Button shell_run_button {
label Close label Close
callback {shell_run_window->hide();} callback {shell_run_window->hide();}
xywh {465 400 80 25} xywh {486 400 59 20} labelsize 11
} }
Fl_Text_Display shell_run_display { Fl_Text_Display shell_run_display {selected
xywh {10 10 530 380} textfont 4 textsize 12 resizable xywh {10 10 530 380} labelsize 11 textfont 4 textsize 11 resizable
code0 {shell_run_buffer = new Fl_Text_Buffer();} code0 {shell_run_buffer = new Fl_Text_Buffer();}
code1 {shell_run_display->buffer(shell_run_buffer);} code1 {shell_run_display->buffer(shell_run_buffer);}
} }
@@ -241,48 +270,54 @@ Function {make_grid_window()} {open
} { } {
Fl_Window grid_window { Fl_Window grid_window {
label Grid open label Grid open
xywh {51 589 155 205} type Double visible xywh {51 589 145 180} type Double labelsize 11 hide
} { } {
Fl_Tabs {} { Fl_Tabs {} {
xywh {10 10 135 150} align 5 xywh {10 10 124 131} selection_color 8 labelsize 11 align 5
} { } {
Fl_Group {} { Fl_Group {} {
label Grid label Grid
xywh {10 30 135 130} align 5 xywh {10 30 124 111} labelsize 11 align 5
} { } {
Fl_Input horizontal_input { Fl_Input horizontal_input {
label {Horizontal:} label {Horizontal:}
user_data 1 user_data_type long user_data 1 user_data_type long
callback grid_cb callback grid_cb
tooltip {Horizontal grid spacing.} xywh {95 40 40 20} type Int box THIN_DOWN_BOX tooltip {Horizontal grid spacing.} xywh {84 40 40 20} type Int box THIN_DOWN_BOX labelfont 1 labelsize 11 textsize 11
code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);} code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
} }
Fl_Input vertical_input { Fl_Input vertical_input {
label {Vertical:} label {Vertical:}
user_data 2 user_data_type long user_data 2 user_data_type long
callback grid_cb callback grid_cb
tooltip {Vertical grid spacing.} xywh {95 70 40 20} type Int box THIN_DOWN_BOX tooltip {Vertical grid spacing.} xywh {84 65 40 20} type Int box THIN_DOWN_BOX labelfont 1 labelsize 11 textsize 11
code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);} code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
} }
Fl_Input snap_input { Fl_Input snap_input {
label {Snap:} label {Snap:}
user_data 3 user_data_type long user_data 3 user_data_type long
callback grid_cb callback grid_cb
tooltip {Snap to grid within this many pixels.} xywh {95 100 40 20} type Int box THIN_DOWN_BOX tooltip {Snap to grid within this many pixels.} xywh {84 90 40 20} type Int box THIN_DOWN_BOX labelfont 1 labelsize 11 textsize 11
code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);} code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
} }
Fl_Check_Button guides_toggle { Fl_Check_Button guides_toggle {
label {Show Guides} label {Show Guides}
user_data 4 user_data_type long user_data 4 user_data_type long
callback guides_cb callback guides_cb
tooltip {Show distance and alignment guides in overlay} xywh {30 125 105 25} down_box DOWN_BOX tooltip {Show distance and alignment guides in overlay} xywh {30 115 94 16} down_box DOWN_BOX labelsize 11
} }
} }
} }
Fl_Button {} { Fl_Button {} {
label Close label Close
callback {grid_window->hide();} callback {grid_window->hide();}
tooltip {Close this dialog.} xywh {85 170 60 25} tooltip {Close this dialog.} xywh {92 151 42 20} labelsize 11
} }
} }
} }
comment {
//
// End of "$Id$".
//} {in_source in_header
}
+31
View File
@@ -1,3 +1,30 @@
//
// "$Id$"
//
// Setting and shell dialogs for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// generated by Fast Light User Interface Designer (fluid) version 1.0107 // generated by Fast Light User Interface Designer (fluid) version 1.0107
#ifndef alignment_panel_h #ifndef alignment_panel_h
@@ -62,3 +89,7 @@ extern void guides_cb(Fl_Check_Button*, long);
extern Fl_Check_Button *guides_toggle; extern Fl_Check_Button *guides_toggle;
Fl_Double_Window* make_grid_window(); Fl_Double_Window* make_grid_window();
#endif #endif
//
// End of "$Id$".
//
+230 -83
View File
File diff suppressed because it is too large Load Diff
+135 -101
View File
File diff suppressed because it is too large Load Diff
+31
View File
@@ -1,3 +1,30 @@
//
// "$Id$"
//
// Widget panel for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// generated by Fast Light User Interface Designer (fluid) version 1.0107 // generated by Fast Light User Interface Designer (fluid) version 1.0107
#ifndef widget_panel_h #ifndef widget_panel_h
@@ -77,3 +104,7 @@ extern void ok_cb(Fl_Return_Button*, void*);
extern void cancel_cb(Fl_Button*, void*); extern void cancel_cb(Fl_Button*, void*);
Fl_Double_Window* make_widget_panel(); Fl_Double_Window* make_widget_panel();
#endif #endif
//
// End of "$Id$".
//
+1 -1
View File
@@ -53,7 +53,7 @@ int Fl_Menu_::item_pathname(char *name, int namelen, const Fl_Menu_Item *findite
const Fl_Menu_Item *m = &(menu()[t]); const Fl_Menu_Item *m = &(menu()[t]);
if ( m->submenu() ) { // submenu? descend if ( m->submenu() ) { // submenu? descend
if (*name) SAFE_STRCAT("/"); if (*name) SAFE_STRCAT("/");
SAFE_STRCAT(m->label()); if (m->label()) SAFE_STRCAT(m->label());
} else { } else {
if (m->label()) { // menu item? if (m->label()) { // menu item?
if ( m == finditem ) { // found? tack on itemname, done. if ( m == finditem ) { // found? tack on itemname, done.