diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-07-14 23:42:09 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-07-14 23:42:17 +0200 |
| commit | 5d69828ed08c5f3a254a2d5ae9a9ed65decb54a7 (patch) | |
| tree | 92a443a7cffd1b4f49fa101be3432de1361bdd6f /fluid | |
| parent | b2eb664586b8d464e3382101846e4bde250285df (diff) | |
FLUID: fixes all overlapping widgets in all .fl files
Also fixes an issue with multiple use of the same variable
for different types of i18n.
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/Fl_Menu_Type.cxx | 14 | ||||
| -rw-r--r-- | fluid/Fl_Widget_Type.cxx | 12 | ||||
| -rw-r--r-- | fluid/Fl_Window_Type.cxx | 40 | ||||
| -rw-r--r-- | fluid/alignment_panel.cxx | 208 | ||||
| -rw-r--r-- | fluid/alignment_panel.fl | 116 | ||||
| -rw-r--r-- | fluid/alignment_panel.h | 16 | ||||
| -rw-r--r-- | fluid/code.cxx | 41 | ||||
| -rw-r--r-- | fluid/file.cxx | 44 | ||||
| -rw-r--r-- | fluid/fluid.cxx | 74 | ||||
| -rw-r--r-- | fluid/fluid.h | 18 | ||||
| -rw-r--r-- | fluid/template_panel.fl | 11 | ||||
| -rw-r--r-- | fluid/widget_panel.cxx | 18 | ||||
| -rw-r--r-- | fluid/widget_panel.fl | 22 |
13 files changed, 376 insertions, 258 deletions
diff --git a/fluid/Fl_Menu_Type.cxx b/fluid/Fl_Menu_Type.cxx index 284e2e66d..6ca424041 100644 --- a/fluid/Fl_Menu_Type.cxx +++ b/fluid/Fl_Menu_Type.cxx @@ -380,7 +380,7 @@ void Fl_Menu_Item_Type::write_item(Fd_Code_Writer& f) { switch (g_project.i18n_type) { case 1: // we will call i18n when the menu is instantiated for the first time - f.write_c("%s(", g_project.i18n_static_function.c_str()); + f.write_c("%s(", g_project.i18n_gnu_static_function.c_str()); f.write_cstring(label()); f.write_c(")"); break; @@ -481,11 +481,11 @@ void Fl_Menu_Item_Type::write_code1(Fd_Code_Writer& f) { f.write_c("%sml->labelb = o->label();\n", f.indent()); } else if (g_project.i18n_type==1) { f.write_c("%sml->labelb = %s(o->label());\n", - f.indent(), g_project.i18n_function.c_str()); + f.indent(), g_project.i18n_gnu_function.c_str()); } else if (g_project.i18n_type==2) { f.write_c("%sml->labelb = catgets(%s,%s,i+%d,o->label());\n", - f.indent(), g_project.i18n_file[0] ? g_project.i18n_file.c_str() : "_catalog", - g_project.i18n_set.c_str(), msgnum()); + f.indent(), g_project.i18n_pos_file[0] ? g_project.i18n_pos_file.c_str() : "_catalog", + g_project.i18n_pos_set.c_str(), msgnum()); } f.write_c("%sml->typea = FL_IMAGE_LABEL;\n", f.indent()); f.write_c("%sml->typeb = FL_NORMAL_LABEL;\n", f.indent()); @@ -503,11 +503,11 @@ void Fl_Menu_Item_Type::write_code1(Fd_Code_Writer& f) { start_menu_initialiser(f, menuItemInitialized, mname, i); if (g_project.i18n_type==1) { f.write_c("%so->label(%s(o->label()));\n", - f.indent(), g_project.i18n_function.c_str()); + f.indent(), g_project.i18n_gnu_function.c_str()); } else if (g_project.i18n_type==2) { f.write_c("%so->label(catgets(%s,%s,i+%d,o->label()));\n", - f.indent(), g_project.i18n_file[0] ? g_project.i18n_file.c_str() : "_catalog", - g_project.i18n_set.c_str(), msgnum()); + f.indent(), g_project.i18n_pos_file[0] ? g_project.i18n_pos_file.c_str() : "_catalog", + g_project.i18n_pos_set.c_str(), msgnum()); } } } diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index dad196b4f..342d2145a 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -2918,13 +2918,13 @@ void Fl_Widget_Type::write_code1(Fd_Code_Writer& f) { f.write_cstring(label()); break; case 1 : /* GNU gettext */ - f.write_c("%s(", g_project.i18n_function.c_str()); + f.write_c("%s(", g_project.i18n_gnu_function.c_str()); f.write_cstring(label()); f.write_c(")"); break; case 2 : /* POSIX catgets */ - f.write_c("catgets(%s,%s,%d,", g_project.i18n_file[0] ? g_project.i18n_file.c_str() : "_catalog", - g_project.i18n_set.c_str(), msgnum()); + f.write_c("catgets(%s,%s,%d,", g_project.i18n_pos_file[0] ? g_project.i18n_pos_file.c_str() : "_catalog", + g_project.i18n_pos_set.c_str(), msgnum()); f.write_cstring(label()); f.write_c(")"); break; @@ -2991,13 +2991,13 @@ void Fl_Widget_Type::write_widget_code(Fd_Code_Writer& f) { f.write_cstring(tooltip()); break; case 1 : /* GNU gettext */ - f.write_c("%s(", g_project.i18n_function.c_str()); + f.write_c("%s(", g_project.i18n_gnu_function.c_str()); f.write_cstring(tooltip()); f.write_c(")"); break; case 2 : /* POSIX catgets */ - f.write_c("catgets(%s,%s,%d,", g_project.i18n_file[0] ? g_project.i18n_file.c_str() : "_catalog", - g_project.i18n_set.c_str(), msgnum() + 1); + f.write_c("catgets(%s,%s,%d,", g_project.i18n_pos_file[0] ? g_project.i18n_pos_file.c_str() : "_catalog", + g_project.i18n_pos_set.c_str(), msgnum() + 1); f.write_cstring(tooltip()); f.write_c(")"); break; diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx index 1214bc7c3..cb7292947 100644 --- a/fluid/Fl_Window_Type.cxx +++ b/fluid/Fl_Window_Type.cxx @@ -72,44 +72,16 @@ void i18n_type_cb(Fl_Choice *c, void *v) { } switch (g_project.i18n_type) { case 0 : /* None */ - i18n_include_input->hide(); - i18n_conditional_input->hide(); - i18n_file_input->hide(); - i18n_set_input->hide(); - i18n_function_input->hide(); - i18n_static_function_input->hide(); + i18n_gnu_group->hide(); + i18n_posix_group->hide(); break; case 1 : /* GNU gettext */ - i18n_include_input->value("<libintl.h>"); - g_project.i18n_include = i18n_include_input->value(); - i18n_conditional_input->value(""); - g_project.i18n_conditional = i18n_conditional_input->value(); - i18n_function_input->value("gettext"); - g_project.i18n_function = i18n_function_input->value(); - i18n_static_function_input->value("gettext_noop"); - g_project.i18n_static_function = i18n_static_function_input->value(); - i18n_include_input->show(); - i18n_conditional_input->show(); - i18n_file_input->hide(); - i18n_set_input->hide(); - i18n_function_input->show(); - i18n_static_function_input->show(); + i18n_gnu_group->show(); + i18n_posix_group->hide(); break; case 2 : /* POSIX cat */ - i18n_include_input->value("<nl_types.h>"); - g_project.i18n_include = i18n_include_input->value(); - i18n_conditional_input->value(""); - g_project.i18n_conditional = i18n_conditional_input->value(); - i18n_file_input->value(""); - g_project.i18n_file = i18n_file_input->value(); - i18n_set_input->value("1"); - g_project.i18n_set = i18n_set_input->value(); - i18n_include_input->show(); - i18n_conditional_input->show(); - i18n_file_input->show(); - i18n_set_input->show(); - i18n_function_input->hide(); - i18n_static_function_input->hide(); + i18n_gnu_group->hide(); + i18n_posix_group->show(); break; } diff --git a/fluid/alignment_panel.cxx b/fluid/alignment_panel.cxx index 53a02cb16..e66906a22 100644 --- a/fluid/alignment_panel.cxx +++ b/fluid/alignment_panel.cxx @@ -914,74 +914,110 @@ Fl_Menu_Item menu_i18n_type_chooser[] = { {0,0,0,0,0,0,0,0,0} }; -Fl_Input *i18n_include_input=(Fl_Input *)0; +Fl_Group *i18n_gnu_group=(Fl_Group *)0; -static void cb_i18n_include_input(Fl_Input* o, void* v) { +static void cb_i18n_gnu_group(Fl_Group* o, void* v) { + propagate_load(o, v); +} + +Fl_Input *i18n_gnu_include_input=(Fl_Input *)0; + +static void cb_i18n_gnu_include_input(Fl_Input* o, void* v) { if (v == LOAD) { - o->value(g_project.i18n_include.c_str()); + o->value(g_project.i18n_gnu_include.c_str()); } else { undo_checkpoint(); - g_project.i18n_include = o->value(); + g_project.i18n_gnu_include = o->value(); set_modflag(1); } } -Fl_Input *i18n_conditional_input=(Fl_Input *)0; +Fl_Input *i18n_gnu_conditional_input=(Fl_Input *)0; -static void cb_i18n_conditional_input(Fl_Input* o, void* v) { +static void cb_i18n_gnu_conditional_input(Fl_Input* o, void* v) { if (v == LOAD) { - o->value(g_project.i18n_conditional.c_str()); + o->value(g_project.i18n_gnu_conditional.c_str()); } else { undo_checkpoint(); - g_project.i18n_conditional = o->value(); + g_project.i18n_gnu_conditional = o->value(); set_modflag(1); } } -Fl_Input *i18n_file_input=(Fl_Input *)0; +Fl_Input *i18n_gnu_function_input=(Fl_Input *)0; -static void cb_i18n_file_input(Fl_Input* o, void* v) { +static void cb_i18n_gnu_function_input(Fl_Input* o, void* v) { if (v == LOAD) { - o->value(g_project.i18n_file.c_str()); + o->value(g_project.i18n_gnu_function.c_str()); } else { undo_checkpoint(); - g_project.i18n_file = o->value(); + g_project.i18n_gnu_function = o->value(); set_modflag(1); } } -Fl_Int_Input *i18n_set_input=(Fl_Int_Input *)0; +Fl_Input *i18n_gnu_static_function_input=(Fl_Input *)0; -static void cb_i18n_set_input(Fl_Int_Input* o, void* v) { +static void cb_i18n_gnu_static_function_input(Fl_Input* o, void* v) { if (v == LOAD) { - o->value(g_project.i18n_set.c_str()); + o->value(g_project.i18n_gnu_static_function.c_str()); } else { undo_checkpoint(); - g_project.i18n_set = o->value(); + g_project.i18n_gnu_static_function = o->value(); set_modflag(1); } } -Fl_Input *i18n_function_input=(Fl_Input *)0; +Fl_Group *i18n_posix_group=(Fl_Group *)0; + +static void cb_i18n_posix_group(Fl_Group* o, void* v) { + propagate_load(o, v); +} -static void cb_i18n_function_input(Fl_Input* o, void* v) { +Fl_Input *i18n_pos_include_input=(Fl_Input *)0; + +static void cb_i18n_pos_include_input(Fl_Input* o, void* v) { if (v == LOAD) { - o->value(g_project.i18n_function.c_str()); + o->value(g_project.i18n_pos_include.c_str()); } else { undo_checkpoint(); - g_project.i18n_function = o->value(); + g_project.i18n_pos_include = o->value(); set_modflag(1); } } -Fl_Input *i18n_static_function_input=(Fl_Input *)0; +Fl_Input *i18n_pos_conditional_input=(Fl_Input *)0; -static void cb_i18n_static_function_input(Fl_Input* o, void* v) { +static void cb_i18n_pos_conditional_input(Fl_Input* o, void* v) { if (v == LOAD) { - o->value(g_project.i18n_static_function.c_str()); + o->value(g_project.i18n_pos_conditional.c_str()); } else { undo_checkpoint(); - g_project.i18n_static_function = o->value(); + g_project.i18n_pos_conditional = o->value(); + set_modflag(1); + } +} + +Fl_Input *i18n_pos_file_input=(Fl_Input *)0; + +static void cb_i18n_pos_file_input(Fl_Input* o, void* v) { + if (v == LOAD) { + o->value(g_project.i18n_pos_file.c_str()); + } else { + undo_checkpoint(); + g_project.i18n_pos_file = o->value(); + set_modflag(1); + } +} + +Fl_Int_Input *i18n_pos_set_input=(Fl_Int_Input *)0; + +static void cb_i18n_pos_set_input(Fl_Int_Input* o, void* v) { + if (v == LOAD) { + o->value(g_project.i18n_pos_set.c_str()); + } else { + undo_checkpoint(); + g_project.i18n_pos_set = o->value(); set_modflag(1); } } @@ -1554,58 +1590,84 @@ ings"); i18n_type_chooser->callback((Fl_Callback*)i18n_type_cb); i18n_type_chooser->menu(menu_i18n_type_chooser); } // Fl_Choice* i18n_type_chooser - { i18n_include_input = new Fl_Input(100, 103, 220, 20, "#include:"); - i18n_include_input->tooltip("The include file for internationalization."); - i18n_include_input->box(FL_THIN_DOWN_BOX); - i18n_include_input->labelsize(11); - i18n_include_input->textfont(4); - i18n_include_input->textsize(11); - i18n_include_input->callback((Fl_Callback*)cb_i18n_include_input); - } // Fl_Input* i18n_include_input - { i18n_conditional_input = new Fl_Input(100, 128, 220, 20, "Conditional:"); - i18n_conditional_input->tooltip("only include the header file if this preprocessor macro is defined, for examp\ + { i18n_gnu_group = new Fl_Group(100, 103, 220, 95); + i18n_gnu_group->callback((Fl_Callback*)cb_i18n_gnu_group); + { i18n_gnu_include_input = new Fl_Input(100, 103, 220, 20, "#include:"); + i18n_gnu_include_input->tooltip("The include file for internationalization."); + i18n_gnu_include_input->box(FL_THIN_DOWN_BOX); + i18n_gnu_include_input->labelsize(11); + i18n_gnu_include_input->textfont(4); + i18n_gnu_include_input->textsize(11); + i18n_gnu_include_input->callback((Fl_Callback*)cb_i18n_gnu_include_input); + } // Fl_Input* i18n_gnu_include_input + { i18n_gnu_conditional_input = new Fl_Input(100, 128, 220, 20, "Conditional:"); + i18n_gnu_conditional_input->tooltip("only include the header file if this preprocessor macro is defined, for examp\ le FLTK_GETTEXT_FOUND"); - i18n_conditional_input->box(FL_THIN_DOWN_BOX); - i18n_conditional_input->labelsize(11); - i18n_conditional_input->textfont(4); - i18n_conditional_input->textsize(11); - i18n_conditional_input->callback((Fl_Callback*)cb_i18n_conditional_input); - } // Fl_Input* i18n_conditional_input - { i18n_file_input = new Fl_Input(100, 153, 220, 20, "File:"); - i18n_file_input->tooltip("The name of the message catalog."); - i18n_file_input->box(FL_THIN_DOWN_BOX); - i18n_file_input->labelsize(11); - i18n_file_input->textfont(4); - i18n_file_input->textsize(11); - i18n_file_input->callback((Fl_Callback*)cb_i18n_file_input); - } // Fl_Input* i18n_file_input - { i18n_set_input = new Fl_Int_Input(100, 178, 220, 20, "Set:"); - i18n_set_input->tooltip("The message set number."); - i18n_set_input->type(2); - i18n_set_input->box(FL_THIN_DOWN_BOX); - i18n_set_input->labelsize(11); - i18n_set_input->textfont(4); - i18n_set_input->textsize(11); - i18n_set_input->callback((Fl_Callback*)cb_i18n_set_input); - } // Fl_Int_Input* i18n_set_input - { i18n_function_input = new Fl_Input(100, 153, 220, 20, "Function:"); - i18n_function_input->tooltip("The function to call to translate labels and tooltips, usually \"gettext\" or\ + i18n_gnu_conditional_input->box(FL_THIN_DOWN_BOX); + i18n_gnu_conditional_input->labelsize(11); + i18n_gnu_conditional_input->textfont(4); + i18n_gnu_conditional_input->textsize(11); + i18n_gnu_conditional_input->callback((Fl_Callback*)cb_i18n_gnu_conditional_input); + } // Fl_Input* i18n_gnu_conditional_input + { i18n_gnu_function_input = new Fl_Input(100, 153, 220, 20, "Function:"); + i18n_gnu_function_input->tooltip("The function to call to translate labels and tooltips, usually \"gettext\" or\ \"_\""); - i18n_function_input->box(FL_THIN_DOWN_BOX); - i18n_function_input->labelsize(11); - i18n_function_input->textfont(4); - i18n_function_input->textsize(11); - i18n_function_input->callback((Fl_Callback*)cb_i18n_function_input); - } // Fl_Input* i18n_function_input - { i18n_static_function_input = new Fl_Input(100, 178, 220, 20, "Static Function:"); - i18n_static_function_input->tooltip("function to call to translate static text, The function to call to internatio\ + i18n_gnu_function_input->box(FL_THIN_DOWN_BOX); + i18n_gnu_function_input->labelsize(11); + i18n_gnu_function_input->textfont(4); + i18n_gnu_function_input->textsize(11); + i18n_gnu_function_input->callback((Fl_Callback*)cb_i18n_gnu_function_input); + } // Fl_Input* i18n_gnu_function_input + { i18n_gnu_static_function_input = new Fl_Input(100, 178, 220, 20, "Static Function:"); + i18n_gnu_static_function_input->tooltip("function to call to translate static text, The function to call to internatio\ nalize labels and tooltips, usually \"gettext_noop\" or \"N_\""); - i18n_static_function_input->box(FL_THIN_DOWN_BOX); - i18n_static_function_input->labelsize(11); - i18n_static_function_input->textfont(4); - i18n_static_function_input->textsize(11); - i18n_static_function_input->callback((Fl_Callback*)cb_i18n_static_function_input); - } // Fl_Input* i18n_static_function_input + i18n_gnu_static_function_input->box(FL_THIN_DOWN_BOX); + i18n_gnu_static_function_input->labelsize(11); + i18n_gnu_static_function_input->textfont(4); + i18n_gnu_static_function_input->textsize(11); + i18n_gnu_static_function_input->callback((Fl_Callback*)cb_i18n_gnu_static_function_input); + } // Fl_Input* i18n_gnu_static_function_input + i18n_gnu_group->end(); + } // Fl_Group* i18n_gnu_group + { i18n_posix_group = new Fl_Group(100, 103, 220, 95); + i18n_posix_group->callback((Fl_Callback*)cb_i18n_posix_group); + i18n_posix_group->hide(); + { i18n_pos_include_input = new Fl_Input(100, 103, 220, 20, "#include:"); + i18n_pos_include_input->tooltip("The include file for internationalization."); + i18n_pos_include_input->box(FL_THIN_DOWN_BOX); + i18n_pos_include_input->labelsize(11); + i18n_pos_include_input->textfont(4); + i18n_pos_include_input->textsize(11); + i18n_pos_include_input->callback((Fl_Callback*)cb_i18n_pos_include_input); + } // Fl_Input* i18n_pos_include_input + { i18n_pos_conditional_input = new Fl_Input(100, 128, 220, 20, "Conditional:"); + i18n_pos_conditional_input->tooltip("only include the header file if this preprocessor macro is defined, for examp\ +le FLTK_GETTEXT_FOUND"); + i18n_pos_conditional_input->box(FL_THIN_DOWN_BOX); + i18n_pos_conditional_input->labelsize(11); + i18n_pos_conditional_input->textfont(4); + i18n_pos_conditional_input->textsize(11); + i18n_pos_conditional_input->callback((Fl_Callback*)cb_i18n_pos_conditional_input); + } // Fl_Input* i18n_pos_conditional_input + { i18n_pos_file_input = new Fl_Input(100, 153, 220, 20, "File:"); + i18n_pos_file_input->tooltip("The name of the message catalog."); + i18n_pos_file_input->box(FL_THIN_DOWN_BOX); + i18n_pos_file_input->labelsize(11); + i18n_pos_file_input->textfont(4); + i18n_pos_file_input->textsize(11); + i18n_pos_file_input->callback((Fl_Callback*)cb_i18n_pos_file_input); + } // Fl_Input* i18n_pos_file_input + { i18n_pos_set_input = new Fl_Int_Input(100, 178, 80, 20, "Set:"); + i18n_pos_set_input->tooltip("The message set number."); + i18n_pos_set_input->type(2); + i18n_pos_set_input->box(FL_THIN_DOWN_BOX); + i18n_pos_set_input->labelsize(11); + i18n_pos_set_input->textfont(4); + i18n_pos_set_input->textsize(11); + i18n_pos_set_input->callback((Fl_Callback*)cb_i18n_pos_set_input); + } // Fl_Int_Input* i18n_pos_set_input + i18n_posix_group->end(); + } // Fl_Group* i18n_posix_group o->image()->scale(36, 24); w_settings_i18n_tab->end(); } // Fl_Group* w_settings_i18n_tab diff --git a/fluid/alignment_panel.fl b/fluid/alignment_panel.fl index 3a3b1f0d2..3bc8bded6 100644 --- a/fluid/alignment_panel.fl +++ b/fluid/alignment_panel.fl @@ -107,7 +107,7 @@ decl {void scheme_cb(Fl_Scheme_Choice *, void *);} {public local Function {make_settings_window()} {open } { Fl_Window settings_window { - label {FLUID Settings} open selected + label {FLUID Settings} open xywh {617 331 340 580} type Double align 80 code0 {o->size_range(o->w(), o->h());} non_modal visible } { @@ -116,7 +116,7 @@ Function {make_settings_window()} {open xywh {10 10 320 530} selection_color 12 labelsize 11 labelcolor 255 } { Fl_Group {} { - label General open + label General open selected image {icons/general_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 code0 {o->image()->scale(36, 24);} } { @@ -858,71 +858,103 @@ g_layout_list.update_dialogs();} xywh {0 -11 100 20} labelsize 11 } } - Fl_Input i18n_include_input { - label {\#include:} - callback {if (v == LOAD) { - o->value(g_project.i18n_include.c_str()); + Fl_Group i18n_gnu_group { + callback {propagate_load(o, v);} open + xywh {100 103 220 95} + } { + Fl_Input i18n_gnu_include_input { + label {\#include:} + callback {if (v == LOAD) { + o->value(g_project.i18n_gnu_include.c_str()); } else { undo_checkpoint(); - g_project.i18n_include = o->value(); + g_project.i18n_gnu_include = o->value(); set_modflag(1); }} - tooltip {The include file for internationalization.} xywh {100 103 220 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 - } - Fl_Input i18n_conditional_input { - label {Conditional:} - callback {if (v == LOAD) { - o->value(g_project.i18n_conditional.c_str()); + tooltip {The include file for internationalization.} xywh {100 103 220 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 + } + Fl_Input i18n_gnu_conditional_input { + label {Conditional:} + callback {if (v == LOAD) { + o->value(g_project.i18n_gnu_conditional.c_str()); } else { undo_checkpoint(); - g_project.i18n_conditional = o->value(); + g_project.i18n_gnu_conditional = o->value(); set_modflag(1); }} - tooltip {only include the header file if this preprocessor macro is defined, for example FLTK_GETTEXT_FOUND} xywh {100 128 220 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 - } - Fl_Input i18n_file_input { - label {File:} - callback {if (v == LOAD) { - o->value(g_project.i18n_file.c_str()); + tooltip {only include the header file if this preprocessor macro is defined, for example FLTK_GETTEXT_FOUND} xywh {100 128 220 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 + } + Fl_Input i18n_gnu_function_input { + label {Function:} + callback {if (v == LOAD) { + o->value(g_project.i18n_gnu_function.c_str()); } else { undo_checkpoint(); - g_project.i18n_file = o->value(); + g_project.i18n_gnu_function = o->value(); set_modflag(1); }} - tooltip {The name of the message catalog.} xywh {100 153 220 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 - } - Fl_Input i18n_set_input { - label {Set:} - callback {if (v == LOAD) { - o->value(g_project.i18n_set.c_str()); + tooltip {The function to call to translate labels and tooltips, usually "gettext" or "_"} xywh {100 153 220 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 + } + Fl_Input i18n_gnu_static_function_input { + label {Static Function:} + callback {if (v == LOAD) { + o->value(g_project.i18n_gnu_static_function.c_str()); } else { undo_checkpoint(); - g_project.i18n_set = o->value(); + g_project.i18n_gnu_static_function = o->value(); set_modflag(1); }} - tooltip {The message set number.} xywh {100 178 220 20} type Int box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 + tooltip {function to call to translate static text, The function to call to internationalize labels and tooltips, usually "gettext_noop" or "N_"} xywh {100 178 220 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 + } } - Fl_Input i18n_function_input { - label {Function:} - callback {if (v == LOAD) { - o->value(g_project.i18n_function.c_str()); + Fl_Group i18n_posix_group { + callback {propagate_load(o, v);} open + xywh {100 103 220 95} hide + } { + Fl_Input i18n_pos_include_input { + label {\#include:} + callback {if (v == LOAD) { + o->value(g_project.i18n_pos_include.c_str()); } else { undo_checkpoint(); - g_project.i18n_function = o->value(); + g_project.i18n_pos_include = o->value(); set_modflag(1); }} - tooltip {The function to call to translate labels and tooltips, usually "gettext" or "_"} xywh {100 153 220 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 - } - Fl_Input i18n_static_function_input { - label {Static Function:} - callback {if (v == LOAD) { - o->value(g_project.i18n_static_function.c_str()); + tooltip {The include file for internationalization.} xywh {100 103 220 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 + } + Fl_Input i18n_pos_conditional_input { + label {Conditional:} + callback {if (v == LOAD) { + o->value(g_project.i18n_pos_conditional.c_str()); +} else { + undo_checkpoint(); + g_project.i18n_pos_conditional = o->value(); + set_modflag(1); +}} + tooltip {only include the header file if this preprocessor macro is defined, for example FLTK_GETTEXT_FOUND} xywh {100 128 220 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 + } + Fl_Input i18n_pos_file_input { + label {File:} + callback {if (v == LOAD) { + o->value(g_project.i18n_pos_file.c_str()); } else { undo_checkpoint(); - g_project.i18n_static_function = o->value(); + g_project.i18n_pos_file = o->value(); set_modflag(1); }} - tooltip {function to call to translate static text, The function to call to internationalize labels and tooltips, usually "gettext_noop" or "N_"} xywh {100 178 220 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 + tooltip {The name of the message catalog.} xywh {100 153 220 20} box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 + } + Fl_Input i18n_pos_set_input { + label {Set:} + callback {if (v == LOAD) { + o->value(g_project.i18n_pos_set.c_str()); +} else { + undo_checkpoint(); + g_project.i18n_pos_set = o->value(); + set_modflag(1); +}} + tooltip {The message set number.} xywh {100 178 80 20} type Int box THIN_DOWN_BOX labelsize 11 textfont 4 textsize 11 + } } } } diff --git a/fluid/alignment_panel.h b/fluid/alignment_panel.h index a932b0e44..e2fd64fc5 100644 --- a/fluid/alignment_panel.h +++ b/fluid/alignment_panel.h @@ -83,13 +83,17 @@ extern Fl_Check_Button *shell_use_fl_button; extern Fl_Group *w_settings_i18n_tab; extern void i18n_type_cb(Fl_Choice*, void*); extern Fl_Choice *i18n_type_chooser; -extern Fl_Input *i18n_include_input; -extern Fl_Input *i18n_conditional_input; -extern Fl_Input *i18n_file_input; +extern Fl_Group *i18n_gnu_group; +extern Fl_Input *i18n_gnu_include_input; +extern Fl_Input *i18n_gnu_conditional_input; +extern Fl_Input *i18n_gnu_function_input; +extern Fl_Input *i18n_gnu_static_function_input; +extern Fl_Group *i18n_posix_group; +extern Fl_Input *i18n_pos_include_input; +extern Fl_Input *i18n_pos_conditional_input; +extern Fl_Input *i18n_pos_file_input; #include <FL/Fl_Int_Input.H> -extern Fl_Int_Input *i18n_set_input; -extern Fl_Input *i18n_function_input; -extern Fl_Input *i18n_static_function_input; +extern Fl_Int_Input *i18n_pos_set_input; Fl_Double_Window* make_settings_window(); extern Fl_Menu_Item menu_layout_choice[]; extern Fl_Menu_Item menu_w_layout_menu[]; diff --git a/fluid/code.cxx b/fluid/code.cxx index f9f7a62df..7310c593f 100644 --- a/fluid/code.cxx +++ b/fluid/code.cxx @@ -134,7 +134,7 @@ int write_strings(const char *sfile) { case 2 : /* POSIX catgets, put a .msg file out */ fprintf(fp, "$ generated by Fast Light User Interface Designer (fluid) version %.4f\n", FL_VERSION); - fprintf(fp, "$set %s\n", g_project.i18n_set.c_str()); + fprintf(fp, "$set %s\n", g_project.i18n_pos_set.c_str()); fputs("$quote \"\n", fp); for (i = 1, p = Fl_Type::first; p; p = p->next) { @@ -774,33 +774,40 @@ int Fd_Code_Writer::write_code(const char *s, const char *t, bool to_sourceview) write_c("#include \"%s\"\n", t); } } - if (g_project.i18n_type && g_project.i18n_include[0]) { - int conditional = (g_project.i18n_conditional[0]!=0); + Fl_String loc_include, loc_conditional; + if (g_project.i18n_type==1) { + loc_include = g_project.i18n_gnu_include; + loc_conditional = g_project.i18n_gnu_conditional; + } else { + loc_include = g_project.i18n_pos_include; + loc_conditional = g_project.i18n_pos_conditional; + } + if (g_project.i18n_type && !loc_include.empty()) { + int conditional = !loc_conditional.empty(); if (conditional) { - write_c("#ifdef %s\n", g_project.i18n_conditional.c_str()); + write_c("#ifdef %s\n", loc_conditional.c_str()); indentation++; } - if (g_project.i18n_include[0] != '<' && - g_project.i18n_include[0] != '\"') - write_c("#%sinclude \"%s\"\n", indent(), g_project.i18n_include.c_str()); + if (loc_include[0] != '<' && loc_include[0] != '\"') + write_c("#%sinclude \"%s\"\n", indent(), loc_include.c_str()); else - write_c("#%sinclude %s\n", indent(), g_project.i18n_include.c_str()); + write_c("#%sinclude %s\n", indent(), loc_include.c_str()); if (g_project.i18n_type == 2) { - if (g_project.i18n_file[0]) { - write_c("extern nl_catd %s;\n", g_project.i18n_file.c_str()); + if (!g_project.i18n_pos_file.empty()) { + write_c("extern nl_catd %s;\n", g_project.i18n_pos_file.c_str()); } else { write_c("// Initialize I18N stuff now for menus...\n"); write_c("#%sinclude <locale.h>\n", indent()); write_c("static char *_locale = setlocale(LC_MESSAGES, \"\");\n"); - write_c("static nl_catd _catalog = catopen(\"%s\", 0);\n", g_project.i18n_program.c_str()); + write_c("static nl_catd _catalog = catopen(\"%s\", 0);\n", g_project.basename.c_str()); } } if (conditional) { write_c("#else\n"); if (g_project.i18n_type == 1) { - if (g_project.i18n_function[0]) { - write_c("#%sifndef %s\n", indent(), g_project.i18n_function.c_str()); - write_c("#%sdefine %s(text) text\n", indent_plus(1), g_project.i18n_function.c_str()); + if (!g_project.i18n_gnu_function.empty()) { + write_c("#%sifndef %s\n", indent(), g_project.i18n_gnu_function.c_str()); + write_c("#%sdefine %s(text) text\n", indent_plus(1), g_project.i18n_gnu_function.c_str()); write_c("#%sendif\n", indent()); } } @@ -812,9 +819,9 @@ int Fd_Code_Writer::write_code(const char *s, const char *t, bool to_sourceview) indentation--; write_c("#endif\n"); } - if (g_project.i18n_type == 1 && g_project.i18n_static_function[0]) { - write_c("#ifndef %s\n", g_project.i18n_static_function.c_str()); - write_c("#%sdefine %s(text) text\n", indent_plus(1), g_project.i18n_static_function.c_str()); + if (g_project.i18n_type == 1 && g_project.i18n_gnu_static_function[0]) { + write_c("#ifndef %s\n", g_project.i18n_gnu_static_function.c_str()); + write_c("#%sdefine %s(text) text\n", indent_plus(1), g_project.i18n_gnu_static_function.c_str()); write_c("#endif\n"); } } diff --git a/fluid/file.cxx b/fluid/file.cxx index f0d0baeae..3e39d7407 100644 --- a/fluid/file.cxx +++ b/fluid/file.cxx @@ -272,28 +272,34 @@ void Fd_Project_Reader::read_children(Fl_Type *p, int paste, Strategy strategy, g_project.i18n_type = atoi(read_word()); goto CONTINUE; } - if (!strcmp(c,"i18n_function")) { - g_project.i18n_function = read_word(); + if (!strcmp(c,"i18n_gnu_function")) { + g_project.i18n_gnu_function = read_word(); goto CONTINUE; } - if (!strcmp(c,"i18n_static_function")) { - g_project.i18n_static_function = read_word(); + if (!strcmp(c,"i18n_gnu_static_function")) { + g_project.i18n_gnu_static_function = read_word(); goto CONTINUE; } - if (!strcmp(c,"i18n_file")) { - g_project.i18n_file = read_word(); + if (!strcmp(c,"i18n_pos_file")) { + g_project.i18n_pos_file = read_word(); goto CONTINUE; } - if (!strcmp(c,"i18n_set")) { - g_project.i18n_set = read_word(); + if (!strcmp(c,"i18n_pos_set")) { + g_project.i18n_pos_set = read_word(); goto CONTINUE; } if (!strcmp(c,"i18n_include")) { - g_project.i18n_include = read_word(); + if (g_project.i18n_type == 1) + g_project.i18n_gnu_include = read_word(); + else if (g_project.i18n_type == 2) + g_project.i18n_pos_include = read_word(); goto CONTINUE; } if (!strcmp(c,"i18n_conditional")) { - g_project.i18n_conditional = read_word(); + if (g_project.i18n_type == 1) + g_project.i18n_gnu_conditional = read_word(); + else if (g_project.i18n_type == 2) + g_project.i18n_pos_conditional = read_word(); goto CONTINUE; } if (!strcmp(c,"header_name")) { @@ -784,19 +790,21 @@ int Fd_Project_Writer::write_project(const char *filename, int selected_only) { write_string("\navoid_early_includes"); if (g_project.i18n_type) { write_string("\ni18n_type %d", g_project.i18n_type); - write_string("\ni18n_include"); write_word(g_project.i18n_include.c_str()); - write_string("\ni18n_conditional"); write_word(g_project.i18n_conditional.c_str()); switch (g_project.i18n_type) { case 1 : /* GNU gettext */ - write_string("\ni18n_function"); write_word(g_project.i18n_function.c_str()); - write_string("\ni18n_static_function"); write_word(g_project.i18n_static_function.c_str()); + write_string("\ni18n_include"); write_word(g_project.i18n_gnu_include.c_str()); + write_string("\ni18n_conditional"); write_word(g_project.i18n_gnu_conditional.c_str()); + write_string("\ni18n_gnu_function"); write_word(g_project.i18n_gnu_function.c_str()); + write_string("\ni18n_gnu_static_function"); write_word(g_project.i18n_gnu_static_function.c_str()); break; case 2 : /* POSIX catgets */ - if (g_project.i18n_file[0]) { - write_string("\ni18n_file"); - write_word(g_project.i18n_file.c_str()); + write_string("\ni18n_include"); write_word(g_project.i18n_pos_include.c_str()); + write_string("\ni18n_conditional"); write_word(g_project.i18n_pos_conditional.c_str()); + if (!g_project.i18n_pos_file.empty()) { + write_string("\ni18n_pos_file"); + write_word(g_project.i18n_pos_file.c_str()); } - write_string("\ni18n_set"); write_word(g_project.i18n_set.c_str()); + write_string("\ni18n_pos_set"); write_word(g_project.i18n_pos_set.c_str()); break; } } diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 26c78b151..06afb7997 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -191,26 +191,43 @@ Fl_String g_header_filename_arg; \todo document me */ -/** \var int Fluid_Project::i18n_include - For either type of translation, write a #include statement into the +/** \var int Fluid_Project::i18n_gnu_include + Include file for GNU i18n, writes an #include statement into the source file. - This is usually `<libintl.h>` or `"gettext.h"` for GNU gettext, or - `<nl_types.h>` for Posix catgets. + This is usually `<libintl.h>` or `"gettext.h"` for GNU gettext. Fluid accepts filenames in quotes or in \< and \>. If neither is found, double quotes are added. - If this value is emty, no include statement will be generated. + If this value is empty, no include statement will be generated. + + Saved in the .fl design file if GNU i18n is selected. + */ + +/** \var int Fluid_Project::i18n_pos_include + Include file for Posix i18n, write a #include statement into the + source file. + + This is usually `<nl_types.h>` for Posix catgets. + + Fluid accepts filenames in quotes or in \< and \>. If neither is found, + double quotes are added. + If this value is empty, no include statement will be generated. Saved in the .fl design file. */ -/** \var int Fluid_Project::i18n_conditional +/** \var int Fluid_Project::i18n_gnu_conditional Saved in the .fl design file. \todo document me */ -/** \var int Fluid_Project::i18n_function +/** \var int Fluid_Project::i18n_pos_conditional + Saved in the .fl design file. + \todo document me + */ + +/** \var int Fluid_Project::i18n_gnu_function For the gettext/intl.h options, this is the function that translates text at runtime. @@ -219,7 +236,7 @@ Fl_String g_header_filename_arg; Saved in the .fl design file. */ -/** \var int Fluid_Project::i18n_static_function +/** \var int Fluid_Project::i18n_gnu_static_function For the gettext/intl.h options, this is the function that marks the translation of text at initialisation time. @@ -231,17 +248,17 @@ Fl_String g_header_filename_arg; Saved in the .fl design file. */ -/** \var int Fluid_Project::i18n_file +/** \var int Fluid_Project::i18n_pos_file Saved in the .fl design file. \todo document me */ -/** \var int Fluid_Project::i18n_set +/** \var int Fluid_Project::i18n_pos_set Saved in the .fl design file. \todo document me */ -/** \var int Fluid_Project::i18n_program +/** \var int Fluid_Project::basename \todo document me */ @@ -273,13 +290,18 @@ Fluid_Project::~Fluid_Project() { void Fluid_Project::reset() { ::delete_all(); i18n_type = 0; - i18n_include = ""; - i18n_conditional = ""; - i18n_function = ""; - i18n_static_function = ""; - i18n_file = ""; - i18n_set = ""; - i18n_program = ""; + + i18n_gnu_include = "<libintl.h>"; + i18n_gnu_conditional = ""; + i18n_gnu_function = "gettext"; + i18n_gnu_static_function = "gettext_noop"; + + i18n_pos_include = "<nl_types.h>"; + i18n_pos_conditional = ""; + i18n_pos_file = ""; + i18n_pos_set = "1"; + + basename = ""; include_H_from_C = 1; use_FL_COMMAND = 0; utf8_in_src = 0; @@ -1019,10 +1041,10 @@ int write_code_files() { } char cname[FL_PATH_MAX+1]; char hname[FL_PATH_MAX+1]; - g_project.i18n_program = fl_filename_name(filename); - g_project.i18n_program.resize(FL_PATH_MAX); - fl_filename_setext(g_project.i18n_program.data(), FL_PATH_MAX, ""); - g_project.i18n_program.resize(g_project.i18n_program.strlen()); + g_project.basename = fl_filename_name(filename); + g_project.basename.resize(FL_PATH_MAX); + fl_filename_setext(g_project.basename.data(), FL_PATH_MAX, ""); + g_project.basename.resize(g_project.basename.strlen()); if (g_project.code_file_name[0] == '.' && strchr(g_project.code_file_name.c_str(), '/') == NULL) { strlcpy(cname, fl_filename_name(filename), FL_PATH_MAX); fl_filename_setext(cname, FL_PATH_MAX, g_project.code_file_name.c_str()); @@ -1941,10 +1963,10 @@ void update_sourceview_cb(Fl_Button*, void*) sv_strings->buffer()->loadfile(fn); sv_strings->scroll(top, 0); } else if (sv_source->visible_r() || sv_header->visible_r()) { - g_project.i18n_program = fl_filename_name(sv_source_filename); - g_project.i18n_program.resize(FL_PATH_MAX); - fl_filename_setext(g_project.i18n_program.data(), FL_PATH_MAX, ""); - g_project.i18n_program.resize(g_project.i18n_program.strlen()); + g_project.basename = fl_filename_name(sv_source_filename); + g_project.basename.resize(FL_PATH_MAX); + fl_filename_setext(g_project.basename.data(), FL_PATH_MAX, ""); + g_project.basename.resize(g_project.basename.strlen()); Fl_String code_file_name_bak = g_project.code_file_name; g_project.code_file_name = sv_source_filename; Fl_String header_file_name_bak = g_project.header_file_name; diff --git a/fluid/fluid.h b/fluid/fluid.h index 339d4fe13..b30a72c7d 100644 --- a/fluid/fluid.h +++ b/fluid/fluid.h @@ -92,13 +92,17 @@ public: void update_settings_dialog(); int i18n_type; - Fl_String i18n_include; - Fl_String i18n_conditional; - Fl_String i18n_function; - Fl_String i18n_static_function; - Fl_String i18n_file; - Fl_String i18n_set; - Fl_String i18n_program; + Fl_String i18n_gnu_include; + Fl_String i18n_gnu_conditional; + Fl_String i18n_gnu_function; + Fl_String i18n_gnu_static_function; + + Fl_String i18n_pos_include; + Fl_String i18n_pos_conditional; + Fl_String i18n_pos_file; + Fl_String i18n_pos_set; + + Fl_String basename; int include_H_from_C; int use_FL_COMMAND; int utf8_in_src; diff --git a/fluid/template_panel.fl b/fluid/template_panel.fl index 879b94b38..5cd543e77 100644 --- a/fluid/template_panel.fl +++ b/fluid/template_panel.fl @@ -2,6 +2,11 @@ version 1.0400 header_name {.h} code_name {.cxx} +snap { + ver 1 + current_suite {My Test} + current_preset 1 +} comment {// // FLUID template support for the Fast Light Tool Kit (FLTK). // @@ -32,7 +37,7 @@ decl {\#include <FL/fl_ask.H>} {private local decl {\#include <FL/fl_string_functions.h>} {private local } -decl {\#include <FL/filename.H>} {selected private local +decl {\#include <FL/filename.H>} {private local } decl {\#include "../src/flstring.h"} {private local @@ -68,8 +73,8 @@ template_preview->image(0); template_browser->deselect(); template_name->value(""); template_instance->value(""); -template_panel->hide();} - xywh {455 202 460 355} type Double hide resizable modal +template_panel->hide();} selected + xywh {478 284 460 355} type Double resizable modal visible } { Fl_Browser template_browser { label {Available Templates:} diff --git a/fluid/widget_panel.cxx b/fluid/widget_panel.cxx index 544c5f9bc..33a712396 100644 --- a/fluid/widget_panel.cxx +++ b/fluid/widget_panel.cxx @@ -150,7 +150,7 @@ Fl_Double_Window* make_widget_panel() { o->when(FL_WHEN_RELEASE | FL_WHEN_ENTER_KEY_CHANGED); Fl_Group::current()->resizable(o); } // Fl_Input* o - { Fl_Choice* o = new Fl_Choice(284, 40, 120, 20); + { Fl_Choice* o = new Fl_Choice(285, 40, 119, 20); o->tooltip("The label style for the widget."); o->box(FL_THIN_UP_BOX); o->down_box(FL_BORDER_BOX); @@ -175,7 +175,7 @@ Fl_Double_Window* make_widget_panel() { o->callback((Fl_Callback*)image_cb); Fl_Group::current()->resizable(o); } // Fl_Input* o - { Fl_Button* o = new Fl_Button(294, 65, 70, 20, "Browse..."); + { Fl_Button* o = new Fl_Button(295, 65, 69, 20, "Browse..."); o->tooltip("Click to choose the active image."); o->labelsize(11); o->callback((Fl_Callback*)image_browse_cb); @@ -208,7 +208,7 @@ mat"); o->callback((Fl_Callback*)inactive_cb); Fl_Group::current()->resizable(o); } // Fl_Input* o - { Fl_Button* o = new Fl_Button(294, 90, 70, 20, "Browse..."); + { Fl_Button* o = new Fl_Button(295, 90, 69, 20, "Browse..."); o->tooltip("Click to choose the inactive image."); o->labelsize(11); o->callback((Fl_Callback*)inactive_browse_cb); @@ -377,7 +377,7 @@ math, including the variables\ny, py, sy, cy, and i"); widget_h_input->align(Fl_Align(FL_ALIGN_TOP_LEFT)); widget_h_input->when(FL_WHEN_RELEASE); } // Fluid_Coord_Input* widget_h_input - { Fl_Choice* o = new Fl_Choice(335, 150, 65, 20, "Children:"); + { Fl_Choice* o = new Fl_Choice(335, 150, 64, 20, "Children:"); o->tooltip("When instantiating a widget class, the children can either be fixed in their \ original position, automatically be repositioned, or both repsositioned and re\ sized to fit the container."); @@ -388,7 +388,8 @@ sized to fit the container."); o->align(Fl_Align(FL_ALIGN_TOP_LEFT)); o->menu(menu_Children); } // Fl_Choice* o - { Fl_Box* o = new Fl_Box(398, 150, 1, 20); + { Fl_Box* o = new Fl_Box(399, 150, 1, 20); + o->hide(); Fl_Group::current()->resizable(o); } // Fl_Box* o o->end(); @@ -691,7 +692,7 @@ sized to fit the container."); Fl_Group::current()->resizable(o); o->menu(fontmenu); } // Fl_Choice* o - { Fl_Value_Input* o = new Fl_Value_Input(246, 40, 50, 20); + { Fl_Value_Input* o = new Fl_Value_Input(247, 40, 49, 20); o->tooltip("The size of the label text."); o->labelsize(11); o->maximum(100); @@ -782,7 +783,7 @@ sized to fit the container."); Fl_Group::current()->resizable(o); o->menu(fontmenu); } // Fl_Choice* o - { Fl_Value_Input* o = new Fl_Value_Input(246, 115, 50, 20); + { Fl_Value_Input* o = new Fl_Value_Input(247, 115, 49, 20); o->tooltip("The value text size."); o->labelsize(11); o->maximum(100); @@ -827,7 +828,7 @@ sized to fit the container."); o->callback((Fl_Callback*)subclass_cb, (void*)(4)); Fl_Group::current()->resizable(o); } // Fl_Input* o - { Fl_Choice* o = new Fl_Choice(265, 40, 140, 20); + { Fl_Choice* o = new Fl_Choice(267, 40, 138, 20); o->tooltip("The widget subtype."); o->box(FL_THIN_UP_BOX); o->down_box(FL_BORDER_BOX); @@ -866,6 +867,7 @@ sized to fit the container."); o->textsize(11); o->callback((Fl_Callback*)name_public_cb); o->when(FL_WHEN_CHANGED); + o->hide(); o->menu(menu_3); } // Fl_Choice* o o->end(); diff --git a/fluid/widget_panel.fl b/fluid/widget_panel.fl index 782a6a3a9..cef84425e 100644 --- a/fluid/widget_panel.fl +++ b/fluid/widget_panel.fl @@ -60,7 +60,7 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 15 t } Fl_Choice {} { callback labeltype_cb open - tooltip {The label style for the widget.} xywh {284 40 120 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11 + tooltip {The label style for the widget.} xywh {285 40 119 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11 code0 {extern Fl_Menu_Item labeltypemenu[];} code1 {o->menu(labeltypemenu);} } {} @@ -77,7 +77,7 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 15 t Fl_Button {} { label {Browse...} callback image_browse_cb - tooltip {Click to choose the active image.} xywh {294 65 70 20} labelsize 11 + tooltip {Click to choose the active image.} xywh {295 65 69 20} labelsize 11 } Fl_Button {} { callback compress_image_cb @@ -105,7 +105,7 @@ or compressed in the original file format} xywh {364 65 20 20} type Toggle Fl_Button {} { label {Browse...} callback inactive_browse_cb - tooltip {Click to choose the inactive image.} xywh {294 90 70 20} labelsize 11 + tooltip {Click to choose the inactive image.} xywh {295 90 69 20} labelsize 11 } Fl_Button {} { callback compress_deimage_cb @@ -327,14 +327,14 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11 Fl_Choice {} { label {Children:} callback wc_relative_cb open - tooltip {When instantiating a widget class, the children can either be fixed in their original position, automatically be repositioned, or both repsositioned and resized to fit the container.} xywh {335 150 65 20} down_box BORDER_BOX labelsize 11 align 5 textsize 11 + tooltip {When instantiating a widget class, the children can either be fixed in their original position, automatically be repositioned, or both repsositioned and resized to fit the container.} xywh {335 150 64 20} down_box BORDER_BOX labelsize 11 align 5 textsize 11 } { MenuItem {} { label Fixed xywh {0 0 31 20} labelsize 11 } MenuItem {} { - label Reposition + label Reposition selected xywh {0 0 31 20} labelsize 11 } MenuItem {} { @@ -343,7 +343,7 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11 } } Fl_Box {} { - xywh {398 150 1 20} resizable + xywh {399 150 1 20} hide resizable } } Fl_Group {} { @@ -565,7 +565,7 @@ Use Ctrl-J for newlines.} xywh {95 285 310 20} labelfont 1 labelsize 11 textsize } {} Fl_Value_Input {} { callback labelsize_cb - tooltip {The size of the label text.} xywh {246 40 50 20} labelsize 11 maximum 100 step 1 value 14 textsize 11 + tooltip {The size of the label text.} xywh {247 40 49 20} labelsize 11 maximum 100 step 1 value 14 textsize 11 } Fl_Button w_labelcolor { label {Label Color} @@ -638,7 +638,7 @@ Use Ctrl-J for newlines.} xywh {95 285 310 20} labelfont 1 labelsize 11 textsize } {} Fl_Value_Input {} { callback textsize_cb - tooltip {The value text size.} xywh {246 115 50 20} labelsize 11 maximum 100 step 1 value 14 textsize 11 + tooltip {The value text size.} xywh {247 115 49 20} labelsize 11 maximum 100 step 1 value 14 textsize 11 } Fl_Button w_textcolor { label {Text Color} @@ -673,7 +673,7 @@ Use Ctrl-J for newlines.} xywh {95 285 310 20} labelfont 1 labelsize 11 textsize } Fl_Choice {} { callback subtype_cb open - tooltip {The widget subtype.} xywh {265 40 140 20} box THIN_UP_BOX down_box BORDER_BOX labelsize 11 textsize 11 + tooltip {The widget subtype.} xywh {267 40 138 20} box THIN_UP_BOX down_box BORDER_BOX labelsize 11 textsize 11 } {} } Fl_Group {} { @@ -707,7 +707,7 @@ Use Ctrl-J for newlines.} xywh {95 285 310 20} labelfont 1 labelsize 11 textsize } Fl_Choice {} { callback name_public_cb open - tooltip {Change widget accessibility.} xywh {330 65 75 20} down_box BORDER_BOX labelsize 11 when 1 textsize 11 + tooltip {Change widget accessibility.} xywh {330 65 75 20} down_box BORDER_BOX labelsize 11 when 1 textsize 11 hide } { MenuItem {} { label local @@ -811,7 +811,7 @@ wCallback->do_callback(wCallback, v);} open } } } - Fl_Group {} {open selected + Fl_Group {} {open xywh {10 370 400 20} labelsize 11 } { Fl_Button wLiveMode { |
