summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-05-01 19:17:24 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-05-01 19:17:24 +0000
commit683b32002be5230f9ad9eac6d0f484d28e51496a (patch)
tree2cac29c66058ef93e8180eb4f9eb0ff3ac939683 /fluid
parent81e13dc96d75dccc7a7d4de64a33cc72eaff391f (diff)
Break grid and GUI settings into separate dialogs.
Use tabs on all of the settings windows, even when there is only one tab. Set the size_range() settings to use the grid values. Add accelerator keys in all of the menus. Rename alignment_window, etc. to project_window, etc. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2165 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
-rw-r--r--fluid/Fl_Window_Type.cxx36
-rw-r--r--fluid/alignment_panel.cxx355
-rw-r--r--fluid/alignment_panel.fl361
-rw-r--r--fluid/alignment_panel.h17
-rw-r--r--fluid/fluid.cxx87
5 files changed, 474 insertions, 382 deletions
diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx
index dd7d55d78..530a9a159 100644
--- a/fluid/Fl_Window_Type.cxx
+++ b/fluid/Fl_Window_Type.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Window_Type.cxx,v 1.13.2.10.2.2 2002/04/30 18:11:49 easysw Exp $"
+// "$Id: Fl_Window_Type.cxx,v 1.13.2.10.2.3 2002/05/01 19:17:24 easysw Exp $"
//
// Window type code for the Fast Light Tool Kit (FLTK).
//
@@ -69,6 +69,20 @@ void grid_cb(Fl_Input *i, long v) {
fluid_prefs.set("snap", n);
break;
}
+
+ // Next go through all of the windows in the project and set the
+ // stepping for resizes...
+ Fl_Type *p;
+ Fl_Window_Type *w;
+
+ for (p = Fl_Type::first; p; p = p->next) {
+ if (p->is_window()) {
+ w = (Fl_Window_Type *)p;
+ ((Fl_Window *)(w->o))->size_range(gridx * snap, gridy * snap,
+ Fl::w(), Fl::h(),
+ gridx * snap, gridy * snap, 0);
+ }
+ }
}
void i18n_type_cb(Fl_Choice *c, void *) {
@@ -122,8 +136,8 @@ void i18n_text_cb(Fl_Input *i, void *) {
extern const char* header_file_name;
extern const char* code_file_name;
-void show_alignment_cb(Fl_Widget *, void *) {
- if(alignment_window==0) make_alignment_window();
+void show_project_cb(Fl_Widget *, void *) {
+ if(project_window==0) make_project_window();
include_H_from_C_button->value(include_H_from_C);
header_file_input->value(header_file_name);
code_file_input->value(code_file_name);
@@ -152,14 +166,21 @@ void show_alignment_cb(Fl_Widget *, void *) {
i18n_function_input->hide();
break;
}
- alignment_window->show();
+ project_window->hotspot(project_window);
+ project_window->show();
}
-void show_settings_cb(Fl_Widget *, void *) {
+void show_grid_cb(Fl_Widget *, void *) {
char buf[128];
sprintf(buf,"%d",gridx); horizontal_input->value(buf);
sprintf(buf,"%d",gridy); vertical_input->value(buf);
sprintf(buf,"%d",snap); snap_input->value(buf);
+ grid_window->hotspot(grid_window);
+ grid_window->show();
+}
+
+void show_settings_cb(Fl_Widget *, void *) {
+ settings_window->hotspot(settings_window);
settings_window->show();
}
@@ -230,6 +251,9 @@ Fl_Type *Fl_Window_Type::make() {
this->o = new Fl_Window(100,100);
Fl_Group::current(0);
}
+ ((Fl_Window *)(this->o))->size_range(gridx * snap, gridy * snap,
+ Fl::w(), Fl::h(),
+ gridx * snap, gridy * snap, 0);
myo->factory = this;
myo->drag = 0;
myo->numselected = 0;
@@ -766,5 +790,5 @@ int Fl_Window_Type::read_fdesign(const char* name, const char* value) {
}
//
-// End of "$Id: Fl_Window_Type.cxx,v 1.13.2.10.2.2 2002/04/30 18:11:49 easysw Exp $".
+// End of "$Id: Fl_Window_Type.cxx,v 1.13.2.10.2.3 2002/05/01 19:17:24 easysw Exp $".
//
diff --git a/fluid/alignment_panel.cxx b/fluid/alignment_panel.cxx
index e4a9306e5..0f7c52b04 100644
--- a/fluid/alignment_panel.cxx
+++ b/fluid/alignment_panel.cxx
@@ -2,10 +2,10 @@
#include "alignment_panel.h"
-Fl_Window *alignment_window=(Fl_Window *)0;
+Fl_Window *project_window=(Fl_Window *)0;
static void cb_Close(Fl_Button*, void*) {
- alignment_window->hide();
+ project_window->hide();
}
Fl_Input *header_file_input=(Fl_Input *)0;
@@ -31,83 +31,79 @@ Fl_Input *i18n_set_input=(Fl_Input *)0;
Fl_Input *i18n_function_input=(Fl_Input *)0;
-Fl_Window* make_alignment_window() {
+Fl_Window* make_project_window() {
Fl_Window* w;
- { Fl_Window* o = alignment_window = new Fl_Window(365, 340, "Preferences");
+ { Fl_Window* o = project_window = new Fl_Window(365, 210, "Project Settings");
w = o;
- { Fl_Button* o = new Fl_Button(295, 305, 60, 25, "Close");
+ { Fl_Button* o = new Fl_Button(295, 175, 60, 25, "Close");
o->tooltip("Close this dialog.");
o->callback((Fl_Callback*)cb_Close);
}
- { Fl_Box* o = new Fl_Box(10, 175, 345, 120, "Output File Names:");
- o->box(FL_ENGRAVED_FRAME);
- o->labelsize(12);
- o->align(FL_ALIGN_TOP_LEFT);
- }
- { Fl_Box* o = new Fl_Box(20, 185, 325, 15, "Use \"name.ext\" to set name or just \".ext\" to set only extension.");
- o->labelsize(10);
- o->align(132|FL_ALIGN_INSIDE);
- }
- { Fl_Input* o = header_file_input = new Fl_Input(100, 205, 245, 20, "Header File:");
- o->tooltip("The name of the generated header file.");
- o->box(FL_THIN_DOWN_BOX);
- o->textfont(4);
- o->callback((Fl_Callback*)header_input_cb, (void*)(1));
- o->when(FL_WHEN_CHANGED);
- }
- { Fl_Input* o = code_file_input = new Fl_Input(100, 235, 245, 20, "Code File:");
- o->tooltip("The name of the generated code file.");
- o->box(FL_THIN_DOWN_BOX);
- o->textfont(4);
- o->callback((Fl_Callback*)code_input_cb, (void*)(1));
- o->when(FL_WHEN_CHANGED);
- }
- { Fl_Light_Button* o = include_H_from_C_button = new Fl_Light_Button(100, 265, 170, 20, "Include Header from Code");
- o->tooltip("Include the header file from the code file.");
- o->value(1);
- o->labelsize(12);
- o->callback((Fl_Callback*)include_H_from_C_button_cb);
- }
- { Fl_Box* o = new Fl_Box(10, 25, 345, 130, "Internationalization:");
- o->box(FL_ENGRAVED_FRAME);
- o->labelsize(12);
- o->align(FL_ALIGN_TOP_LEFT);
- }
- { Fl_Choice* o = i18n_type_chooser = new Fl_Choice(100, 35, 125, 20, "Use:");
- o->tooltip("Type of internationalization to use.");
- o->box(FL_THIN_UP_BOX);
- o->down_box(FL_BORDER_BOX);
- o->callback((Fl_Callback*)i18n_type_cb);
- o->menu(menu_i18n_type_chooser);
- }
- { Fl_Input* o = i18n_include_input = new Fl_Input(100, 65, 245, 20, "#include:");
- o->tooltip("The include file for internationalization.");
- o->box(FL_THIN_DOWN_BOX);
- o->textfont(4);
- o->callback((Fl_Callback*)i18n_text_cb);
- o->hide();
- }
- { Fl_Input* o = i18n_file_input = new Fl_Input(100, 95, 245, 20, "File:");
- o->tooltip("The name of the message catalog.");
- o->box(FL_THIN_DOWN_BOX);
- o->textfont(4);
- o->callback((Fl_Callback*)i18n_text_cb);
- o->hide();
- }
- { Fl_Input* o = i18n_set_input = new Fl_Input(100, 125, 245, 20, "Set:");
- o->tooltip("The message set number.");
- o->type(2);
- o->box(FL_THIN_DOWN_BOX);
- o->textfont(4);
- o->callback((Fl_Callback*)i18n_text_cb);
- o->hide();
- }
- { Fl_Input* o = i18n_function_input = new Fl_Input(100, 95, 245, 20, "Function:");
- o->tooltip("The function to call to internationalize the labels and tooltips.");
- o->box(FL_THIN_DOWN_BOX);
- o->textfont(4);
- o->callback((Fl_Callback*)i18n_text_cb);
- o->hide();
+ { Fl_Tabs* o = new Fl_Tabs(10, 10, 345, 155);
+ { Fl_Group* o = new Fl_Group(10, 35, 345, 130, "Output");
+ { Fl_Box* o = new Fl_Box(25, 45, 325, 15, "Use \"name.ext\" to set name or just \".ext\" to set only extension.");
+ o->labelsize(10);
+ o->align(132|FL_ALIGN_INSIDE);
+ }
+ { Fl_Input* o = header_file_input = new Fl_Input(105, 65, 245, 20, "Header File:");
+ o->tooltip("The name of the generated header file.");
+ o->box(FL_THIN_DOWN_BOX);
+ o->textfont(4);
+ o->callback((Fl_Callback*)header_input_cb, (void*)(1));
+ o->when(FL_WHEN_CHANGED);
+ }
+ { Fl_Input* o = code_file_input = new Fl_Input(105, 95, 245, 20, "Code File:");
+ o->tooltip("The name of the generated code file.");
+ o->box(FL_THIN_DOWN_BOX);
+ o->textfont(4);
+ o->callback((Fl_Callback*)code_input_cb, (void*)(1));
+ o->when(FL_WHEN_CHANGED);
+ }
+ { Fl_Light_Button* o = include_H_from_C_button = new Fl_Light_Button(105, 125, 170, 20, "Include Header from Code");
+ o->tooltip("Include the header file from the code file.");
+ o->value(1);
+ o->labelsize(12);
+ o->callback((Fl_Callback*)include_H_from_C_button_cb);
+ }
+ o->end();
+ }
+ { Fl_Group* o = new Fl_Group(10, 35, 345, 130, "Internationalization");
+ o->hide();
+ { Fl_Choice* o = i18n_type_chooser = new Fl_Choice(100, 45, 125, 20, "Use:");
+ o->tooltip("Type of internationalization to use.");
+ o->box(FL_THIN_UP_BOX);
+ o->down_box(FL_BORDER_BOX);
+ o->callback((Fl_Callback*)i18n_type_cb);
+ o->menu(menu_i18n_type_chooser);
+ }
+ { Fl_Input* o = i18n_include_input = new Fl_Input(100, 75, 245, 20, "#include:");
+ o->tooltip("The include file for internationalization.");
+ o->box(FL_THIN_DOWN_BOX);
+ o->textfont(4);
+ o->callback((Fl_Callback*)i18n_text_cb);
+ }
+ { Fl_Input* o = i18n_file_input = new Fl_Input(100, 105, 245, 20, "File:");
+ o->tooltip("The name of the message catalog.");
+ o->box(FL_THIN_DOWN_BOX);
+ o->textfont(4);
+ o->callback((Fl_Callback*)i18n_text_cb);
+ }
+ { Fl_Input* o = i18n_set_input = new Fl_Input(100, 135, 245, 20, "Set:");
+ o->tooltip("The message set number.");
+ o->type(2);
+ o->box(FL_THIN_DOWN_BOX);
+ o->textfont(4);
+ o->callback((Fl_Callback*)i18n_text_cb);
+ }
+ { Fl_Input* o = i18n_function_input = new Fl_Input(100, 105, 245, 20, "Function:");
+ o->tooltip("The function to call to internationalize the labels and tooltips.");
+ o->box(FL_THIN_DOWN_BOX);
+ o->textfont(4);
+ o->callback((Fl_Callback*)i18n_text_cb);
+ }
+ o->end();
+ }
+ o->end();
}
o->set_modal();
o->end();
@@ -121,12 +117,6 @@ static void cb_Close1(Fl_Button*, void*) {
settings_window->hide();
}
-Fl_Input *horizontal_input=(Fl_Input *)0;
-
-Fl_Input *vertical_input=(Fl_Input *)0;
-
-Fl_Input *snap_input=(Fl_Input *)0;
-
Fl_Check_Button *tooltips_button=(Fl_Check_Button *)0;
static void cb_tooltips_button(Fl_Check_Button*, void*) {
@@ -148,64 +138,40 @@ static void cb_openlast_button(Fl_Check_Button*, void*) {
Fl_Window* make_settings_window() {
Fl_Window* w;
- { Fl_Window* o = settings_window = new Fl_Window(400, 175, "Settings");
+ { Fl_Window* o = settings_window = new Fl_Window(255, 179, "GUI Settings");
w = o;
- { Fl_Button* o = new Fl_Button(330, 140, 60, 25, "Close");
+ { Fl_Button* o = new Fl_Button(185, 145, 60, 25, "Close");
o->tooltip("Close this dialog.");
o->callback((Fl_Callback*)cb_Close1);
}
- { Fl_Box* o = new Fl_Box(15, 30, 130, 100, "Grid:");
- o->box(FL_ENGRAVED_FRAME);
- o->labelsize(12);
- o->align(FL_ALIGN_TOP_LEFT);
- }
- { Fl_Input* o = horizontal_input = new Fl_Input(95, 40, 40, 20, "Horizontal:");
- o->tooltip("Horizontal grid spacing.");
- o->type(2);
- o->box(FL_THIN_DOWN_BOX);
- o->callback((Fl_Callback*)grid_cb, (void*)(1));
- o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
- }
- { Fl_Input* o = vertical_input = new Fl_Input(95, 70, 40, 20, "Vertical:");
- o->tooltip("Vertical grid spacing.");
- o->type(2);
- o->box(FL_THIN_DOWN_BOX);
- o->callback((Fl_Callback*)grid_cb, (void*)(2));
- o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
- }
- { Fl_Input* o = snap_input = new Fl_Input(95, 100, 40, 20, "Snap:");
- o->tooltip("Snap to grid within this many pixels.");
- o->type(2);
- o->box(FL_THIN_DOWN_BOX);
- o->callback((Fl_Callback*)grid_cb, (void*)(3));
- o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
- }
- { Fl_Box* o = new Fl_Box(155, 30, 235, 100, "GUI:");
- o->box(FL_ENGRAVED_FRAME);
- o->labelsize(12);
- o->align(FL_ALIGN_TOP_LEFT);
- }
- { Fl_Check_Button* o = tooltips_button = new Fl_Check_Button(165, 40, 215, 20, "Show Tooltips");
- o->down_box(FL_DOWN_BOX);
- o->callback((Fl_Callback*)cb_tooltips_button);
- char b;
- fluid_prefs.get("show_tooltips", b, 1);
- tooltips_button->value(b);
- Fl_Tooltip::enable(b);
- }
- { Fl_Check_Button* o = completion_button = new Fl_Check_Button(165, 70, 215, 20, "Show Completion Dialogs");
- o->down_box(FL_DOWN_BOX);
- o->callback((Fl_Callback*)cb_completion_button);
- char b;
- fluid_prefs.get("show_completion_dialogs", b, 1);
- completion_button->value(b);
- }
- { Fl_Check_Button* o = openlast_button = new Fl_Check_Button(165, 100, 215, 20, "Open Previous File on Startup");
- o->down_box(FL_DOWN_BOX);
- o->callback((Fl_Callback*)cb_openlast_button);
- char b;
- fluid_prefs.get("open_previous_file", b, 0);
- openlast_button->value(b);
+ { Fl_Tabs* o = new Fl_Tabs(10, 10, 235, 125);
+ { Fl_Group* o = new Fl_Group(10, 35, 235, 100, "GUI:");
+ o->align(FL_ALIGN_TOP_LEFT);
+ { Fl_Check_Button* o = tooltips_button = new Fl_Check_Button(20, 45, 215, 20, "Show Tooltips");
+ o->down_box(FL_DOWN_BOX);
+ o->callback((Fl_Callback*)cb_tooltips_button);
+ char b;
+ fluid_prefs.get("show_tooltips", b, 1);
+ tooltips_button->value(b);
+ Fl_Tooltip::enable(b);
+ }
+ { Fl_Check_Button* o = completion_button = new Fl_Check_Button(20, 75, 215, 20, "Show Completion Dialogs");
+ o->down_box(FL_DOWN_BOX);
+ o->callback((Fl_Callback*)cb_completion_button);
+ char b;
+ fluid_prefs.get("show_completion_dialogs", b, 1);
+ completion_button->value(b);
+ }
+ { Fl_Check_Button* o = openlast_button = new Fl_Check_Button(20, 105, 215, 20, "Open Previous File on Startup");
+ o->down_box(FL_DOWN_BOX);
+ o->callback((Fl_Callback*)cb_openlast_button);
+ char b;
+ fluid_prefs.get("open_previous_file", b, 0);
+ openlast_button->value(b);
+ }
+ o->end();
+ }
+ o->end();
}
o->end();
}
@@ -254,48 +220,51 @@ static void cb_shell_run_button(Fl_Return_Button*, void*) {
Fl_Window* make_shell_window() {
Fl_Window* w;
- { Fl_Window* o = shell_window = new Fl_Window(445, 104, "Shell Command");
+ { Fl_Window* o = shell_window = new Fl_Window(450, 145, "Shell Command");
w = o;
- { Fl_Input* o = shell_command_input = new Fl_Input(85, 10, 350, 20, "Command:");
- o->callback((Fl_Callback*)cb_shell_command_input);
- char buf[1024];
- fluid_prefs.get("shell_command", buf, "", sizeof(buf));
- shell_command_input->value(buf);
- }
- { Fl_Group* o = new Fl_Group(85, 40, 350, 20, "Options:");
- o->align(FL_ALIGN_LEFT);
- { Fl_Check_Button* o = shell_savefl_button = new Fl_Check_Button(85, 40, 110, 20, "Save .FL File");
- o->down_box(FL_DOWN_BOX);
- o->callback((Fl_Callback*)cb_shell_savefl_button);
- char b;
- fluid_prefs.get("shell_savefl", b, 1);
- shell_savefl_button->value(b);
- }
- { Fl_Check_Button* o = shell_writecode_button = new Fl_Check_Button(200, 40, 95, 20, "Write Code");
- o->down_box(FL_DOWN_BOX);
- o->callback((Fl_Callback*)cb_shell_writecode_button);
- char b;
- fluid_prefs.get("shell_writecode", b, 1);
- shell_writecode_button->value(b);
- }
- { Fl_Check_Button* o = shell_writemsgs_button = new Fl_Check_Button(300, 40, 125, 20, "Write Messages");
- o->down_box(FL_DOWN_BOX);
- o->callback((Fl_Callback*)cb_shell_writemsgs_button);
- char b;
- fluid_prefs.get("shell_writemsgs", b, 0);
- shell_writemsgs_button->value(b);
+ { Fl_Tabs* o = new Fl_Tabs(10, 10, 430, 90);
+ { Fl_Group* o = new Fl_Group(10, 30, 430, 70, "Shell Command");
+ o->align(FL_ALIGN_TOP_LEFT);
+ { Fl_Input* o = shell_command_input = new Fl_Input(20, 40, 410, 20);
+ o->callback((Fl_Callback*)cb_shell_command_input);
+ char buf[1024];
+ fluid_prefs.get("shell_command", buf, "", sizeof(buf));
+ shell_command_input->value(buf);
+ }
+ { Fl_Check_Button* o = shell_savefl_button = new Fl_Check_Button(20, 65, 110, 20, "Save .FL File");
+ o->down_box(FL_DOWN_BOX);
+ o->callback((Fl_Callback*)cb_shell_savefl_button);
+ char b;
+ fluid_prefs.get("shell_savefl", b, 1);
+ shell_savefl_button->value(b);
+ }
+ { Fl_Check_Button* o = shell_writecode_button = new Fl_Check_Button(140, 65, 95, 20, "Write Code");
+ o->down_box(FL_DOWN_BOX);
+ o->callback((Fl_Callback*)cb_shell_writecode_button);
+ char b;
+ fluid_prefs.get("shell_writecode", b, 1);
+ shell_writecode_button->value(b);
+ }
+ { Fl_Check_Button* o = shell_writemsgs_button = new Fl_Check_Button(245, 65, 130, 20, "Write Messages");
+ o->down_box(FL_DOWN_BOX);
+ o->callback((Fl_Callback*)cb_shell_writemsgs_button);
+ char b;
+ fluid_prefs.get("shell_writemsgs", b, 0);
+ shell_writemsgs_button->value(b);
+ }
+ o->end();
}
o->end();
}
- { Fl_Button* o = new Fl_Button(370, 70, 65, 25, "Cancel");
+ { Fl_Button* o = new Fl_Button(375, 110, 65, 25, "Cancel");
o->callback((Fl_Callback*)cb_Cancel);
}
- { Fl_Return_Button* o = new Fl_Return_Button(220, 70, 140, 25, "Run Command");
+ { Fl_Return_Button* o = new Fl_Return_Button(225, 110, 140, 25, "Run Command");
o->callback((Fl_Callback*)do_shell_command);
}
o->end();
}
- { Fl_Window* o = shell_run_window = new Fl_Window(553, 435, "Shell Command Output");
+ { Fl_Window* o = shell_run_window = new Fl_Window(555, 435, "Shell Command Output");
w = o;
{ Fl_Browser* o = shell_run_list = new Fl_Browser(10, 10, 535, 380);
o->textfont(4);
@@ -309,3 +278,57 @@ Fl_Window* make_shell_window() {
}
return w;
}
+
+Fl_Window *grid_window=(Fl_Window *)0;
+
+Fl_Input *horizontal_input=(Fl_Input *)0;
+
+Fl_Input *vertical_input=(Fl_Input *)0;
+
+Fl_Input *snap_input=(Fl_Input *)0;
+
+static void cb_Close2(Fl_Button*, void*) {
+ grid_window->hide();
+}
+
+Fl_Window* make_grid_window() {
+ Fl_Window* w;
+ { Fl_Window* o = grid_window = new Fl_Window(155, 175, "Grid");
+ w = o;
+ { Fl_Tabs* o = new Fl_Tabs(10, 10, 135, 120);
+ o->align(FL_ALIGN_TOP_LEFT);
+ { Fl_Group* o = new Fl_Group(10, 30, 135, 100, "Grid");
+ o->align(FL_ALIGN_TOP_LEFT);
+ { Fl_Input* o = horizontal_input = new Fl_Input(95, 40, 40, 20, "Horizontal:");
+ o->tooltip("Horizontal grid spacing.");
+ o->type(2);
+ o->box(FL_THIN_DOWN_BOX);
+ o->callback((Fl_Callback*)grid_cb, (void*)(1));
+ o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
+ }
+ { Fl_Input* o = vertical_input = new Fl_Input(95, 70, 40, 20, "Vertical:");
+ o->tooltip("Vertical grid spacing.");
+ o->type(2);
+ o->box(FL_THIN_DOWN_BOX);
+ o->callback((Fl_Callback*)grid_cb, (void*)(2));
+ o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
+ }
+ { Fl_Input* o = snap_input = new Fl_Input(95, 100, 40, 20, "Snap:");
+ o->tooltip("Snap to grid within this many pixels.");
+ o->type(2);
+ o->box(FL_THIN_DOWN_BOX);
+ o->callback((Fl_Callback*)grid_cb, (void*)(3));
+ o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
+ }
+ o->end();
+ }
+ o->end();
+ }
+ { Fl_Button* o = new Fl_Button(85, 140, 60, 25, "Close");
+ o->tooltip("Close this dialog.");
+ o->callback((Fl_Callback*)cb_Close2);
+ }
+ o->end();
+ }
+ return w;
+}
diff --git a/fluid/alignment_panel.fl b/fluid/alignment_panel.fl
index 2e5236da2..f8de29544 100644
--- a/fluid/alignment_panel.fl
+++ b/fluid/alignment_panel.fl
@@ -2,86 +2,92 @@
version 1.0100
header_name {.h}
code_name {.cxx}
-Function {make_alignment_window()} {open
+Function {make_project_window()} {open
} {
- Fl_Window alignment_window {
- label Preferences open
- xywh {469 112 365 340}
+ Fl_Window project_window {
+ label {Project Settings} open
+ xywh {469 112 365 210}
code0 {\#include <FL/Fl_Preferences.H>}
code1 {\#include <FL/Fl_Tooltip.H>} modal visible
} {
Fl_Button {} {
label Close
- callback {alignment_window->hide();}
- tooltip {Close this dialog.} xywh {295 305 60 25}
+ callback {project_window->hide();} selected
+ tooltip {Close this dialog.} xywh {295 175 60 25}
}
- Fl_Box {} {
- label {Output File Names:}
- xywh {10 175 345 120} box ENGRAVED_FRAME labelsize 12 align 5
- }
- Fl_Box {} {
- label {Use "name.ext" to set name or just ".ext" to set only extension.}
- xywh {20 185 325 15} labelsize 10 align 148
- }
- Fl_Input header_file_input {
- label {Header File:}
- user_data 1 user_data_type {void*}
- callback header_input_cb
- tooltip {The name of the generated header file.} xywh {100 205 245 20} box THIN_DOWN_BOX when 1 textfont 4
- }
- Fl_Input code_file_input {
- label {Code File:}
- user_data 1 user_data_type {void*}
- callback code_input_cb
- tooltip {The name of the generated code file.} xywh {100 235 245 20} box THIN_DOWN_BOX when 1 textfont 4
- }
- Fl_Light_Button include_H_from_C_button {
- label {Include Header from Code}
- callback include_H_from_C_button_cb
- tooltip {Include the header file from the code file.} xywh {100 265 170 20} value 1 labelsize 12
- }
- Fl_Box {} {
- label {Internationalization:}
- xywh {10 25 345 130} box ENGRAVED_FRAME labelsize 12 align 5
- }
- Fl_Choice i18n_type_chooser {
- label {Use:}
- callback i18n_type_cb open
- tooltip {Type of internationalization to use.} xywh {100 35 125 20} box THIN_UP_BOX down_box BORDER_BOX
+ Fl_Tabs {} {open
+ xywh {10 10 345 155}
} {
- menuitem {} {
- label None
- xywh {0 0 100 20}
- }
- menuitem {} {
- label {GNU gettext}
- xywh {0 0 100 20}
+ Fl_Group {} {
+ label Output
+ xywh {10 35 345 130}
+ } {
+ Fl_Box {} {
+ label {Use "name.ext" to set name or just ".ext" to set only extension.}
+ xywh {25 45 325 15} labelsize 10 align 148
+ }
+ Fl_Input header_file_input {
+ label {Header File:}
+ user_data 1 user_data_type {void*}
+ callback header_input_cb
+ tooltip {The name of the generated header file.} xywh {105 65 245 20} box THIN_DOWN_BOX when 1 textfont 4
+ }
+ Fl_Input code_file_input {
+ label {Code File:}
+ user_data 1 user_data_type {void*}
+ callback code_input_cb
+ tooltip {The name of the generated code file.} xywh {105 95 245 20} box THIN_DOWN_BOX when 1 textfont 4
+ }
+ Fl_Light_Button include_H_from_C_button {
+ label {Include Header from Code}
+ callback include_H_from_C_button_cb
+ tooltip {Include the header file from the code file.} xywh {105 125 170 20} value 1 labelsize 12
+ }
}
- menuitem {} {
- label {POSIX catgets}
- xywh {0 0 100 20}
+ Fl_Group {} {
+ label Internationalization open
+ xywh {10 35 345 130} hide
+ } {
+ Fl_Choice i18n_type_chooser {
+ label {Use:}
+ callback i18n_type_cb open
+ tooltip {Type of internationalization to use.} xywh {100 45 125 20} box THIN_UP_BOX down_box BORDER_BOX
+ } {
+ menuitem {} {
+ label None
+ xywh {0 0 100 20}
+ }
+ menuitem {} {
+ label {GNU gettext}
+ xywh {0 0 100 20}
+ }
+ menuitem {} {
+ label {POSIX catgets}
+ xywh {0 0 100 20}
+ }
+ }
+ Fl_Input i18n_include_input {
+ label {\#include:}
+ callback i18n_text_cb
+ tooltip {The include file for internationalization.} xywh {100 75 245 20} box THIN_DOWN_BOX textfont 4
+ }
+ Fl_Input i18n_file_input {
+ label {File:}
+ callback i18n_text_cb
+ tooltip {The name of the message catalog.} xywh {100 105 245 20} box THIN_DOWN_BOX textfont 4
+ }
+ Fl_Input i18n_set_input {
+ label {Set:}
+ callback i18n_text_cb
+ tooltip {The message set number.} xywh {100 135 245 20} type Int box THIN_DOWN_BOX textfont 4
+ }
+ Fl_Input i18n_function_input {
+ label {Function:}
+ callback i18n_text_cb
+ tooltip {The function to call to internationalize the labels and tooltips.} xywh {100 105 245 20} box THIN_DOWN_BOX textfont 4
+ }
}
}
- Fl_Input i18n_include_input {
- label {\#include:}
- callback i18n_text_cb
- tooltip {The include file for internationalization.} xywh {100 65 245 20} box THIN_DOWN_BOX textfont 4 hide
- }
- Fl_Input i18n_file_input {
- label {File:}
- callback i18n_text_cb
- tooltip {The name of the message catalog.} xywh {100 95 245 20} box THIN_DOWN_BOX textfont 4 hide
- }
- Fl_Input i18n_set_input {
- label {Set:}
- callback i18n_text_cb
- tooltip {The message set number.} xywh {100 125 245 20} type Int box THIN_DOWN_BOX textfont 4 hide
- }
- Fl_Input i18n_function_input {
- label {Function:}
- callback i18n_text_cb
- tooltip {The function to call to internationalize the labels and tooltips.} xywh {100 95 245 20} box THIN_DOWN_BOX textfont 4 hide
- }
}
}
@@ -94,68 +100,48 @@ decl {extern Fl_Preferences fluid_prefs;} {public
Function {make_settings_window()} {open
} {
Fl_Window settings_window {
- label Settings open
- xywh {376 480 400 175} visible
+ label {GUI Settings} open
+ xywh {397 774 255 179} visible
} {
Fl_Button {} {
label Close
callback {settings_window->hide();}
- tooltip {Close this dialog.} xywh {330 140 60 25}
- }
- Fl_Box {} {
- label {Grid:}
- xywh {15 30 130 100} box ENGRAVED_FRAME labelsize 12 align 5
- }
- Fl_Input horizontal_input {
- label {Horizontal:}
- user_data 1 user_data_type long
- callback grid_cb
- tooltip {Horizontal grid spacing.} xywh {95 40 40 20} type Int box THIN_DOWN_BOX
- code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
+ tooltip {Close this dialog.} xywh {185 145 60 25}
}
- Fl_Input vertical_input {
- label {Vertical:}
- user_data 2 user_data_type long
- callback grid_cb
- tooltip {Vertical grid spacing.} xywh {95 70 40 20} type Int box THIN_DOWN_BOX
- code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
- }
- Fl_Input snap_input {
- label {Snap:}
- user_data 3 user_data_type long
- callback grid_cb
- tooltip {Snap to grid within this many pixels.} xywh {95 100 40 20} type Int box THIN_DOWN_BOX
- code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
- }
- Fl_Box {} {
- label {GUI:}
- xywh {155 30 235 100} box ENGRAVED_FRAME labelsize 12 align 5
- }
- Fl_Check_Button tooltips_button {
- label {Show Tooltips}
- callback {Fl_Tooltip::enable(tooltips_button->value());
+ Fl_Tabs {} {
+ xywh {10 10 235 125}
+ } {
+ Fl_Group {} {
+ label {GUI:}
+ xywh {10 35 235 100} align 5
+ } {
+ Fl_Check_Button tooltips_button {
+ label {Show Tooltips}
+ callback {Fl_Tooltip::enable(tooltips_button->value());
fluid_prefs.set("show_tooltips", tooltips_button->value());}
- xywh {165 40 215 20} down_box DOWN_BOX
- code0 {char b;}
- code1 {fluid_prefs.get("show_tooltips", b, 1);}
- code2 {tooltips_button->value(b);}
- code3 {Fl_Tooltip::enable(b);}
- }
- Fl_Check_Button completion_button {
- label {Show Completion Dialogs}
- callback {fluid_prefs.set("show_completion_dialogs", completion_button->value());}
- xywh {165 70 215 20} down_box DOWN_BOX
- code0 {char b;}
- code1 {fluid_prefs.get("show_completion_dialogs", b, 1);}
- code2 {completion_button->value(b);}
- }
- Fl_Check_Button openlast_button {
- label {Open Previous File on Startup}
- callback {fluid_prefs.set("open_previous_file", openlast_button->value());}
- xywh {165 100 215 20} down_box DOWN_BOX
- code0 {char b;}
- code1 {fluid_prefs.get("open_previous_file", b, 0);}
- code2 {openlast_button->value(b);}
+ xywh {20 45 215 20} down_box DOWN_BOX
+ code0 {char b;}
+ code1 {fluid_prefs.get("show_tooltips", b, 1);}
+ code2 {tooltips_button->value(b);}
+ code3 {Fl_Tooltip::enable(b);}
+ }
+ Fl_Check_Button completion_button {
+ label {Show Completion Dialogs}
+ callback {fluid_prefs.set("show_completion_dialogs", completion_button->value());}
+ xywh {20 75 215 20} down_box DOWN_BOX
+ code0 {char b;}
+ code1 {fluid_prefs.get("show_completion_dialogs", b, 1);}
+ code2 {completion_button->value(b);}
+ }
+ Fl_Check_Button openlast_button {
+ label {Open Previous File on Startup}
+ callback {fluid_prefs.set("open_previous_file", openlast_button->value());}
+ xywh {20 105 215 20} down_box DOWN_BOX
+ code0 {char b;}
+ code1 {fluid_prefs.get("open_previous_file", b, 0);}
+ code2 {openlast_button->value(b);}
+ }
+ }
}
}
}
@@ -164,61 +150,64 @@ Function {make_shell_window()} {open
} {
Fl_Window shell_window {
label {Shell Command} open
- xywh {630 219 445 104} visible
+ xywh {630 219 450 145} visible
} {
- Fl_Input shell_command_input {
- label {Command:}
- callback {fluid_prefs.set("shell_command", shell_command_input->value());}
- xywh {85 10 350 20}
- code0 {char buf[1024];}
- code1 {fluid_prefs.get("shell_command", buf, "", sizeof(buf));}
- code2 {shell_command_input->value(buf);}
- }
- Fl_Group {} {
- label {Options:} open
- xywh {85 40 350 20} align 4
+ Fl_Tabs {} {open
+ xywh {10 10 430 90}
} {
- Fl_Check_Button shell_savefl_button {
- label {Save .FL File}
- callback {fluid_prefs.set("shell_savefl", shell_savefl_button->value());}
- xywh {85 40 110 20} down_box DOWN_BOX
- code0 {char b;}
- code1 {fluid_prefs.get("shell_savefl", b, 1);}
- code2 {shell_savefl_button->value(b);}
- }
- Fl_Check_Button shell_writecode_button {
- label {Write Code}
- callback {fluid_prefs.set("shell_writecode", shell_writecode_button->value());}
- xywh {200 40 95 20} down_box DOWN_BOX
- code0 {char b;}
- code1 {fluid_prefs.get("shell_writecode", b, 1);}
- code2 {shell_writecode_button->value(b);}
- }
- Fl_Check_Button shell_writemsgs_button {
- label {Write Messages}
- callback {fluid_prefs.set("shell_writemsgs", shell_writemsgs_button->value());}
- xywh {300 40 125 20} down_box DOWN_BOX
- code0 {char b;}
- code1 {fluid_prefs.get("shell_writemsgs", b, 0);}
- code2 {shell_writemsgs_button->value(b);}
+ Fl_Group {} {
+ label {Shell Command} open
+ xywh {10 30 430 70} align 5
+ } {
+ Fl_Input shell_command_input {
+ callback {fluid_prefs.set("shell_command", shell_command_input->value());}
+ xywh {20 40 410 20}
+ code0 {char buf[1024];}
+ code1 {fluid_prefs.get("shell_command", buf, "", sizeof(buf));}
+ code2 {shell_command_input->value(buf);}
+ }
+ Fl_Check_Button shell_savefl_button {
+ label {Save .FL File}
+ callback {fluid_prefs.set("shell_savefl", shell_savefl_button->value());}
+ xywh {20 65 110 20} down_box DOWN_BOX
+ code0 {char b;}
+ code1 {fluid_prefs.get("shell_savefl", b, 1);}
+ code2 {shell_savefl_button->value(b);}
+ }
+ Fl_Check_Button shell_writecode_button {
+ label {Write Code}
+ callback {fluid_prefs.set("shell_writecode", shell_writecode_button->value());}
+ xywh {140 65 95 20} down_box DOWN_BOX
+ code0 {char b;}
+ code1 {fluid_prefs.get("shell_writecode", b, 1);}
+ code2 {shell_writecode_button->value(b);}
+ }
+ Fl_Check_Button shell_writemsgs_button {
+ label {Write Messages}
+ callback {fluid_prefs.set("shell_writemsgs", shell_writemsgs_button->value());}
+ xywh {245 65 130 20} down_box DOWN_BOX
+ code0 {char b;}
+ code1 {fluid_prefs.get("shell_writemsgs", b, 0);}
+ code2 {shell_writemsgs_button->value(b);}
+ }
}
}
Fl_Button {} {
label Cancel
callback {shell_window->hide();}
- xywh {370 70 65 25}
+ xywh {375 110 65 25}
}
Fl_Return_Button {} {
label {Run Command}
callback do_shell_command
- xywh {220 70 140 25}
+ xywh {225 110 140 25}
}
}
Fl_Window shell_run_window {
label {Shell Command Output} open
- xywh {693 386 553 435} resizable visible
+ xywh {693 386 555 435} hide resizable
} {
- Fl_Browser shell_run_list {selected
+ Fl_Browser shell_run_list {
xywh {10 10 535 380} textfont 4 textsize 12 resizable
}
Fl_Return_Button shell_run_button {
@@ -228,3 +217,47 @@ Function {make_shell_window()} {open
}
}
}
+
+Function {make_grid_window()} {open
+} {
+ Fl_Window grid_window {
+ label Grid open
+ xywh {1128 236 155 175} visible
+ } {
+ Fl_Tabs {} {
+ xywh {10 10 135 120} align 5
+ } {
+ Fl_Group {} {
+ label Grid
+ xywh {10 30 135 100} align 5
+ } {
+ Fl_Input horizontal_input {
+ label {Horizontal:}
+ user_data 1 user_data_type long
+ callback grid_cb
+ tooltip {Horizontal grid spacing.} xywh {95 40 40 20} type Int box THIN_DOWN_BOX
+ code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
+ }
+ Fl_Input vertical_input {
+ label {Vertical:}
+ user_data 2 user_data_type long
+ callback grid_cb
+ tooltip {Vertical grid spacing.} xywh {95 70 40 20} type Int box THIN_DOWN_BOX
+ code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
+ }
+ Fl_Input snap_input {
+ label {Snap:}
+ user_data 3 user_data_type long
+ callback grid_cb
+ tooltip {Snap to grid within this many pixels.} xywh {95 100 40 20} type Int box THIN_DOWN_BOX
+ code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
+ }
+ }
+ }
+ Fl_Button {} {
+ label Close
+ callback {grid_window->hide();}
+ tooltip {Close this dialog.} xywh {85 140 60 25}
+ }
+ }
+}
diff --git a/fluid/alignment_panel.h b/fluid/alignment_panel.h
index 23553ae29..f2ae1e847 100644
--- a/fluid/alignment_panel.h
+++ b/fluid/alignment_panel.h
@@ -6,8 +6,10 @@
#include <FL/Fl_Window.H>
#include <FL/Fl_Preferences.H>
#include <FL/Fl_Tooltip.H>
-extern Fl_Window *alignment_window;
+extern Fl_Window *project_window;
#include <FL/Fl_Button.H>
+#include <FL/Fl_Tabs.H>
+#include <FL/Fl_Group.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Input.H>
extern void header_input_cb(Fl_Input*, void*);
@@ -25,15 +27,11 @@ extern Fl_Input *i18n_include_input;
extern Fl_Input *i18n_file_input;
extern Fl_Input *i18n_set_input;
extern Fl_Input *i18n_function_input;
-Fl_Window* make_alignment_window();
+Fl_Window* make_project_window();
extern Fl_Menu_Item menu_i18n_type_chooser[];
extern void i18n_cb(Fl_Choice *,void *);
extern Fl_Preferences fluid_prefs;
extern Fl_Window *settings_window;
-extern void grid_cb(Fl_Input*, long);
-extern Fl_Input *horizontal_input;
-extern Fl_Input *vertical_input;
-extern Fl_Input *snap_input;
#include <FL/Fl_Check_Button.H>
extern Fl_Check_Button *tooltips_button;
extern Fl_Check_Button *completion_button;
@@ -41,7 +39,6 @@ extern Fl_Check_Button *openlast_button;
Fl_Window* make_settings_window();
extern Fl_Window *shell_window;
extern Fl_Input *shell_command_input;
-#include <FL/Fl_Group.H>
extern Fl_Check_Button *shell_savefl_button;
extern Fl_Check_Button *shell_writecode_button;
extern Fl_Check_Button *shell_writemsgs_button;
@@ -52,4 +49,10 @@ extern Fl_Window *shell_run_window;
extern Fl_Browser *shell_run_list;
extern Fl_Return_Button *shell_run_button;
Fl_Window* make_shell_window();
+extern Fl_Window *grid_window;
+extern void grid_cb(Fl_Input*, long);
+extern Fl_Input *horizontal_input;
+extern Fl_Input *vertical_input;
+extern Fl_Input *snap_input;
+Fl_Window* make_grid_window();
#endif
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx
index 862d950ad..8d50d46db 100644
--- a/fluid/fluid.cxx
+++ b/fluid/fluid.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fluid.cxx,v 1.15.2.13.2.20 2002/05/01 17:35:30 matthiaswm Exp $"
+// "$Id: fluid.cxx,v 1.15.2.13.2.21 2002/05/01 19:17:24 easysw Exp $"
//
// FLUID main entry for the Fast Light Tool Kit (FLTK).
//
@@ -63,9 +63,9 @@
static Fl_Help_Dialog *help_dialog = 0;
Fl_Preferences fluid_prefs(Fl_Preferences::USER, "fltk.org", "fluid");
-int gridx;
-int gridy;
-int snap;
+int gridx = 5;
+int gridy = 5;
+int snap = 1;
// File history info...
char absolute_history[10][1024];
@@ -307,7 +307,7 @@ void cut_cb(Fl_Widget *, void *) {
if (p) select_only(p);
}
-extern int force_parent, gridx, gridy;
+extern int force_parent;
void paste_cb(Fl_Widget*, void*) {
if (ipasteoffset) force_parent = 1;
@@ -332,7 +332,8 @@ static void sort_cb(Fl_Widget *,void *) {
sort((Fl_Type*)0);
}
-void show_alignment_cb(Fl_Widget *, void *);
+void show_project_cb(Fl_Widget *, void *);
+void show_grid_cb(Fl_Widget *, void *);
void show_settings_cb(Fl_Widget *, void *);
void align_widget_cb(Fl_Widget *, long);
@@ -381,9 +382,9 @@ extern Fl_Menu_Item New_Menu[];
Fl_Menu_Item Main_Menu[] = {
{"&File",0,0,0,FL_SUBMENU},
- {"New", 0, new_cb, 0},
- {"Open...", FL_CTRL+'o', open_cb, 0},
- {"Open Previous",0,0,0,FL_SUBMENU},
+ {"&New", 0, new_cb, 0},
+ {"&Open...", FL_CTRL+'o', open_cb, 0},
+ {"Open &Previous",0,0,0,FL_SUBMENU},
{relative_history[0], FL_CTRL+'0', open_history_cb, absolute_history[0]},
{relative_history[1], FL_CTRL+'1', open_history_cb, absolute_history[1]},
{relative_history[2], FL_CTRL+'2', open_history_cb, absolute_history[2]},
@@ -395,40 +396,41 @@ Fl_Menu_Item Main_Menu[] = {
{relative_history[8], FL_CTRL+'8', open_history_cb, absolute_history[8]},
{relative_history[9], FL_CTRL+'9', open_history_cb, absolute_history[9]},
{0},
- {"Save", FL_CTRL+'s', save_cb, 0},
- {"Save As...", FL_CTRL+FL_SHIFT+'s', save_cb, (void*)1},
- {"Merge...", FL_CTRL+'i', open_cb, (void*)1, FL_MENU_DIVIDER},
- {"Write code", FL_CTRL+FL_SHIFT+'c', write_cb, 0},
- {"Write strings", FL_CTRL+FL_SHIFT+'w', write_strings_cb, 0},
- {"Quit", FL_CTRL+'q', exit_cb},
+ {"&Insert...", FL_CTRL+'i', open_cb, (void*)1, FL_MENU_DIVIDER},
+ {"&Save", FL_CTRL+'s', save_cb, 0},
+ {"Save &As...", FL_CTRL+FL_SHIFT+'s', save_cb, (void*)1, FL_MENU_DIVIDER},
+ {"Write &code", FL_CTRL+FL_SHIFT+'c', write_cb, 0},
+ {"&Write strings", FL_CTRL+FL_SHIFT+'w', write_strings_cb, 0, FL_MENU_DIVIDER},
+ {"&Quit", FL_CTRL+'q', exit_cb},
{0},
{"&Edit",0,0,0,FL_SUBMENU},
- {"Undo", FL_CTRL+'z', nyi},
- {"Cut", FL_CTRL+'x', cut_cb},
- {"Copy", FL_CTRL+'c', copy_cb},
- {"Paste", FL_CTRL+'v', paste_cb},
- {"Select All", FL_CTRL+'a', select_all_cb, 0, FL_MENU_DIVIDER},
- {"Open...", FL_F+1, openwidget_cb},
- {"Sort",0,sort_cb},
- {"Earlier", FL_F+2, earlier_cb},
- {"Later", FL_F+3, later_cb},
+ {"&Undo", FL_CTRL+'z', nyi},
+ {"C&ut", FL_CTRL+'x', cut_cb},
+ {"&Copy", FL_CTRL+'c', copy_cb},
+ {"&Paste", FL_CTRL+'v', paste_cb},
+ {"Select &All", FL_CTRL+'a', select_all_cb, 0, FL_MENU_DIVIDER},
+ {"&Open...", FL_F+1, openwidget_cb},
+ {"&Sort",0,sort_cb},
+ {"&Earlier", FL_F+2, earlier_cb},
+ {"&Later", FL_F+3, later_cb},
//{"Show", FL_F+5, show_cb},
//{"Hide", FL_F+6, hide_cb},
- {"Group", FL_F+7, group_cb},
- {"Ungroup", FL_F+8, ungroup_cb,0, FL_MENU_DIVIDER},
+ {"&Group", FL_F+7, group_cb},
+ {"U&ngroup", FL_F+8, ungroup_cb,0, FL_MENU_DIVIDER},
//{"Deactivate", 0, nyi},
//{"Activate", 0, nyi, 0, FL_MENU_DIVIDER},
- {"Overlays on/off",FL_CTRL+FL_SHIFT+'o',toggle_overlays},
- {"Preferences",FL_CTRL+'p',show_alignment_cb},
+ {"O&verlays on/off",FL_CTRL+FL_SHIFT+'o',toggle_overlays},
+ {"Pro&ject Settings...",FL_CTRL+'p',show_project_cb},
+ {"&GUI Settings...",FL_CTRL+FL_SHIFT+'p',show_settings_cb},
{0},
{"&New", 0, 0, (void *)New_Menu, FL_SUBMENU_POINTER},
{"&Layout",0,0,0,FL_SUBMENU},
{"&Align",0,0,0,FL_SUBMENU},
{"&Left",0,(Fl_Callback *)align_widget_cb,(void*)10},
- {"&Hor. Center",0,(Fl_Callback *)align_widget_cb,(void*)11},
+ {"&Center",0,(Fl_Callback *)align_widget_cb,(void*)11},
{"&Right",0,(Fl_Callback *)align_widget_cb,(void*)12},
{"&Top",0,(Fl_Callback *)align_widget_cb,(void*)13},
- {"&Vert. Center",0,(Fl_Callback *)align_widget_cb,(void*)14},
+ {"&Middle",0,(Fl_Callback *)align_widget_cb,(void*)14},
{"&Bottom",0,(Fl_Callback *)align_widget_cb,(void*)15},
{0},
{"&Space Evenly",0,0,0,FL_SUBMENU},
@@ -444,16 +446,16 @@ Fl_Menu_Item Main_Menu[] = {
{"&Horizontal",0,(Fl_Callback *)align_widget_cb,(void*)40},
{"&Vertical",0,(Fl_Callback *)align_widget_cb,(void*)41},
{0},
- {"&Grid",FL_CTRL+FL_SHIFT+'p',show_settings_cb},
+ {"&Grid...",FL_CTRL+'g',show_grid_cb},
{0},
{"&Shell",0,0,0,FL_SUBMENU},
- {"Execute Command...",FL_ALT+'x',(Fl_Callback *)show_shell_window},
- {"Execute Again",FL_ALT+'g',(Fl_Callback *)do_shell_command},
+ {"Execute &Command...",FL_ALT+'x',(Fl_Callback *)show_shell_window},
+ {"Execute &Again",FL_ALT+'g',(Fl_Callback *)do_shell_command},
{0},
{"&Help",0,0,0,FL_SUBMENU},
- {"About FLUID...",0,about_cb},
- {"On FLUID...",0,help_cb},
- {"Manual...",0,manual_cb},
+ {"&About FLUID...",0,about_cb},
+ {"&On FLUID...",0,help_cb},
+ {"&Manual...",0,manual_cb},
{0},
{0}};
@@ -479,6 +481,7 @@ void make_main_window() {
load_history();
+ make_grid_window();
make_settings_window();
make_shell_window();
@@ -758,15 +761,21 @@ int main(int argc,char **argv) {
}
fl_message("Can't read %s: %s", c, strerror(errno));
}
- if (compile_only && compile_strings) { write_strings_cb(0,0); }
- if (compile_only) {write_cb(0,0); exit(0);}
+ if (compile_only) {
+ if (compile_strings) write_strings_cb(0,0);
+ write_cb(0,0);
+ exit(0);
+ }
modflag = 0;
#ifndef WIN32
signal(SIGINT,sigint);
#endif
+
+ grid_cb(horizontal_input, 0); // Makes sure that windows get snap params...
+
return Fl::run();
}
//
-// End of "$Id: fluid.cxx,v 1.15.2.13.2.20 2002/05/01 17:35:30 matthiaswm Exp $".
+// End of "$Id: fluid.cxx,v 1.15.2.13.2.21 2002/05/01 19:17:24 easysw Exp $".
//