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/alignment_panel.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/alignment_panel.cxx')
| -rw-r--r-- | fluid/alignment_panel.cxx | 77 |
1 files changed, 66 insertions, 11 deletions
diff --git a/fluid/alignment_panel.cxx b/fluid/alignment_panel.cxx index fc9da9f62..94095961c 100644 --- a/fluid/alignment_panel.cxx +++ b/fluid/alignment_panel.cxx @@ -20,62 +20,117 @@ Fl_Input *code_file_input=(Fl_Input *)0; Fl_Light_Button *include_H_from_C_button=(Fl_Light_Button *)0; +Fl_Choice *i18n_type_chooser=(Fl_Choice *)0; + +Fl_Menu_Item menu_i18n_type_chooser[] = { + {"None", 0, 0, 0, 0, 0, 0, 14, 0}, + {"GNU gettext", 0, 0, 0, 0, 0, 0, 14, 0}, + {"POSIX catgets", 0, 0, 0, 0, 0, 0, 14, 0}, + {0} +}; + +Fl_Input *i18n_include_input=(Fl_Input *)0; + +Fl_Input *i18n_file_input=(Fl_Input *)0; + +Fl_Input *i18n_set_input=(Fl_Input *)0; + +Fl_Input *i18n_function_input=(Fl_Input *)0; + Fl_Window* make_alignment_window() { Fl_Window* w; - { Fl_Window* o = alignment_window = new Fl_Window(210, 320, "Preferences"); + { Fl_Window* o = alignment_window = new Fl_Window(365, 340, "Preferences"); w = o; - { Fl_Box* o = new Fl_Box(10, 25, 190, 100, "Alignment:"); + { Fl_Box* o = new Fl_Box(10, 25, 130, 130, "Alignment:"); o->box(FL_ENGRAVED_FRAME); o->labelsize(12); o->align(FL_ALIGN_TOP_LEFT); } - { Fl_Input* o = horizontal_input = new Fl_Input(90, 35, 100, 20, "Horizontal:"); + { Fl_Input* o = horizontal_input = new Fl_Input(90, 35, 40, 20, "Horizontal:"); o->type(2); o->box(FL_THIN_DOWN_BOX); o->callback((Fl_Callback*)alignment_cb, (void*)(1)); o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); } - { Fl_Input* o = vertical_input = new Fl_Input(90, 65, 100, 20, "Vertical:"); + { Fl_Input* o = vertical_input = new Fl_Input(90, 65, 40, 20, "Vertical:"); o->type(2); o->box(FL_THIN_DOWN_BOX); o->callback((Fl_Callback*)alignment_cb, (void*)(2)); o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); } - { Fl_Input* o = snap_input = new Fl_Input(90, 95, 100, 20, "Snap:"); + { Fl_Input* o = snap_input = new Fl_Input(90, 95, 40, 20, "Snap:"); o->type(2); o->box(FL_THIN_DOWN_BOX); o->callback((Fl_Callback*)alignment_cb, (void*)(3)); o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY); } - { Fl_Button* o = new Fl_Button(140, 285, 60, 25, "Close"); + { Fl_Button* o = new Fl_Button(295, 305, 60, 25, "Close"); o->callback((Fl_Callback*)cb_Close); } - { Fl_Box* o = new Fl_Box(10, 145, 190, 130, "Output File Names:"); + { 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, 155, 170, 30, "Use \"name.ext\" to set name or just \".ext\" to set only extension."); + { 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, 185, 90, 20, "Header File:"); + { Fl_Input* o = header_file_input = new Fl_Input(100, 205, 245, 20, "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, 215, 90, 20, "Code File:"); + { Fl_Input* o = code_file_input = new Fl_Input(100, 235, 245, 20, "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(20, 245, 170, 20, "Include Header from Code"); + { Fl_Light_Button* o = include_H_from_C_button = new Fl_Light_Button(100, 265, 170, 20, "Include Header from Code"); o->value(1); o->labelsize(12); o->callback((Fl_Callback*)include_H_from_C_button_cb); } + { Fl_Box* o = new Fl_Box(150, 25, 205, 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(220, 35, 125, 20, "Use:"); + o->box(FL_THIN_UP_BOX); + o->callback((Fl_Callback*)i18n_type_cb); + o->menu(menu_i18n_type_chooser); + } + { Fl_Input* o = i18n_include_input = new Fl_Input(220, 65, 125, 20, "#include:"); + 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(220, 95, 125, 20, "File:"); + 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(220, 125, 125, 20, "Set:"); + 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(220, 95, 125, 20, "Function:"); + o->box(FL_THIN_DOWN_BOX); + o->textfont(4); + o->callback((Fl_Callback*)i18n_text_cb); + o->hide(); + } o->set_modal(); o->end(); } return w; } +extern void i18n_cb(Fl_Choice *,void *); |
