diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2000-04-24 18:22:50 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2000-04-24 18:22:50 +0000 |
| commit | 8ff6d1daf49861b28bafc9e905ff9dcd910653be (patch) | |
| tree | 34d788d13090ec2ac8a586af3e443de928ad37f1 /fluid/Fl_Window_Type.cxx | |
| parent | cd914369a657d7806dfd86b1fe7e3535f43d779b (diff) | |
FLUID changes to support GNU gettext and POSIX catgets under FLTK 1.0;
will work on changes for 2.0 later this week...
(please let me know what you think...)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1082 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/Fl_Window_Type.cxx')
| -rw-r--r-- | fluid/Fl_Window_Type.cxx | 79 |
1 files changed, 77 insertions, 2 deletions
diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx index 5c6ed9d2c..29c3186d5 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.3 1999/09/10 16:40:17 bill Exp $" +// "$Id: Fl_Window_Type.cxx,v 1.13.2.4 2000/04/24 18:22:49 mike Exp $" // // Window type code for the Fast Light Tool Kit (FLTK). // @@ -43,6 +43,12 @@ int gridy = 5; int snap = 3; int include_H_from_C = 1; +extern int i18n_type; +extern const char* i18n_include; +extern const char* i18n_function; +extern const char* i18n_file; +extern const char* i18n_set; +extern int modflag; void alignment_cb(Fl_Input *i, long v) { int n = atoi(i->value()); @@ -52,6 +58,50 @@ void alignment_cb(Fl_Input *i, long v) { case 2: gridy = n; break; case 3: snap = n; break; } + modflag = 1; +} + +void i18n_type_cb(Fl_Choice *c, void *) { + switch (i18n_type = c->value()) { + case 0 : /* None */ + i18n_include_input->hide(); + i18n_file_input->hide(); + i18n_set_input->hide(); + i18n_function_input->hide(); + break; + case 1 : /* GNU gettext */ + i18n_include_input->value("<libintl.h>"); + i18n_function_input->value("gettext"); + i18n_include_input->show(); + i18n_file_input->hide(); + i18n_set_input->hide(); + i18n_function_input->show(); + break; + case 2 : /* POSIX cat */ + i18n_include_input->value("<nl_types.h>"); + i18n_file_input->value("i18n_file"); + i18n_set_input->value("1"); + i18n_include_input->show(); + i18n_file_input->show(); + i18n_set_input->show(); + i18n_function_input->hide(); + break; + } + + modflag = 1; +} + +void i18n_text_cb(Fl_Input *i, void *) { + if (i == i18n_function_input) + i18n_function = i->value(); + else if (i == i18n_file_input) + i18n_file = i->value(); + else if (i == i18n_set_input) + i18n_set = i->value(); + else if (i == i18n_include_input) + i18n_include = i->value(); + + modflag = 1; } extern const char* header_file_name; @@ -66,6 +116,31 @@ void show_alignment_cb(Fl_Widget *, void *) { 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); + i18n_set_input->value(i18n_set); + i18n_include_input->value(i18n_include); + switch (i18n_type) { + case 0 : /* None */ + i18n_include_input->hide(); + i18n_file_input->hide(); + i18n_set_input->hide(); + i18n_function_input->hide(); + break; + case 1 : /* GNU gettext */ + i18n_include_input->show(); + i18n_file_input->hide(); + i18n_set_input->hide(); + i18n_function_input->show(); + break; + case 2 : /* POSIX cat */ + i18n_include_input->show(); + i18n_file_input->show(); + i18n_set_input->show(); + i18n_function_input->hide(); + break; + } alignment_window->show(); } @@ -672,5 +747,5 @@ int Fl_Window_Type::read_fdesign(const char* name, const char* value) { } // -// End of "$Id: Fl_Window_Type.cxx,v 1.13.2.3 1999/09/10 16:40:17 bill Exp $". +// End of "$Id: Fl_Window_Type.cxx,v 1.13.2.4 2000/04/24 18:22:49 mike Exp $". // |
