summaryrefslogtreecommitdiff
path: root/fluid/Fl_Window_Type.cxx
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/Fl_Window_Type.cxx
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/Fl_Window_Type.cxx')
-rw-r--r--fluid/Fl_Window_Type.cxx36
1 files changed, 30 insertions, 6 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 $".
//