summaryrefslogtreecommitdiff
path: root/fluid/Fl_Window_Type.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-04-30 18:11:49 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-04-30 18:11:49 +0000
commit1f5448409b34b28a38ac48ae47ce2f66731142ef (patch)
tree0a813a222374ef7977c135a7eae04fed9831d173 /fluid/Fl_Window_Type.cxx
parent19b4d2fd1cb060a83ed75353f876dec3877059a5 (diff)
Fl_Preferences::getUserdataPath() and getPath() methods now require a
length parameter for the string. Added GUI preferences and file history to FLUID, using Fl_Preferences. FLUID now uses getUserdataPath() for the cut buffer location. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2141 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/Fl_Window_Type.cxx')
-rw-r--r--fluid/Fl_Window_Type.cxx42
1 files changed, 28 insertions, 14 deletions
diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx
index e024e588e..dd7d55d78 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.1 2002/01/01 15:11:29 easysw Exp $"
+// "$Id: Fl_Window_Type.cxx,v 1.13.2.10.2.2 2002/04/30 18:11:49 easysw Exp $"
//
// Window type code for the Fast Light Tool Kit (FLTK).
//
@@ -38,9 +38,9 @@
#include "alignment_panel.h"
#include <stdio.h>
-int gridx = 5;
-int gridy = 5;
-int snap = 3;
+extern int gridx;
+extern int gridy;
+extern int snap;
int include_H_from_C = 1;
extern int i18n_type;
@@ -50,15 +50,25 @@ extern const char* i18n_file;
extern const char* i18n_set;
extern int modflag;
-void alignment_cb(Fl_Input *i, long v) {
+extern Fl_Preferences fluid_prefs;
+
+void grid_cb(Fl_Input *i, long v) {
int n = atoi(i->value());
if (n < 0) n = 0;
switch (v) {
- case 1: gridx = n; break;
- case 2: gridy = n; break;
- case 3: snap = n; break;
+ case 1:
+ gridx = n;
+ fluid_prefs.set("gridx", n);
+ break;
+ case 2:
+ gridy = n;
+ fluid_prefs.set("gridy", n);
+ break;
+ case 3:
+ snap = n;
+ fluid_prefs.set("snap", n);
+ break;
}
- modflag = 1;
}
void i18n_type_cb(Fl_Choice *c, void *) {
@@ -117,10 +127,6 @@ void show_alignment_cb(Fl_Widget *, void *) {
include_H_from_C_button->value(include_H_from_C);
header_file_input->value(header_file_name);
code_file_input->value(code_file_name);
- 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);
i18n_type_chooser->value(i18n_type);
i18n_function_input->value(i18n_function);
i18n_file_input->value(i18n_file);
@@ -149,6 +155,14 @@ void show_alignment_cb(Fl_Widget *, void *) {
alignment_window->show();
}
+void show_settings_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);
+ settings_window->show();
+}
+
void header_input_cb(Fl_Input* i, void*) {
header_file_name = i->value();
}
@@ -752,5 +766,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.1 2002/01/01 15:11:29 easysw Exp $".
+// End of "$Id: Fl_Window_Type.cxx,v 1.13.2.10.2.2 2002/04/30 18:11:49 easysw Exp $".
//