summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fluid/Fl_Menu_Type.cxx14
-rw-r--r--fluid/Fl_Widget_Type.cxx12
-rw-r--r--fluid/Fl_Window_Type.cxx40
-rw-r--r--fluid/alignment_panel.cxx208
-rw-r--r--fluid/alignment_panel.fl116
-rw-r--r--fluid/alignment_panel.h16
-rw-r--r--fluid/code.cxx41
-rw-r--r--fluid/file.cxx44
-rw-r--r--fluid/fluid.cxx74
-rw-r--r--fluid/fluid.h18
-rw-r--r--fluid/template_panel.fl11
-rw-r--r--fluid/widget_panel.cxx18
-rw-r--r--fluid/widget_panel.fl22
-rw-r--r--test/CubeViewUI.fl16
-rw-r--r--test/fast_slow.fl13
-rw-r--r--test/inactive.fl23
-rw-r--r--test/keyboard_ui.fl15
-rw-r--r--test/preferences.fl59
-rw-r--r--test/radio.fl12
-rw-r--r--test/resize.fl11
-rw-r--r--test/tree.fl1362
-rw-r--r--test/valuators.fl387
22 files changed, 1353 insertions, 1179 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 {
diff --git a/test/CubeViewUI.fl b/test/CubeViewUI.fl
index 42d97463a..29730c674 100644
--- a/test/CubeViewUI.fl
+++ b/test/CubeViewUI.fl
@@ -2,13 +2,18 @@
version 1.0400
header_name {.h}
code_name {.cxx}
+snap {
+ ver 1
+ current_suite FLTK
+ current_preset 1
+}
class CubeViewUI {open
} {
Function {CubeViewUI()} {open
} {
Fl_Window mainWindow {
label CubeView open
- private xywh {428 124 415 405} type Double box UP_BOX labelsize 12 hide resizable
+ private xywh {494 321 415 405} type Double box UP_BOX labelsize 12 resizable visible
} {
Fl_Group {} {open
xywh {5 3 374 399}
@@ -42,18 +47,15 @@ cube->redraw();}
Fl_Roller hrot {
label {H Rotation}
callback {cube->h_angle(((Fl_Roller *)o)->value());
-cube->redraw();}
+cube->redraw();} selected
xywh {122 383 186 17} type Horizontal labeltype NO_LABEL labelsize 12 align 8 minimum -180 maximum 180 step 1
}
}
Fl_Group MainView {open
- xywh {46 27 333 333} resizable
+ xywh {46 27 333 333} box DOWN_BOX resizable
} {
- Fl_Box cframe {
- xywh {46 27 333 333} box DOWN_FRAME color 4 selection_color 69
- }
Fl_Box cube {
- label {This is the cube_view} selected
+ label {This is the cube_view}
xywh {48 29 329 329} align 16 resizable
code0 {\#include "CubeView.h"}
class CubeView
diff --git a/test/fast_slow.fl b/test/fast_slow.fl
index c4361604a..b78cd4b94 100644
--- a/test/fast_slow.fl
+++ b/test/fast_slow.fl
@@ -2,10 +2,15 @@
version 1.0400
header_name {.h}
code_name {.cxx}
+snap {
+ ver 1
+ current_suite FLTK
+ current_preset 1
+}
Function {} {open
} {
- Fl_Window {} {open
- xywh {397 202 318 443} type Double hide resizable
+ Fl_Window {} {open selected
+ xywh {397 202 318 443} type Double resizable visible
} {
Fl_Slider control {
label {move
@@ -17,13 +22,13 @@ if (!Fl::pushed()) slow->value(o->value());}
}
Fl_Slider fast {
label {fast
-redraw} selected
+redraw}
xywh {140 200 30 200}
code0 {o->set_output();}
}
Fl_Slider slow {
label {slow
-redraw} selected
+redraw}
xywh {190 200 30 200}
code0 {o->set_output();}
}
diff --git a/test/inactive.fl b/test/inactive.fl
index 87ef7c325..0038a4fb3 100644
--- a/test/inactive.fl
+++ b/test/inactive.fl
@@ -2,13 +2,18 @@
version 1.0400
header_name {.h}
code_name {.cxx}
+snap {
+ ver 1
+ current_suite FLTK
+ current_preset 1
+}
Function {} {open
} {
Fl_Window {} {open
- xywh {390 200 420 369} type Double hide resizable
+ xywh {462 303 420 369} type Double resizable visible
} {
Fl_Group the_group {
- label {activate()/deactivate() called on this Fl_Group} open
+ label {activate()/deactivate() called on this Fl_Group} open selected
xywh {25 25 375 295} box ENGRAVED_FRAME align 17 resizable
} {
Fl_Button {} {
@@ -25,31 +30,31 @@ Function {} {open
} {
Fl_Check_Button {} {
label red
- xywh {50 170 105 25} type Radio down_box DIAMOND_DOWN_BOX selection_color 1 labelcolor 1
+ xywh {54 172 97 20} type Radio down_box DIAMOND_DOWN_BOX selection_color 1 labelcolor 1
}
Fl_Check_Button {} {
label green
- xywh {50 190 105 25} type Radio down_box DIAMOND_DOWN_BOX selection_color 2 labelcolor 2
+ xywh {54 192 97 20} type Radio down_box DIAMOND_DOWN_BOX selection_color 2 labelcolor 2
}
Fl_Check_Button {} {
label blue
- xywh {50 210 105 25} type Radio down_box DIAMOND_DOWN_BOX selection_color 4 labelcolor 4
+ xywh {54 212 97 20} type Radio down_box DIAMOND_DOWN_BOX selection_color 4 labelcolor 4
}
Fl_Check_Button {} {
label white
- xywh {50 230 105 25} type Radio down_box DIAMOND_DOWN_BOX selection_color 55 labelcolor 55
+ xywh {54 232 97 20} type Radio down_box DIAMOND_DOWN_BOX selection_color 55 labelcolor 55
}
Fl_Check_Button {} {
label check
- xywh {50 130 105 25} down_box DOWN_BOX
+ xywh {54 132 97 20} down_box DOWN_BOX
}
Fl_Round_Button {} {
label round
- xywh {50 150 105 25} down_box ROUND_DOWN_BOX
+ xywh {54 152 97 20} down_box ROUND_DOWN_BOX
}
}
Fl_Slider {} {
- label Fl_Slider selected
+ label Fl_Slider
xywh {165 50 24 205} value 0.5
}
Fl_Input {} {
diff --git a/test/keyboard_ui.fl b/test/keyboard_ui.fl
index aca1002be..425b05f4b 100644
--- a/test/keyboard_ui.fl
+++ b/test/keyboard_ui.fl
@@ -2,12 +2,17 @@
version 1.0400
header_name {.h}
code_name {.cxx}
+snap {
+ ver 1
+ current_suite FLTK
+ current_preset 1
+}
Function {make_window()} {open
} {
- Fl_Window my_window {open selected
- xywh {461 296 495 215} type Double hide
+ Fl_Window my_window {open
+ xywh {448 339 495 215} type Double
code0 {\#include "keyboard.h"}
- class MyWindow
+ class MyWindow visible
} {
Fl_Button {} {
label {Esc }
@@ -685,8 +690,8 @@ Function {make_window()} {open
xywh {15 20 170 30} labelsize 9 align 5
}
Fl_Box {} {
- label {Fl::event_state():}
- xywh {400 15 80 40} labelsize 9 align 5
+ label {Fl::event_state():} selected
+ xywh {400 15 80 0} labelsize 9 align 5
}
Fl_Output text_output {
label {Fl::event_text():}
diff --git a/test/preferences.fl b/test/preferences.fl
index e4c339131..1f2b5d098 100644
--- a/test/preferences.fl
+++ b/test/preferences.fl
@@ -3,10 +3,15 @@ version 1.0400
i18n_type 1
i18n_include {<stdio.h>}
i18n_conditional {}
-i18n_function _
-i18n_static_function N_
+i18n_gnu_function gettext
+i18n_gnu_static_function gettext_noop
header_name {.h}
code_name {.cxx}
+snap {
+ ver 1
+ current_suite FLTK
+ current_preset 0
+}
comment {About test/preferences:
The preferences app shows two features of FLTK and FLUID.
@@ -136,28 +141,28 @@ Function {} {open return_type int
Fl_Window myWindow {
label {My Preferences}
callback closeWindowCB open
- xywh {562 185 298 347} type Double visible
+ xywh {480 345 322 355} type Double visible
} {
Fl_Button {} {
label Cancel
- callback closeWindowCB
- xywh {210 303 75 25}
+ callback closeWindowCB selected
+ xywh {118 316 90 24}
}
Fl_Button {} {
label OK
- callback saveAndCloseWindowCB selected
- xywh {125 303 75 25}
+ callback saveAndCloseWindowCB
+ xywh {217 316 90 24}
}
Fl_Group {} {
label {Get Up:} open
- xywh {20 30 115 225} box ENGRAVED_FRAME align 5
+ xywh {15 22 144 248} box ENGRAVED_FRAME align 5
} {
Fl_Input wAlarm {
label {Alarm at:}
- xywh {25 55 45 20} align 5
+ xywh {25 47 60 20} align 5
}
Fl_Choice wAmPm {open
- xywh {75 55 55 20} down_box BORDER_BOX
+ xywh {85 47 60 20} down_box BORDER_BOX
} {
MenuItem {} {
label {a.m.}
@@ -170,7 +175,7 @@ Function {} {open return_type int
}
Fl_Choice wWear {
label {Wear:} open
- xywh {25 100 105 20} down_box BORDER_BOX align 5
+ xywh {25 92 120 20} down_box BORDER_BOX align 5
} {
MenuItem {} {
label shoes
@@ -190,41 +195,41 @@ Function {} {open return_type int
}
}
Fl_Group {} {open
- xywh {35 120 98 60}
+ xywh {25 112 120 76}
} {
Fl_Round_Button wLeft {
label {left side}
- xywh {35 120 95 25} type Radio down_box ROUND_DOWN_BOX
+ xywh {35 112 100 24} type Radio down_box ROUND_DOWN_BOX
}
Fl_Round_Button wRight {
label {right side}
- xywh {35 140 95 25} type Radio down_box ROUND_DOWN_BOX
+ xywh {35 136 100 24} type Radio down_box ROUND_DOWN_BOX
}
Fl_Box {} {
label {of the bed}
- xywh {38 160 95 20}
+ xywh {35 160 100 24}
}
}
Fl_Check_Button wShower {
label shower
- xywh {25 180 105 25} down_box DOWN_BOX
+ xywh {25 188 105 24} down_box DOWN_BOX
}
Fl_Check_Button wShave {
label shave
- xywh {25 200 105 25} down_box DOWN_BOX
+ xywh {25 212 105 24} down_box DOWN_BOX
}
Fl_Check_Button wBrush {
label {brush teeth}
- xywh {25 220 105 25} down_box DOWN_BOX
+ xywh {25 236 105 24} down_box DOWN_BOX
}
}
Fl_Group {} {
label {Breakfast:} open
- xywh {160 30 115 225} box ENGRAVED_FRAME align 5
+ xywh {163 22 144 248} box ENGRAVED_FRAME align 5
} {
Fl_Choice wDrink {
label {Drink:} open
- xywh {165 50 105 20} down_box BORDER_BOX align 5
+ xywh {173 48 120 20} down_box BORDER_BOX align 5
} {
MenuItem {} {
label coffee
@@ -241,11 +246,11 @@ Function {} {open return_type int
}
Fl_Check_Button wMilk {
label {with milk}
- xywh {170 70 100 25} down_box DOWN_BOX
+ xywh {173 68 100 24} down_box DOWN_BOX
}
Fl_Choice wBread {
label {Bread:} open
- xywh {165 110 105 20} down_box BORDER_BOX align 5
+ xywh {173 116 120 20} down_box BORDER_BOX align 5
} {
MenuItem flWheatItem {
label wheat
@@ -266,25 +271,25 @@ Function {} {open return_type int
}
Fl_Check_Button wButter {
label {with butter}
- xywh {170 130 100 25} down_box DOWN_BOX
+ xywh {173 136 100 24} down_box DOWN_BOX
}
Fl_Input wEggs {
label eggs
- xywh {165 163 30 20} type Int align 8
+ xywh {173 168 30 20} type Int align 8
}
Fl_Value_Slider wMinutes {
label {min.}
- xywh {175 185 70 20} type Horizontal align 8 minimum 2 maximum 6 value 3.1
+ xywh {173 196 70 20} type Horizontal align 8 minimum 2 maximum 6 value 3.1
}
Fl_Input wPaper {
label {Newspaper:}
- xywh {165 225 105 20} align 5
+ xywh {173 239 120 20} align 5
}
}
Fl_Choice wLanguage {
label {Language:}
callback {fl_message("%s", _("Please restart the app to use your new language setting."));} open
- xywh {120 269 105 20} down_box BORDER_BOX
+ xywh {185 283 105 20} down_box BORDER_BOX
code0 {\#include <FL/fl_ask.H>}
} {
MenuItem {} {
diff --git a/test/radio.fl b/test/radio.fl
index 868edac8c..a30df6821 100644
--- a/test/radio.fl
+++ b/test/radio.fl
@@ -2,6 +2,11 @@
version 1.0400
header_name {.h}
code_name {.cxx}
+snap {
+ ver 1
+ current_suite FLTK
+ current_preset 1
+}
Function {button_cb(Fl_Button *b, void *)} {
comment {Buttons test callback} open private return_type void
} {
@@ -9,14 +14,13 @@ Function {button_cb(Fl_Button *b, void *)} {
sprintf(msg, "Label: '%s'\\nValue: %d", b->label(),b->value());
cb_info->value(msg);
cb_info->redraw();
-printf("%s\\n",msg);} {selected
- }
+printf("%s\\n",msg);} {}
}
Function {} {open
} {
- Fl_Window {} {open
- xywh {463 67 369 214} type Double hide
+ Fl_Window {} {open selected
+ xywh {470 366 369 214} type Double visible
} {
Fl_Button {} {
label {&Fl_Button A1}
diff --git a/test/resize.fl b/test/resize.fl
index 52a867c30..0b93d2c0a 100644
--- a/test/resize.fl
+++ b/test/resize.fl
@@ -2,10 +2,15 @@
version 1.0400
header_name {.h}
code_name {.cxx}
+snap {
+ ver 1
+ current_suite FLTK
+ current_preset 1
+}
Function {} {open
} {
- Fl_Window {} {open
- xywh {401 207 366 261} type Double hide resizable
+ Fl_Window {} {open selected
+ xywh {479 310 366 261} type Double resizable visible
} {
Fl_Button {} {
label {@<-}
@@ -44,7 +49,7 @@ w->size(w->w()-20, w->h()-20);}
xywh {30 190 110 40} labelfont 1 labelsize 18
}
Fl_Box {} {
- label {This is a test of program-generated resize() of a window. The window should move or resize once when each button is clicked. The program and window manager should not go into fits echoing resizes back and forth!} selected
+ label {This is a test of program-generated resize() of a window. The window should move or resize once when each button is clicked. The program and window manager should not go into fits echoing resizes back and forth!}
xywh {150 10 160 220} box BORDER_BOX align 148
}
}
diff --git a/test/tree.fl b/test/tree.fl
index ea068a5c8..02f22474e 100644
--- a/test/tree.fl
+++ b/test/tree.fl
@@ -2,6 +2,11 @@
version 1.0400
header_name {.h}
code_name {.cxx}
+snap {
+ ver 1
+ current_suite FLTK
+ current_preset 1
+}
decl {\#include <stdio.h>} {public global
}
@@ -362,7 +367,7 @@ Function {} {open
} {
Fl_Window window {
label tree open
- xywh {539 25 1045 730} type Double hide
+ xywh {456 262 1045 730} type Double visible
} {
Fl_Group tree {
label Tree
@@ -392,120 +397,120 @@ tree->clear_changed();} open
tooltip {Test tree} xywh {15 22 320 539} box DOWN_BOX color 55 selection_color 15
class Fl_Tree
} {}
- Fl_Group {} {open
- xywh {350 5 681 615}
+ Fl_Group {} {open selected
+ xywh {350 5 681 556}
code0 {o->resizable(0);}
} {
- Fl_Box {} {
+ Fl_Group {} {
label {Tree Globals}
- tooltip {These controls only affect the selected items. If no items are selected, all existing items in tree are modified.} xywh {350 23 330 389} box GTK_DOWN_BOX color 47 labelsize 12 align 1
- }
- Fl_Value_Slider margintop_slider {
- label {margintop()}
- user_data tree
- callback {int val = (int)margintop_slider->value();
+ tooltip {These controls only affect the selected items. If no items are selected, all existing items in tree are modified.} xywh {350 23 330 389} box GTK_DOWN_BOX color 47 labelsize 12
+ } {
+ Fl_Value_Slider margintop_slider {
+ label {margintop()}
+ user_data tree
+ callback {int val = (int)margintop_slider->value();
tree->margintop(val);
tree->redraw();}
- tooltip {Changes the top margin for the tree widget} xywh {505 40 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
- code0 {o->value(tree->margintop());}
- code1 {o->range(0.0, 100.0);}
- code2 {o->step(1.0);}
- }
- Fl_Value_Slider marginleft_slider {
- label {marginleft()}
- user_data tree
- callback {int val = (int)marginleft_slider->value();
+ tooltip {Changes the top margin for the tree widget} xywh {505 36 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
+ code0 {o->value(tree->margintop());}
+ code1 {o->range(0.0, 100.0);}
+ code2 {o->step(1.0);}
+ }
+ Fl_Value_Slider marginleft_slider {
+ label {marginleft()}
+ user_data tree
+ callback {int val = (int)marginleft_slider->value();
tree->marginleft(val);
tree->redraw();}
- tooltip {Changes the left margin for the tree widget} xywh {505 60 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
- code0 {o->value(tree->marginleft());}
- code1 {o->range(0.0, 200.0);}
- code2 {o->step(1.0);}
- }
- Fl_Value_Slider marginbottom_slider {
- label {marginbottom()}
- user_data tree
- callback {int val = (int)marginbottom_slider->value();
+ tooltip {Changes the left margin for the tree widget} xywh {505 56 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
+ code0 {o->value(tree->marginleft());}
+ code1 {o->range(0.0, 200.0);}
+ code2 {o->step(1.0);}
+ }
+ Fl_Value_Slider marginbottom_slider {
+ label {marginbottom()}
+ user_data tree
+ callback {int val = (int)marginbottom_slider->value();
tree->marginbottom(val);
tree->redraw();}
- tooltip {Changes the bottom margin for the tree
-Sets how far beyond bottom of tree you can scroll} xywh {505 80 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
- code0 {o->value(GetTreeMarginBottom()); // handle ABI feature}
- code1 {o->range(0.0, 275.0);}
- code2 {o->step(1.0);}
- code3 {o->do_callback();}
- }
- Fl_Value_Slider linespacing_slider {
- label {linespacing()}
- user_data tree
- callback {int val = (int)linespacing_slider->value();
+ tooltip {Changes the bottom margin for the tree
+Sets how far beyond bottom of tree you can scroll} xywh {505 76 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
+ code0 {o->value(GetTreeMarginBottom()); // handle ABI feature}
+ code1 {o->range(0.0, 275.0);}
+ code2 {o->step(1.0);}
+ code3 {o->do_callback();}
+ }
+ Fl_Value_Slider linespacing_slider {
+ label {linespacing()}
+ user_data tree
+ callback {int val = (int)linespacing_slider->value();
tree->linespacing(val);
tree->redraw();}
- tooltip {Changes the spacing between items in the tree} xywh {505 100 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
- code0 {o->value(tree->linespacing());}
- code1 {o->range(0.0, 100.0);}
- code2 {o->step(1.0);}
- }
- Fl_Value_Slider usericonmarginleft_slider {
- label {usericonmarginleft()}
- user_data tree
- callback {int val = (int)usericonmarginleft_slider->value();
+ tooltip {Changes the spacing between items in the tree} xywh {505 96 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
+ code0 {o->value(tree->linespacing());}
+ code1 {o->range(0.0, 100.0);}
+ code2 {o->step(1.0);}
+ }
+ Fl_Value_Slider usericonmarginleft_slider {
+ label {usericonmarginleft()}
+ user_data tree
+ callback {int val = (int)usericonmarginleft_slider->value();
tree->usericonmarginleft(val);
tree->redraw();}
- tooltip {Changes the left margin for the user icons (if any)} xywh {505 120 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
- code0 {o->value(tree->usericonmarginleft());}
- code1 {o->range(0.0, 100.0);}
- code2 {o->step(1.0);}
- }
- Fl_Value_Slider labelmarginleft_slider {
- label {labelmarginleft()}
- user_data tree
- callback {int val = (int)labelmarginleft_slider->value();
+ tooltip {Changes the left margin for the user icons (if any)} xywh {505 116 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
+ code0 {o->value(tree->usericonmarginleft());}
+ code1 {o->range(0.0, 100.0);}
+ code2 {o->step(1.0);}
+ }
+ Fl_Value_Slider labelmarginleft_slider {
+ label {labelmarginleft()}
+ user_data tree
+ callback {int val = (int)labelmarginleft_slider->value();
tree->labelmarginleft(val);
tree->redraw();}
- tooltip {Changes the left margin for the item label} xywh {505 140 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
- code0 {o->value(tree->labelmarginleft());}
- code1 {o->range(0.0, 100.0);}
- code2 {o->step(1.0);}
- }
- Fl_Value_Slider widgetmarginleft_slider {
- label {widgetmarginleft()}
- user_data tree
- callback {int val = (int)widgetmarginleft_slider->value();
+ tooltip {Changes the left margin for the item label} xywh {505 136 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
+ code0 {o->value(tree->labelmarginleft());}
+ code1 {o->range(0.0, 100.0);}
+ code2 {o->step(1.0);}
+ }
+ Fl_Value_Slider widgetmarginleft_slider {
+ label {widgetmarginleft()}
+ user_data tree
+ callback {int val = (int)widgetmarginleft_slider->value();
tree->widgetmarginleft(val);
tree->redraw();}
- tooltip {Changes the margin to the left of child FLTK widget()
+ tooltip {Changes the margin to the left of child FLTK widget()
"Show label + widget" must be 'on' for this to take effect, i.e.
-item_draw_mode(FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET)} xywh {505 160 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
- code0 {o->value(GetTreeWidgetMarginLeft()); // handle ABI feature}
- code1 {o->range(0.0, 100.0);}
- code2 {o->step(1.0);}
- code3 {o->do_callback();}
- }
- Fl_Value_Slider openchild_marginbottom_slider {
- label {openchild_marginbottom()}
- user_data tree
- callback {int val = (int)openchild_marginbottom_slider->value();
+item_draw_mode(FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET)} xywh {505 156 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
+ code0 {o->value(GetTreeWidgetMarginLeft()); // handle ABI feature}
+ code1 {o->range(0.0, 100.0);}
+ code2 {o->step(1.0);}
+ code3 {o->do_callback();}
+ }
+ Fl_Value_Slider openchild_marginbottom_slider {
+ label {openchild_marginbottom()}
+ user_data tree
+ callback {int val = (int)openchild_marginbottom_slider->value();
tree->openchild_marginbottom(val);
tree->redraw();}
- tooltip {Changes the vertical space below an open child tree} xywh {505 180 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
- code0 {o->value(tree->openchild_marginbottom());}
- code1 {o->range(0.0, 100.0);}
- code2 {o->step(1.0);}
- }
- Fl_Value_Slider connectorwidth_slider {
- label {connectorwidth()}
- user_data tree
- callback {tree->connectorwidth((int)connectorwidth_slider->value());}
- tooltip {Tests Fl_Tree::connectorwidth()} xywh {505 199 155 16} type Horizontal color 46 selection_color 1 labelsize 11 align 4 textsize 9
- code0 {o->value(tree->connectorwidth());}
- code1 {o->range(1.0, 100.0);}
- code2 {o->step(1.0);}
- code3 {o->color(46); o->selection_color(FL_RED);}
- }
- Fl_Choice collapseicons_chooser {
- label {Collapse icons}
- callback {static const char *L_open_xpm[] = {
+ tooltip {Changes the vertical space below an open child tree} xywh {505 176 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
+ code0 {o->value(tree->openchild_marginbottom());}
+ code1 {o->range(0.0, 100.0);}
+ code2 {o->step(1.0);}
+ }
+ Fl_Value_Slider connectorwidth_slider {
+ label {connectorwidth()}
+ user_data tree
+ callback {tree->connectorwidth((int)connectorwidth_slider->value());}
+ tooltip {Tests Fl_Tree::connectorwidth()} xywh {505 195 155 16} type Horizontal color 46 selection_color 1 labelsize 11 align 4 textsize 9
+ code0 {o->value(tree->connectorwidth());}
+ code1 {o->range(1.0, 100.0);}
+ code2 {o->step(1.0);}
+ code3 {o->color(46); o->selection_color(FL_RED);}
+ }
+ Fl_Choice collapseicons_chooser {
+ label {Collapse icons}
+ callback {static const char *L_open_xpm[] = {
\#ifdef __APPLE__
"11 11 3 1",
". c \#fefefe",
@@ -592,268 +597,270 @@ switch ( collapseicons_chooser->value() ) {
tree->showcollapse(0);
break;
}}
- tooltip {Tests Fl_Tree::openicon(), Fl_Tree::closeicon() and Fl_Tree::showcollapse().} xywh {520 225 140 21} down_box BORDER_BOX labelsize 12 textsize 11
- } {
- MenuItem {} {
- label Default
- xywh {10 10 36 21} labelsize 12
- }
- MenuItem {} {
- label Custom
- xywh {20 20 36 21} labelsize 12
- }
- MenuItem {} {
- label Off
- xywh {30 30 36 21} labelsize 12
- }
- }
- Fl_Choice connectorstyle_chooser {
- label {Line style}
- callback {// CHANGE COLLAPSESTYLE
+ tooltip {Tests Fl_Tree::openicon(), Fl_Tree::closeicon() and Fl_Tree::showcollapse().} xywh {520 221 140 21} down_box BORDER_BOX labelsize 12 textsize 11
+ } {
+ MenuItem {} {
+ label Default
+ xywh {10 10 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Custom
+ xywh {20 20 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Off
+ xywh {30 30 36 21} labelsize 12
+ }
+ }
+ Fl_Choice connectorstyle_chooser {
+ label {Line style}
+ callback {// CHANGE COLLAPSESTYLE
switch ( connectorstyle_chooser->value() ) {
case 0: tree->connectorstyle(FL_TREE_CONNECTOR_NONE); break;
case 1: tree->connectorstyle(FL_TREE_CONNECTOR_DOTTED); break;
case 2: tree->connectorstyle(FL_TREE_CONNECTOR_SOLID); break;
}}
- tooltip {Tests Fl_Tree::connectorstyle() bit flags} xywh {520 249 140 21} down_box BORDER_BOX labelsize 12 textsize 11
- code0 {switch (tree->connectorstyle()) { case FL_TREE_CONNECTOR_NONE: connectorstyle_chooser->value(0); break; case FL_TREE_CONNECTOR_DOTTED: connectorstyle_chooser->value(1); break; case FL_TREE_CONNECTOR_SOLID: connectorstyle_chooser->value(2); break; }}
- } {
- MenuItem {} {
- label None
- xywh {40 40 36 21} labelsize 12
- }
- MenuItem {} {
- label Dotted
- xywh {20 20 36 21} labelsize 12
- }
- MenuItem {} {
- label Solid
- xywh {30 30 36 21} labelsize 12
- }
- }
- Fl_Choice selectmode_chooser {
- label {Selection Mode}
- callback {// Set selection mode
+ tooltip {Tests Fl_Tree::connectorstyle() bit flags} xywh {520 245 140 21} down_box BORDER_BOX labelsize 12 textsize 11
+ code0 {switch (tree->connectorstyle()) { case FL_TREE_CONNECTOR_NONE: connectorstyle_chooser->value(0); break; case FL_TREE_CONNECTOR_DOTTED: connectorstyle_chooser->value(1); break; case FL_TREE_CONNECTOR_SOLID: connectorstyle_chooser->value(2); break; }}
+ } {
+ MenuItem {} {
+ label None
+ xywh {40 40 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Dotted
+ xywh {20 20 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Solid
+ xywh {30 30 36 21} labelsize 12
+ }
+ }
+ Fl_Choice selectmode_chooser {
+ label {Selection Mode}
+ callback {// Set selection mode
switch ( selectmode_chooser->value() ) {
case 0: tree->selectmode(FL_TREE_SELECT_NONE); break; // None
case 1: tree->selectmode(FL_TREE_SELECT_SINGLE); break; // Single
case 2: tree->selectmode(FL_TREE_SELECT_MULTI); break; // Multi
case 3: tree->selectmode(FL_TREE_SELECT_SINGLE_DRAGGABLE); break; // Single draggable
default: tree->selectmode(FL_TREE_SELECT_SINGLE); break; // Single
-}} open
- tooltip {Tests Fl_Tree::selectmode()
+}}
+ tooltip {Tests Fl_Tree::selectmode()
Sets how Fl_Tree handles mouse selection of tree items.
NONE -- Not selectable by keyboard/mouse
SINGLE -- Only one item at a time selectable by keyboard/mouse
MULTI -- Multiple items selectable
- SINGLE+DRAG -- Lets user drag items to different position in tree} xywh {520 273 140 21} down_box BORDER_BOX labelsize 12 textsize 11
- code0 {selectmode_chooser->value(2);}
- code1 {cb_selectmode_chooser(selectmode_chooser, (void*)0);}
- } {
- MenuItem {} {
- label None
- xywh {40 40 36 21} labelsize 12
- }
- MenuItem {} {
- label Single
- xywh {50 50 36 21} labelsize 12
- }
- MenuItem {} {
- label Multi
- xywh {60 60 36 21} labelsize 12
- }
- MenuItem {} {
- label {Single + drag}
- xywh {70 70 36 21} labelsize 12
- }
- }
- Fl_Choice reselectmode_chooser {
- label {Item Reselect Mode}
- callback {// Set reselection mode
+ SINGLE+DRAG -- Lets user drag items to different position in tree} xywh {520 269 140 21} down_box BORDER_BOX labelsize 12 textsize 11
+ code0 {selectmode_chooser->value(2);}
+ code1 {cb_selectmode_chooser(selectmode_chooser, (void*)0);}
+ } {
+ MenuItem {} {
+ label None
+ xywh {40 40 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Single
+ xywh {50 50 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Multi
+ xywh {60 60 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Single + drag}
+ xywh {70 70 36 21} labelsize 12
+ }
+ }
+ Fl_Choice reselectmode_chooser {
+ label {Item Reselect Mode}
+ callback {// Set reselection mode
switch ( reselectmode_chooser->value() ) {
case 0: tree->item_reselect_mode(FL_TREE_SELECTABLE_ONCE); break;
case 1: tree->item_reselect_mode(FL_TREE_SELECTABLE_ALWAYS); break;
}}
- tooltip {Tests Fl_Tree::item_reselect_mode().
+ tooltip {Tests Fl_Tree::item_reselect_mode().
Enables 'reselect' events.
These happen when someone selects an item already selected
-(mouse drags or multi-clicks)} xywh {520 297 140 21} down_box BORDER_BOX labelsize 12 textsize 11
- code0 {reselectmode_chooser->value(1);}
- code1 {reselectmode_chooser->do_callback();}
- } {
- MenuItem {} {
- label {Selectable Once}
- xywh {50 50 36 21} labelsize 12
- }
- MenuItem {} {
- label {Selectable Always}
- xywh {60 60 36 21} labelsize 12
- }
- }
- Fl_Choice whenmode_chooser {
- label When
- callback {// Set when mode
+(mouse drags or multi-clicks)} xywh {520 293 140 21} down_box BORDER_BOX labelsize 12 textsize 11
+ code0 {reselectmode_chooser->value(1);}
+ code1 {reselectmode_chooser->do_callback();}
+ } {
+ MenuItem {} {
+ label {Selectable Once}
+ xywh {50 50 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Selectable Always}
+ xywh {60 60 36 21} labelsize 12
+ }
+ }
+ Fl_Choice whenmode_chooser {
+ label When
+ callback {// Set when mode
switch ( whenmode_chooser->value() ) {
case 0: tree->when(FL_WHEN_RELEASE); break;
case 1: tree->when(FL_WHEN_CHANGED); break;
case 2: tree->when(FL_WHEN_NEVER); break;
default: tree->when(FL_WHEN_RELEASE); break;
}}
- tooltip {Sets when() the tree's callback is invoked} xywh {520 323 140 21} down_box BORDER_BOX labelsize 12 textsize 11
- code0 {whenmode_chooser->value(1);}
- code1 {cb_whenmode_chooser(whenmode_chooser, (void*)0);}
- } {
- MenuItem {} {
- label Changed
- xywh {50 50 36 21} labelsize 12
- }
- MenuItem {} {
- label Released
- xywh {60 60 36 21} labelsize 12
- }
- MenuItem {} {
- label Never
- xywh {70 70 36 21} labelsize 12
- }
- }
- Fl_Check_Button usericon_radio {
- label {Enable user icons?}
- user_data tree
- callback {AssignUserIcons();}
- tooltip {Tests Fl_Tree_Item::usericon()} xywh {485 355 20 16} down_box DOWN_BOX labelsize 11 align 7
- code0 {usericon_radio->value(1);}
- }
- Fl_Check_Button showroot_radio {
- label {Show root?}
- user_data tree
- callback {int onoff = showroot_radio->value();
+ tooltip {Sets when() the tree's callback is invoked} xywh {520 319 140 21} down_box BORDER_BOX labelsize 12 textsize 11
+ code0 {whenmode_chooser->value(1);}
+ code1 {cb_whenmode_chooser(whenmode_chooser, (void*)0);}
+ } {
+ MenuItem {} {
+ label Changed
+ xywh {50 50 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Released
+ xywh {60 60 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Never
+ xywh {70 70 36 21} labelsize 12
+ }
+ }
+ Fl_Check_Button usericon_radio {
+ label {Enable user icons?}
+ user_data tree
+ callback {AssignUserIcons();}
+ tooltip {Tests Fl_Tree_Item::usericon()} xywh {485 351 20 16} down_box DOWN_BOX labelsize 11 align 7
+ code0 {usericon_radio->value(1);}
+ }
+ Fl_Check_Button showroot_radio {
+ label {Show root?}
+ user_data tree
+ callback {int onoff = showroot_radio->value();
tree->showroot(onoff);}
- tooltip {Tests tree->showroot();} xywh {485 372 20 16} down_box DOWN_BOX labelsize 11 align 7
- code0 {int onoff = tree->showroot(); showroot_radio->value(onoff);}
- }
- Fl_Check_Button visiblefocus_checkbox {
- label {Visible focus?}
- user_data tree
- callback {int onoff = visiblefocus_checkbox->value();
+ tooltip {Tests tree->showroot();} xywh {485 368 20 16} down_box DOWN_BOX labelsize 11 align 7
+ code0 {int onoff = tree->showroot(); showroot_radio->value(onoff);}
+ }
+ Fl_Check_Button visiblefocus_checkbox {
+ label {Visible focus?}
+ user_data tree
+ callback {int onoff = visiblefocus_checkbox->value();
tree->visible_focus(onoff);}
- tooltip {Toggles the tree's visible_focus() box} xywh {485 389 20 16} down_box DOWN_BOX labelsize 11 align 7
- code0 {int onoff = tree->visible_focus(); visiblefocus_checkbox->value(onoff);}
- }
- Fl_Check_Button labelandwidget_radio {
- label {Show label + widget}
- callback {int flags = tree->item_draw_mode();
+ tooltip {Toggles the tree's visible_focus() box} xywh {485 385 20 16} down_box DOWN_BOX labelsize 11 align 7
+ code0 {int onoff = tree->visible_focus(); visiblefocus_checkbox->value(onoff);}
+ }
+ Fl_Check_Button labelandwidget_radio {
+ label {Show label + widget}
+ callback {int flags = tree->item_draw_mode();
if ( labelandwidget_radio->value() )
{ flags |= FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET; }
else
{ flags &= ~FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET; }
tree->item_draw_mode(flags);
tree->redraw();}
- tooltip {Tests Fl_Tree::item_draw_mode(FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET)
+ tooltip {Tests Fl_Tree::item_draw_mode(FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET)
Enables both label and widget() for display.
When enabled, widget should appear to the right of the item's label.
-By default, the widget() is shown in place of the item's label.} xywh {645 355 20 16} down_box DOWN_BOX labelsize 11 align 7
- code0 {labelandwidget_radio->value(0);}
- code1 {labelandwidget_radio->do_callback();}
- }
- Fl_Check_Button itemheightfromwidget_radio {
- label {Item h() from widget}
- callback {int flags = tree->item_draw_mode();
+By default, the widget() is shown in place of the item's label.} xywh {645 351 20 16} down_box DOWN_BOX labelsize 11 align 7
+ code0 {labelandwidget_radio->value(0);}
+ code1 {labelandwidget_radio->do_callback();}
+ }
+ Fl_Check_Button itemheightfromwidget_radio {
+ label {Item h() from widget}
+ callback {int flags = tree->item_draw_mode();
if ( itemheightfromwidget_radio->value() )
{ flags |= FL_TREE_ITEM_HEIGHT_FROM_WIDGET; }
else
{ flags &= ~FL_TREE_ITEM_HEIGHT_FROM_WIDGET; }
tree->item_draw_mode(flags);
tree->redraw();}
- tooltip {Tests Fl_Tree::item_draw_mode(FL_TREE_ITEM_HEIGHT_FROM_WIDGET)
+ tooltip {Tests Fl_Tree::item_draw_mode(FL_TREE_ITEM_HEIGHT_FROM_WIDGET)
If enabled, item's height will track the widget()'s height.
-When enabled, click 'ccc button' or 'D1/D2' buttons to test.} xywh {645 372 20 16} down_box DOWN_BOX labelsize 11 align 7
- code0 {itemheightfromwidget_radio->value(0);}
- code1 {itemheightfromwidget_radio->do_callback();}
- }
- Fl_Check_Button globalvisiblefocus_checkbox {
- label {Global visible focus?}
- user_data tree
- callback {int onoff = globalvisiblefocus_checkbox->value();
+When enabled, click 'ccc button' or 'D1/D2' buttons to test.} xywh {645 368 20 16} down_box DOWN_BOX labelsize 11 align 7
+ code0 {itemheightfromwidget_radio->value(0);}
+ code1 {itemheightfromwidget_radio->do_callback();}
+ }
+ Fl_Check_Button globalvisiblefocus_checkbox {
+ label {Global visible focus?}
+ user_data tree
+ callback {int onoff = globalvisiblefocus_checkbox->value();
Fl::visible_focus(onoff);}
- tooltip {Toggles the global Fl::visible_focus()} xywh {645 389 20 16} down_box DOWN_BOX labelsize 11 align 7
- code0 {int onoff = Fl::visible_focus(); globalvisiblefocus_checkbox->value(onoff);}
+ tooltip {Toggles the global Fl::visible_focus()} xywh {645 385 20 16} down_box DOWN_BOX labelsize 11 align 7
+ code0 {int onoff = Fl::visible_focus(); globalvisiblefocus_checkbox->value(onoff);}
+ }
}
- Fl_Box {} {
+ Fl_Group {} {
label {Test Operations}
- tooltip {These controls only affect the defaults for new items that are created. These test the Fl_Tree_Prefs methods.} xywh {350 435 330 125} box GTK_DOWN_BOX color 47 labelsize 12 align 1
- }
- Fl_Box showitem_box {
- label {show_item()
+ tooltip {These controls only affect the defaults for new items that are created. These test the Fl_Tree_Prefs methods.} xywh {350 435 330 125} box GTK_DOWN_BOX color 47 labelsize 12
+ } {
+ Fl_Group showitem_box {
+ label {show_item()
}
- xywh {370 460 70 82} box GTK_DOWN_BOX labelsize 11 align 1
- }
- Fl_Button {} {
- label Show
- callback {Fl_Tree_Item *item = tree->next_selected_item();
+ xywh {370 460 70 82} box GTK_DOWN_BOX labelsize 11
+ } {
+ Fl_Button {} {
+ label Show
+ callback {Fl_Tree_Item *item = tree->next_selected_item();
tree->show_item(item);}
- tooltip {Tests show_item() with no position specified.
+ tooltip {Tests show_item() with no position specified.
Makes the selected item visible IF it is off-screen.
No change made if it is not off-screen.} xywh {385 469 40 17} labelsize 11
- }
- Fl_Button {} {
- label Top
- callback {Fl_Tree_Item *item = tree->next_selected_item();
+ }
+ Fl_Button {} {
+ label Top
+ callback {Fl_Tree_Item *item = tree->next_selected_item();
tree->show_item_top(item);}
- tooltip {Test show_item_top().
+ tooltip {Test show_item_top().
Scrolls selected item to the top of the display
(only works if scrollbar showing)
To use:
1) open '500 items'
2) select item 0010
3) Hit Top/Mid/Bot} xywh {385 486 40 16} labelsize 11
- }
- Fl_Button {} {
- label Mid
- callback {Fl_Tree_Item *item = tree->next_selected_item();
+ }
+ Fl_Button {} {
+ label Mid
+ callback {Fl_Tree_Item *item = tree->next_selected_item();
tree->show_item_middle(item);}
- tooltip {Tests show_item_middle().
+ tooltip {Tests show_item_middle().
Scrolls the selected item to the middle of the display
To use:
1) open '500 items'
2) select 'item 0010'
3) Hit Top/Mid/Bot} xywh {385 502 40 16} labelsize 11
- }
- Fl_Button {} {
- label Bot
- callback {Fl_Tree_Item *item = tree->next_selected_item();
+ }
+ Fl_Button {} {
+ label Bot
+ callback {Fl_Tree_Item *item = tree->next_selected_item();
tree->show_item_bottom(item);}
- tooltip {Tests show_item_bottom().
+ tooltip {Tests show_item_bottom().
Scrolls the selected item to the bottom of the display
To use:
1) open '500 items'
2) select 'item 0010'
3) Hit Top/Mid/Bot} xywh {385 518 40 16} labelsize 11
- }
- Fl_Button openall_button {
- label {Open All}
- callback {for ( Fl_Tree_Item *item = tree->first();
+ }
+ }
+ Fl_Button openall_button {
+ label {Open All}
+ callback {for ( Fl_Tree_Item *item = tree->first();
item;
item = tree->next(item) ) {
if ( item->has_children() )
item->open();
}
tree->redraw();}
- tooltip {Opens all nodes that have children} xywh {470 451 95 16} labelsize 9
- }
- Fl_Button loaddb_button {
- label {Load Database...}
- callback {const char *filename = fl_file_chooser("Select a Preferences style Database", "Preferences(*.prefs)", 0L);
+ tooltip {Opens all nodes that have children} xywh {470 451 95 16} labelsize 9
+ }
+ Fl_Button loaddb_button {
+ label {Load Database...}
+ callback {const char *filename = fl_file_chooser("Select a Preferences style Database", "Preferences(*.prefs)", 0L);
if (filename) {
tree->clear();
Fl_Preferences prefs(filename, 0L, 0L);
tree->load(prefs);
tree->redraw();
}}
- tooltip {Load the contents of an Fl_Preferences database into the tree view} xywh {470 471 95 16} labelsize 9
- }
- Fl_Button insertabove_button {
- label {Insert Above}
- callback {Fl_Tree_Item *item=tree->first();
+ tooltip {Load the contents of an Fl_Preferences database into the tree view} xywh {470 471 95 16} labelsize 9
+ }
+ Fl_Button insertabove_button {
+ label {Insert Above}
+ callback {Fl_Tree_Item *item=tree->first();
while (item) {
if ( item->is_selected() ) {
tree->insert_above(item, "AaaAaa");
@@ -864,16 +871,16 @@ while (item) {
}
tree->redraw();}
- tooltip {Inserts three items above the selected items} xywh {470 491 95 16} labelsize 9
- }
- Fl_Button rebuildtree_button {
- label {Rebuild Tree}
- callback {RebuildTree();}
- tooltip {Rebuilds the tree with defaults} xywh {470 511 95 16} labelsize 9
- }
- Fl_Button showpathname_button {
- label {Show Pathname}
- callback {Fl_Tree_Item *item = tree->first_selected_item();
+ tooltip {Inserts three items above the selected items} xywh {470 491 95 16} labelsize 9
+ }
+ Fl_Button rebuildtree_button {
+ label {Rebuild Tree}
+ callback {RebuildTree();}
+ tooltip {Rebuilds the tree with defaults} xywh {470 511 95 16} labelsize 9
+ }
+ Fl_Button showpathname_button {
+ label {Show Pathname}
+ callback {Fl_Tree_Item *item = tree->first_selected_item();
if ( !item ) { fl_message("No item was selected"); return; }
char pathname[256];
@@ -882,31 +889,31 @@ switch ( tree->item_pathname(pathname, sizeof(pathname), item) ) {
case -1: fl_message("item_pathname() returned -1 (NOT FOUND)"); break;
case -2: fl_message("item_pathname() returned -2 (STRING TOO LONG)"); break;
}}
- tooltip {Tests Fl_Tree::item_pathname()
+ tooltip {Tests Fl_Tree::item_pathname()
Show the pathname for the selected item.} xywh {470 531 95 16} labelsize 9
- }
- Fl_Button closeall_button {
- label {Close All}
- callback {for ( Fl_Tree_Item *item = tree->first();
+ }
+ Fl_Button closeall_button {
+ label {Close All}
+ callback {for ( Fl_Tree_Item *item = tree->first();
item;
item = tree->next(item) ) {
if ( !item->is_root() && item->has_children() )
item->close();
}
tree->redraw();}
- tooltip {Closes all nodes that have children
+ tooltip {Closes all nodes that have children
(doesn't affect 'root')} xywh {570 451 95 16} labelsize 9
- }
- Fl_Button clearall_button {
- label {Clear All}
- callback {tree->clear();
+ }
+ Fl_Button clearall_button {
+ label {Clear All}
+ callback {tree->clear();
tree->redraw();}
- tooltip {Tests Fl_Tree::clear().
+ tooltip {Tests Fl_Tree::clear().
Clears all items} xywh {570 471 95 16} labelsize 9
- }
- Fl_Button testcallbackflag_button {
- label {Test Callback Flag}
- callback {Fl_Tree_Item *root = tree->root();
+ }
+ Fl_Button testcallbackflag_button {
+ label {Test Callback Flag}
+ callback {Fl_Tree_Item *root = tree->root();
tty->printf("--- Checking docallback off\\n");
if (!root) return;
@@ -967,18 +974,18 @@ G_cb_counter = 0; tree->select("ROOT"); if ( !G_cb_counter ) fl_alert("FAIL
tree->deselect("ROOT"); // leave deselected
fl_alert("TEST COMPLETED\\n If you didn't see any error dialogs, test PASSED.");}
- tooltip {Test the 'docallback' argument can disable callbacks.} xywh {570 491 95 16} labelsize 9
- }
- Fl_Button testrootshowself_button {
- label {Root Show Self}
- callback {Fl_Tree_Item *root = tree->root();
+ tooltip {Test the 'docallback' argument can disable callbacks.} xywh {570 491 95 16} labelsize 9
+ }
+ Fl_Button testrootshowself_button {
+ label {Root Show Self}
+ callback {Fl_Tree_Item *root = tree->root();
tty->printf("--- Show Tree\\n");
if (root) root->show_self();}
- tooltip {Test the root->'show_self() method to show the entire tree on stdout} xywh {570 511 95 16} labelsize 9
- }
- Fl_Button add20k_button {
- label {Add 20,000}
- callback {static int item_id = 501;
+ tooltip {Test the root->'show_self() method to show the entire tree on stdout} xywh {570 511 95 16} labelsize 9
+ }
+ Fl_Button add20k_button {
+ label {Add 20,000}
+ callback {static int item_id = 501;
Fl_Tree_Item *item=tree->first();
while (item) {
if ( item->is_selected() ) {
@@ -995,15 +1002,16 @@ while (item) {
item = item->next();
}
tree->redraw();}
- tooltip {Adds 20,000 items to the selected item's parent} xywh {570 531 95 16} labelsize 9
+ tooltip {Adds 20,000 items to the selected item's parent} xywh {570 531 95 16} labelsize 9
+ }
}
- Fl_Box {} {
+ Fl_Group {} {
label {Selected Items}
- tooltip {These controls only affect the selected items. If no items are selected, all existing items in tree are modified.} xywh {696 23 335 246} box GTK_DOWN_BOX color 47 labelsize 12 align 1
- }
- Fl_Choice selected_labelfont_choice {
- label {Fl_Tree_Item::labelfont()}
- callback {// Find first item in tree
+ tooltip {These controls only affect the selected items. If no items are selected, all existing items in tree are modified.} xywh {696 23 335 246} box GTK_DOWN_BOX color 47 labelsize 12
+ } {
+ Fl_Choice selected_labelfont_choice {
+ label {Fl_Tree_Item::labelfont()}
+ callback {// Find first item in tree
Fl_Tree_Item *item = tree->first();
if ( !item ) return;
@@ -1027,80 +1035,80 @@ if ( ! count ) {
}
tree->redraw();}
- tooltip {Tests Fl_Tree_Item::labelfont();
+ tooltip {Tests Fl_Tree_Item::labelfont();
Changes the font for the selected items's labels.
If none selected, all are changed.} xywh {863 31 140 21} down_box BORDER_BOX labelsize 11 textsize 11
- code0 {o->value((int)tree->item_labelfont()); // get tree's current font, assign to chooser}
- } {
- MenuItem {} {
- label Helvetica
- xywh {30 30 36 21} labelsize 12
- }
- MenuItem {} {
- label {Helvetica Bold}
- xywh {40 40 36 21} labelsize 12
- }
- MenuItem {} {
- label {Helvetica Italic}
- xywh {55 55 36 21} labelsize 12
- }
- MenuItem {} {
- label {Helvetica Bold Italic}
- xywh {60 60 36 21} labelsize 12
- }
- MenuItem {} {
- label Courier
- xywh {70 70 36 21} labelsize 12
- }
- MenuItem {} {
- label {Courier Bold}
- xywh {80 80 36 21} labelsize 12
- }
- MenuItem {} {
- label {Courier Italic}
- xywh {65 65 36 21} labelsize 12
- }
- MenuItem {} {
- label {Courier Bold Italic}
- xywh {70 70 36 21} labelsize 12
- }
- MenuItem {} {
- label Times
- xywh {80 80 36 21} labelsize 12
- }
- MenuItem {} {
- label {Times Bold}
- xywh {90 90 36 21} labelsize 12
- }
- MenuItem {} {
- label {Times Italic}
- xywh {75 75 36 21} labelsize 12
- }
- MenuItem {} {
- label {Times Bold Italic}
- xywh {80 80 36 21} labelsize 12
- }
- MenuItem {} {
- label Symbol
- xywh {90 90 36 21} labelsize 12
- }
- MenuItem {} {
- label Screen
- xywh {100 100 36 21} labelsize 12
- }
- MenuItem {} {
- label {Screen bold}
- xywh {85 85 36 21} labelsize 12
- }
- MenuItem {} {
- label {Zapf Dingbats}
- xywh {90 90 36 21} labelsize 12
- }
- }
- Fl_Value_Slider selected_labelsize_slider {
- label {Fl_Tree_Item::labelsize()}
- user_data tree
- callback {int size = (int)selected_labelsize_slider->value();
+ code0 {o->value((int)tree->item_labelfont()); // get tree's current font, assign to chooser}
+ } {
+ MenuItem {} {
+ label Helvetica
+ xywh {30 30 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Helvetica Bold}
+ xywh {40 40 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Helvetica Italic}
+ xywh {55 55 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Helvetica Bold Italic}
+ xywh {60 60 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Courier
+ xywh {70 70 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Courier Bold}
+ xywh {80 80 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Courier Italic}
+ xywh {65 65 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Courier Bold Italic}
+ xywh {70 70 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Times
+ xywh {80 80 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Times Bold}
+ xywh {90 90 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Times Italic}
+ xywh {75 75 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Times Bold Italic}
+ xywh {80 80 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Symbol
+ xywh {90 90 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Screen
+ xywh {100 100 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Screen bold}
+ xywh {85 85 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Zapf Dingbats}
+ xywh {90 90 36 21} labelsize 12
+ }
+ }
+ Fl_Value_Slider selected_labelsize_slider {
+ label {Fl_Tree_Item::labelsize()}
+ user_data tree
+ callback {int size = (int)selected_labelsize_slider->value();
// DO SELECTED ITEMS
int count = 0;
@@ -1120,17 +1128,17 @@ if ( ! count ) {
}
tree->redraw();}
- tooltip {Tests Fl_Tree_Item::labelsize();
+ tooltip {Tests Fl_Tree_Item::labelsize();
Changes the font size of the selected items's labels.
If none selected, all are changed.} xywh {863 55 140 16} type Horizontal color 46 selection_color 1 labelsize 11 align 4 textsize 12
- code0 {o->value(tree->item_labelsize());}
- code1 {o->range(5.0, 200.0);}
- code2 {o->step(1.0);}
- code3 {o->color(46); o->selection_color(FL_RED);}
- }
- Fl_Button all_labelfgcolor_button {
- label {Fl_Tree_Item::labelfgcolor()}
- callback {// Get first item's color
+ code0 {o->value(tree->item_labelsize());}
+ code1 {o->range(5.0, 200.0);}
+ code2 {o->step(1.0);}
+ code3 {o->color(46); o->selection_color(FL_RED);}
+ }
+ Fl_Button all_labelfgcolor_button {
+ label {Fl_Tree_Item::labelfgcolor()}
+ callback {// Get first item's color
Fl_Color val = GetSelectedItemFGColor(); // Get color of first selected item
if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
all_labelfgcolor_button->color(val); // update modified color to button
@@ -1153,12 +1161,12 @@ if ( ! count ) {
}
tree->redraw();}
- tooltip {Sets the Fl_Tree_Item::labelfgcolor() for the selected items. If none selected, all are changed.} xywh {863 81 16 16} box DOWN_BOX labelsize 11 align 7
- code0 {o->color(GetSelectedItemFGColor());}
- }
- Fl_Button all_labelbgcolor_button {
- label {Fl_Tree_Item::labelbgcolor()}
- callback {// Get first item's color
+ tooltip {Sets the Fl_Tree_Item::labelfgcolor() for the selected items. If none selected, all are changed.} xywh {863 81 16 16} box DOWN_BOX labelsize 11 align 7
+ code0 {o->color(GetSelectedItemFGColor());}
+ }
+ Fl_Button all_labelbgcolor_button {
+ label {Fl_Tree_Item::labelbgcolor()}
+ callback {// Get first item's color
Fl_Color val = GetSelectedItemBGColor(); // Get color of first selected item
if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
all_labelbgcolor_button->color(val); // update modified color to button
@@ -1181,12 +1189,12 @@ if ( ! count ) {
}
tree->redraw();}
- tooltip {Sets the Fl_Tree_Item::labelbgcolor() for the selected items. If none selected, all are changed.} xywh {863 99 16 16} box DOWN_BOX labelsize 11 align 7
- code0 {o->color(GetSelectedItemBGColor());}
- }
- Fl_Light_Button deactivate_items_toggle {
- label { Deactivate Items}
- callback {int onoff = deactivate_items_toggle->value() ? 0 : 1;
+ tooltip {Sets the Fl_Tree_Item::labelbgcolor() for the selected items. If none selected, all are changed.} xywh {863 99 16 16} box DOWN_BOX labelsize 11 align 7
+ code0 {o->color(GetSelectedItemBGColor());}
+ }
+ Fl_Light_Button deactivate_items_toggle {
+ label { Deactivate Items}
+ callback {int onoff = deactivate_items_toggle->value() ? 0 : 1;
Fl_Tree_Item *item;
int count = 0;
@@ -1204,20 +1212,20 @@ if ( count == 0 ) {
}
tree->redraw();}
- tooltip {Toggle the deactivation state of the selected items.
+ tooltip {Toggle the deactivation state of the selected items.
If none are selected, all are set.} xywh {758 134 100 16} selection_color 1 labelsize 9
- }
- Fl_Light_Button deactivate_tree_toggle {
- label { Deactivate Tree}
- callback {if ( deactivate_tree_toggle->value() )
+ }
+ Fl_Light_Button deactivate_tree_toggle {
+ label { Deactivate Tree}
+ callback {if ( deactivate_tree_toggle->value() )
tree->deactivate();
else
tree->activate();}
- tooltip {Deactivates the entire tree widget} xywh {758 154 100 16} selection_color 1 labelsize 9
- }
- Fl_Light_Button bold_toggle {
- label { Bold Font}
- callback {int face = bold_toggle->value() ? FL_HELVETICA_BOLD : FL_HELVETICA;
+ tooltip {Deactivates the entire tree widget} xywh {758 154 100 16} selection_color 1 labelsize 9
+ }
+ Fl_Light_Button bold_toggle {
+ label { Bold Font}
+ callback {int face = bold_toggle->value() ? FL_HELVETICA_BOLD : FL_HELVETICA;
// DO SELECTED ITEMS
int count = 0;
@@ -1237,22 +1245,22 @@ if ( ! count ) {
}
tree->redraw();}
- tooltip {Toggles bold font for selected items
+ tooltip {Toggles bold font for selected items
If nothing selected, all are changed} xywh {758 174 100 16} selection_color 1 labelsize 9
- }
- Fl_Button showselected_button {
- label {Show Selected}
- callback {tty->printf("--- SELECTED ITEMS\\n");
+ }
+ Fl_Button showselected_button {
+ label {Show Selected}
+ callback {tty->printf("--- SELECTED ITEMS\\n");
for ( Fl_Tree_Item *item = tree->first_selected_item();
item;
item = tree->next_selected_item(item) ) {
tty->printf("\\t%s\\n", item->label() ? item->label() : "???");
}}
- tooltip {Clears the selected items} xywh {864 134 95 16} labelsize 9
- }
- Fl_Button clearselected_button {
- label {Remove Selected}
- callback {Fl_Tree_Item *item=tree->first();
+ tooltip {Clears the selected items} xywh {864 134 95 16} labelsize 9
+ }
+ Fl_Button clearselected_button {
+ label {Remove Selected}
+ callback {Fl_Tree_Item *item=tree->first();
while (item) {
if ( item->is_selected() ) {
if ( tree->remove(item) == -1 ) break;
@@ -1263,11 +1271,11 @@ while (item) {
}
tree->redraw();}
- tooltip {Removes the selected items} xywh {864 154 95 16} labelsize 9
- }
- Fl_Button swapselected_button {
- label {Swap Selected}
- callback {Fl_Tree_Item *item=tree->first();
+ tooltip {Removes the selected items} xywh {864 154 95 16} labelsize 9
+ }
+ Fl_Button swapselected_button {
+ label {Swap Selected}
+ callback {Fl_Tree_Item *item=tree->first();
Fl_Tree_Item *a = 0, *b = 0;
while (item) {
if ( item->is_selected() ) {
@@ -1292,24 +1300,24 @@ if ( pa != pb ) {
}
pa->swap_children(a,b);
tree->redraw();}
- tooltip {Tests the Fl_Tree_Item::swap_children() method
+ tooltip {Tests the Fl_Tree_Item::swap_children() method
Swaps two selected items (items must be siblings)} xywh {864 174 95 16} labelsize 9
- }
- Fl_Button selectall_button {
- label {Select All}
- callback {tree->select_all(0);
+ }
+ Fl_Button selectall_button {
+ label {Select All}
+ callback {tree->select_all(0);
tree->redraw();}
- tooltip {Selects all items in the tree} xywh {714 199 95 16} labelsize 9
- }
- Fl_Button deselectall_button {
- label {Deselect All}
- callback {tree->deselect_all(0);
+ tooltip {Selects all items in the tree} xywh {714 199 95 16} labelsize 9
+ }
+ Fl_Button deselectall_button {
+ label {Deselect All}
+ callback {tree->deselect_all(0);
tree->redraw();}
- tooltip {Deselects all items in the tree} xywh {714 219 95 16} labelsize 9
- }
- Fl_Button nextselected_button {
- label {next_selected()}
- callback {tty->printf("--- TEST next_selected():\\n");
+ tooltip {Deselects all items in the tree} xywh {714 219 95 16} labelsize 9
+ }
+ Fl_Button nextselected_button {
+ label {next_selected()}
+ callback {tty->printf("--- TEST next_selected():\\n");
tty->printf(" // Walk down the tree (forwards)\\n");
for ( Fl_Tree_Item *i=tree->first_selected_item(); i; i=tree->next_selected_item(i, FL_Down) ) {
tty->printf(" Selected item: %s\\n", i->label()?i->label():"<nolabel>");
@@ -1319,11 +1327,11 @@ tty->printf(" // Walk up the tree (backwards)\\n");
for ( Fl_Tree_Item *i=tree->last_selected_item(); i; i=tree->next_selected_item(i, FL_Up) ) {
tty->printf(" Selected item: %s\\n", i->label()?i->label():"<nolabel>");
}}
- tooltip {Tests the Fl_Tree::next_selected() function} xywh {713 239 95 16} labelsize 9
- }
- Fl_Light_Button bbbselect_toggle {
- label { Select Bbb}
- callback {// Toggle select of just the Bbb item (not children)
+ tooltip {Tests the Fl_Tree::next_selected() function} xywh {713 239 95 16} labelsize 9
+ }
+ Fl_Light_Button bbbselect_toggle {
+ label { Select Bbb}
+ callback {// Toggle select of just the Bbb item (not children)
Fl_Tree_Item *bbb = tree->find_item("/Bbb");
if ( !bbb) {
fl_alert("FAIL: Couldn't find item '/Bbb'???");
@@ -1332,12 +1340,12 @@ if ( !bbb) {
int onoff = bbbselect_toggle->value();
if ( onoff ) tree->select(bbb); // select /Bbb
else tree->deselect(bbb); // deselect /Bbb}
- tooltip {Toggle selection of just the /Bbb item
+ tooltip {Toggle selection of just the /Bbb item
(Not children)} xywh {814 199 95 16} selection_color 1 labelsize 9
- }
- Fl_Light_Button bbbselect2_toggle {
- label { Select Bbb+}
- callback {// Toggle select of just the Bbb item and its immediate children
+ }
+ Fl_Light_Button bbbselect2_toggle {
+ label { Select Bbb+}
+ callback {// Toggle select of just the Bbb item and its immediate children
Fl_Tree_Item *bbb = tree->find_item("/Bbb");
if ( !bbb) {
fl_alert("FAIL: Couldn't find item '/Bbb'???");
@@ -1346,11 +1354,11 @@ if ( !bbb) {
int onoff = bbbselect2_toggle->value();
if ( onoff ) tree->select_all(bbb); // select /Bbb and its children
else tree->deselect_all(bbb); // deselect /Bbb and its children}
- tooltip {Toggle selection of the /Bbb item and its children} xywh {814 219 95 16} selection_color 1 labelsize 9
- }
- Fl_Light_Button bbbchild02select_toggle {
- label { Toggle child-02}
- callback {// Toggle select of just the /Bbb/child-02 item
+ tooltip {Toggle selection of the /Bbb item and its children} xywh {814 219 95 16} selection_color 1 labelsize 9
+ }
+ Fl_Light_Button bbbchild02select_toggle {
+ label { Toggle child-02}
+ callback {// Toggle select of just the /Bbb/child-02 item
const char *pathname = "/Bbb/child-02";
int onoff = bbbchild02select_toggle->value();
int err = 0;
@@ -1361,11 +1369,11 @@ if ( err == -1 ) {
fl_alert("FAIL: Couldn't find item '%s'",pathname);
return;
}}
- tooltip {Toggle the single item "/Bbb/child-02" using the item's "pathname".} xywh {814 239 95 16} selection_color 1 labelsize 9
- }
- Fl_Light_Button rootselect_toggle {
- label {Select ROOT}
- callback {// Toggle select of ROOT item and its children
+ tooltip {Toggle the single item "/Bbb/child-02" using the item's "pathname".} xywh {814 239 95 16} selection_color 1 labelsize 9
+ }
+ Fl_Light_Button rootselect_toggle {
+ label {Select ROOT}
+ callback {// Toggle select of ROOT item and its children
Fl_Tree_Item *item = tree->find_item("/ROOT");
if ( !item) {
fl_alert("FAIL: Couldn't find item '/ROOT'???");
@@ -1374,11 +1382,11 @@ if ( !item) {
int onoff = rootselect_toggle->value();
if ( onoff ) tree->select(item); // select /ROOT and its children
else tree->deselect(item); // deselect /ROOT and its children}
- tooltip {Toggle selection of the ROOT item} xywh {914 199 100 16} selection_color 1 labelsize 9
- }
- Fl_Light_Button rootselect2_toggle {
- label {Select ROOT+}
- callback {// Toggle select of ROOT item and its children
+ tooltip {Toggle selection of the ROOT item} xywh {914 199 100 16} selection_color 1 labelsize 9
+ }
+ Fl_Light_Button rootselect2_toggle {
+ label {Select ROOT+}
+ callback {// Toggle select of ROOT item and its children
Fl_Tree_Item *item = tree->find_item("/ROOT");
if ( !item) {
fl_alert("FAIL: Couldn't find item '/ROOT'???");
@@ -1387,243 +1395,245 @@ if ( !item) {
int onoff = rootselect2_toggle->value();
if ( onoff ) tree->select_all(item); // select /ROOT and its children
else tree->deselect_all(item); // deselect /ROOT and its children}
- tooltip {Toggle selection of the ROOT item and all children} xywh {914 219 100 16} selection_color 1 labelsize 9
+ tooltip {Toggle selection of the ROOT item and all children} xywh {914 219 100 16} selection_color 1 labelsize 9
+ }
}
- Fl_Box {} {
+ Fl_Group {} {
label {Tree Fonts + Colors}
- tooltip {These controls only affect the selected items. If no items are selected, all existing items in tree are modified.} xywh {695 298 335 186} box GTK_DOWN_BOX color 47 labelsize 12 align 1
- }
- Fl_Choice labelfont_choice {
- label {labelfont()}
- callback {Fl_Font val = (Fl_Font)labelfont_choice->value();
+ tooltip {These controls only affect the selected items. If no items are selected, all existing items in tree are modified.} xywh {695 298 335 186} box GTK_DOWN_BOX color 47 labelsize 12
+ } {
+ Fl_Choice labelfont_choice {
+ label {labelfont()}
+ callback {Fl_Font val = (Fl_Font)labelfont_choice->value();
tree->labelfont(val);
window->redraw();}
- tooltip {Sets the default font used for new items created. Does NOT affect existing items.} xywh {848 314 140 21} down_box BORDER_BOX labelsize 12 textsize 12
- code0 {o->value((int)tree->labelfont()); // get tree's current font, assign to chooser}
- } {
- MenuItem {} {
- label Helvetica
- xywh {35 35 36 21} labelsize 12
- }
- MenuItem {} {
- label {Helvetica Bold}
- xywh {45 45 36 21} labelsize 12
- }
- MenuItem {} {
- label {Helvetica Italic}
- xywh {60 60 36 21} labelsize 12
- }
- MenuItem {} {
- label {Helvetica Bold Italic}
- xywh {65 65 36 21} labelsize 12
- }
- MenuItem {} {
- label Courier
- xywh {75 75 36 21} labelsize 12
- }
- MenuItem {} {
- label {Courier Bold}
- xywh {85 85 36 21} labelsize 12
- }
- MenuItem {} {
- label {Courier Italic}
- xywh {70 70 36 21} labelsize 12
- }
- MenuItem {} {
- label {Courier Bold Italic}
- xywh {75 75 36 21} labelsize 12
- }
- MenuItem {} {
- label Times
- xywh {85 85 36 21} labelsize 12
- }
- MenuItem {} {
- label {Times Bold}
- xywh {95 95 36 21} labelsize 12
- }
- MenuItem {} {
- label {Times Italic}
- xywh {80 80 36 21} labelsize 12
- }
- MenuItem {} {
- label {Times Bold Italic}
- xywh {85 85 36 21} labelsize 12
- }
- MenuItem {} {
- label Symbol
- xywh {95 95 36 21} labelsize 12
- }
- MenuItem {} {
- label Screen
- xywh {105 105 36 21} labelsize 12
- }
- MenuItem {} {
- label {Screen bold}
- xywh {90 90 36 21} labelsize 12
- }
- MenuItem {} {
- label {Zapf Dingbats}
- xywh {95 95 36 21} labelsize 12
- }
- }
- Fl_Value_Slider labelsize_slider {
- label {labelsize()}
- user_data tree
- callback {tree->labelsize((int)labelsize_slider->value());
+ tooltip {Sets the default font used for new items created. Does NOT affect existing items.} xywh {848 314 140 21} down_box BORDER_BOX labelsize 12 textsize 12
+ code0 {o->value((int)tree->labelfont()); // get tree's current font, assign to chooser}
+ } {
+ MenuItem {} {
+ label Helvetica
+ xywh {35 35 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Helvetica Bold}
+ xywh {45 45 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Helvetica Italic}
+ xywh {60 60 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Helvetica Bold Italic}
+ xywh {65 65 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Courier
+ xywh {75 75 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Courier Bold}
+ xywh {85 85 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Courier Italic}
+ xywh {70 70 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Courier Bold Italic}
+ xywh {75 75 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Times
+ xywh {85 85 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Times Bold}
+ xywh {95 95 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Times Italic}
+ xywh {80 80 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Times Bold Italic}
+ xywh {85 85 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Symbol
+ xywh {95 95 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Screen
+ xywh {105 105 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Screen bold}
+ xywh {90 90 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Zapf Dingbats}
+ xywh {95 95 36 21} labelsize 12
+ }
+ }
+ Fl_Value_Slider labelsize_slider {
+ label {labelsize()}
+ user_data tree
+ callback {tree->labelsize((int)labelsize_slider->value());
window->redraw();}
- tooltip {Sets the font size for the tree's label().
+ tooltip {Sets the font size for the tree's label().
This is also the font size that will be used to draw the items IF their size hasn't been set with Fl_Tree_Item::labelsize() or Fl_Tree::item_labelsize()} xywh {848 338 140 16} type Horizontal color 46 selection_color 1 labelsize 12 align 4 textsize 12
- code0 {o->value((int)tree->labelsize());}
- code1 {o->range(1.0, 50.0);}
- code2 {o->step(1.0);}
- code3 {o->color(46); o->selection_color(FL_RED);}
- }
- Fl_Choice item_labelfont_choice {
- label {Item_labelfont()}
- callback {Fl_Font val = (Fl_Font)item_labelfont_choice->value();
+ code0 {o->value((int)tree->labelsize());}
+ code1 {o->range(1.0, 50.0);}
+ code2 {o->step(1.0);}
+ code3 {o->color(46); o->selection_color(FL_RED);}
+ }
+ Fl_Choice item_labelfont_choice {
+ label {Item_labelfont()}
+ callback {Fl_Font val = (Fl_Font)item_labelfont_choice->value();
tree->item_labelfont(val);
tree->redraw();}
- tooltip {Sets the default font used for new items created.
+ tooltip {Sets the default font used for new items created.
.Also affects any items whose font has NOT specifically been set with item->labelfont().} xywh {848 358 140 21} down_box BORDER_BOX labelsize 12 textsize 12
- code0 {o->value((int)tree->item_labelfont());}
- } {
- MenuItem {} {
- label Helvetica
- xywh {25 25 36 21} labelsize 12
- }
- MenuItem {} {
- label {Helvetica Bold}
- xywh {35 35 36 21} labelsize 12
- }
- MenuItem {} {
- label {Helvetica Italic}
- xywh {50 50 36 21} labelsize 12
- }
- MenuItem {} {
- label {Helvetica Bold Italic}
- xywh {55 55 36 21} labelsize 12
- }
- MenuItem {} {
- label Courier
- xywh {65 65 36 21} labelsize 12
- }
- MenuItem {} {
- label {Courier Bold}
- xywh {75 75 36 21} labelsize 12
- }
- MenuItem {} {
- label {Courier Italic}
- xywh {60 60 36 21} labelsize 12
- }
- MenuItem {} {
- label {Courier Bold Italic}
- xywh {65 65 36 21} labelsize 12
- }
- MenuItem {} {
- label Times
- xywh {75 75 36 21} labelsize 12
- }
- MenuItem {} {
- label {Times Bold}
- xywh {85 85 36 21} labelsize 12
- }
- MenuItem {} {
- label {Times Italic}
- xywh {70 70 36 21} labelsize 12
- }
- MenuItem {} {
- label {Times Bold Italic}
- xywh {75 75 36 21} labelsize 12
- }
- MenuItem {} {
- label Symbol
- xywh {85 85 36 21} labelsize 12
- }
- MenuItem {} {
- label Screen
- xywh {95 95 36 21} labelsize 12
- }
- MenuItem {} {
- label {Screen bold}
- xywh {80 80 36 21} labelsize 12
- }
- MenuItem {} {
- label {Zapf Dingbats}
- xywh {85 85 36 21} labelsize 12
- }
- }
- Fl_Value_Slider item_labelsize_slider {
- label {item_labelsize()}
- user_data tree
- callback {tree->item_labelsize((int)item_labelsize_slider->value());
+ code0 {o->value((int)tree->item_labelfont());}
+ } {
+ MenuItem {} {
+ label Helvetica
+ xywh {25 25 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Helvetica Bold}
+ xywh {35 35 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Helvetica Italic}
+ xywh {50 50 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Helvetica Bold Italic}
+ xywh {55 55 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Courier
+ xywh {65 65 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Courier Bold}
+ xywh {75 75 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Courier Italic}
+ xywh {60 60 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Courier Bold Italic}
+ xywh {65 65 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Times
+ xywh {75 75 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Times Bold}
+ xywh {85 85 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Times Italic}
+ xywh {70 70 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Times Bold Italic}
+ xywh {75 75 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Symbol
+ xywh {85 85 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label Screen
+ xywh {95 95 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Screen bold}
+ xywh {80 80 36 21} labelsize 12
+ }
+ MenuItem {} {
+ label {Zapf Dingbats}
+ xywh {85 85 36 21} labelsize 12
+ }
+ }
+ Fl_Value_Slider item_labelsize_slider {
+ label {item_labelsize()}
+ user_data tree
+ callback {tree->item_labelsize((int)item_labelsize_slider->value());
tree->redraw();}
- tooltip {Sets the default font size used for new items created.
+ tooltip {Sets the default font size used for new items created.
.Also affects any items whose font size has NOT specifically been set with item->labelsize().} xywh {848 383 140 16} type Horizontal color 46 selection_color 1 labelsize 12 align 4 textsize 12
- code0 {o->value((int)tree->item_labelsize());}
- code1 {o->range(1.0, 50.0);}
- code2 {o->step(1.0);}
- code3 {o->color(46); o->selection_color(FL_RED);}
- }
- Fl_Button labelcolor_button {
- label {labelcolor()}
- callback {Fl_Color val = tree->labelcolor();
+ code0 {o->value((int)tree->item_labelsize());}
+ code1 {o->range(1.0, 50.0);}
+ code2 {o->step(1.0);}
+ code3 {o->color(46); o->selection_color(FL_RED);}
+ }
+ Fl_Button labelcolor_button {
+ label {labelcolor()}
+ callback {Fl_Color val = tree->labelcolor();
if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
labelcolor_button->color(val); // update modified color to button
tree->labelcolor(val);
window->redraw(); // affects window (tree's label is outside tree's area)}
- tooltip {Changes Fl_Tree::labelcolor().
+ tooltip {Changes Fl_Tree::labelcolor().
This affects the text color of the widget's label.} xywh {813 414 16 16} box DOWN_BOX labelsize 11 align 7
- code0 {o->color(tree->labelcolor());}
- }
- Fl_Button color_button {
- label {color()}
- callback {Fl_Color val = tree->color();
+ code0 {o->color(tree->labelcolor());}
+ }
+ Fl_Button color_button {
+ label {color()}
+ callback {Fl_Color val = tree->color();
if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
color_button->color(val); // update modified color to button
tree->color(val);
UpdateColorChips();
tree->redraw();}
- tooltip {Changes Fl_Tree::color().
+ tooltip {Changes Fl_Tree::color().
This affects the background color of the widget. It also affects the bg color of newly created items *if* Fl_Tree::item_labelbgcolor() hasn't been changed.} xywh {813 433 16 16} box DOWN_BOX labelsize 11 align 7
- code0 {o->color(tree->color());}
- }
- Fl_Button selection_color_button {
- label {selection_color()}
- callback {Fl_Color val = tree->selection_color();
+ code0 {o->color(tree->color());}
+ }
+ Fl_Button selection_color_button {
+ label {selection_color()}
+ callback {Fl_Color val = tree->selection_color();
if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
selection_color_button->color(val); // update modified color to button
tree->selection_color(val);
tree->redraw();}
- tooltip {Sets the Fl_Tree::selection_color().
+ tooltip {Sets the Fl_Tree::selection_color().
This affects the item's colors when they're selected.} xywh {813 452 16 16} box DOWN_BOX labelsize 11 align 7
- code0 {o->color(tree->selection_color());}
- }
- Fl_Button item_labelfgcolor_button {
- label {item_labelfgcolor()}
- callback {Fl_Color val = tree->item_labelfgcolor();
+ code0 {o->color(tree->selection_color());}
+ }
+ Fl_Button item_labelfgcolor_button {
+ label {item_labelfgcolor()}
+ callback {Fl_Color val = tree->item_labelfgcolor();
if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
tree->item_labelfgcolor(val); // apply modified color to tree
item_labelfgcolor_button->color(val); // update modified color to button
tree->redraw();}
- tooltip {Sets the default label fg color for newly created items.} xywh {973 414 16 16} box DOWN_BOX labelsize 12 align 7
- code0 {o->color(tree->item_labelfgcolor());}
- }
- Fl_Button item_labelbgcolor_button {
- label {item_labelbgcolor()}
- callback {Fl_Color val = tree->item_labelbgcolor();
+ tooltip {Sets the default label fg color for newly created items.} xywh {973 414 16 16} box DOWN_BOX labelsize 12 align 7
+ code0 {o->color(tree->item_labelfgcolor());}
+ }
+ Fl_Button item_labelbgcolor_button {
+ label {item_labelbgcolor()}
+ callback {Fl_Color val = tree->item_labelbgcolor();
if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit 'Cancel')
tree->item_labelbgcolor(val); // apply modified color to tree
item_labelbgcolor_button->color(val); // update modified color to button
tree->redraw();}
- tooltip {Sets the default label bg color for newly created items. When set, this overrides the default behavior of using Fl_Tree::color().} xywh {973 433 16 16} box DOWN_BOX labelsize 12 align 7
- code0 {item_labelbgcolor_button->color(tree->item_labelbgcolor());}
- }
- Fl_Button x_item_labelbgcolor_button {
- label X
- callback {tree->item_labelbgcolor(0xffffffff);
+ tooltip {Sets the default label bg color for newly created items. When set, this overrides the default behavior of using Fl_Tree::color().} xywh {973 433 16 16} box DOWN_BOX labelsize 12 align 7
+ code0 {item_labelbgcolor_button->color(tree->item_labelbgcolor());}
+ }
+ Fl_Button x_item_labelbgcolor_button {
+ label X
+ callback {tree->item_labelbgcolor(0xffffffff);
UpdateColorChips();
tree->redraw();}
- tooltip {Make the bgcolor 'transparent' (0xffffffff)} xywh {993 433 16 16} labelsize 10 align 16
+ tooltip {Make the bgcolor 'transparent' (0xffffffff)} xywh {993 433 16 16} labelsize 10 align 16
+ }
}
Fl_Value_Slider tree_scrollbar_size_slider {
label {Fl_Tree::scrollbar_size()}
@@ -1742,7 +1752,7 @@ helpwin->show();}
xywh {0 263 15 14}
}
Fl_Box tty {
- label label selected
+ label label
xywh {16 571 1014 149} box DOWN_BOX color 0
class Fl_Simple_Terminal
}
diff --git a/test/valuators.fl b/test/valuators.fl
index 488350705..c9b8bce58 100644
--- a/test/valuators.fl
+++ b/test/valuators.fl
@@ -2,6 +2,11 @@
version 1.0400
header_name {.h}
code_name {.cxx}
+snap {
+ ver 1
+ current_suite FLTK
+ current_preset 0
+}
decl {\#include <FL/Fl_Simple_Terminal.H>} {public global
}
@@ -9,219 +14,229 @@ Function {} {open
} {
Fl_Window {} {
label {Valuator classes, showing values for type()} open
- xywh {400 199 580 640} type Double color 43 selection_color 43 hide
- code0 {\#include <stdio.h>}
+ xywh {409 271 580 640} type Double color 43 selection_color 43
+ code0 {\#include <stdio.h>} visible
} {
- Fl_Box {} {
+ Fl_Group {} {
label Fl_Slider
xywh {10 10 280 210} box ENGRAVED_BOX labelfont 1 align 17
- }
- Fl_Slider {} {
- label 0
- user_data {"Fl_Slider FL_VERT_SLIDER"}
- callback callback
- tooltip {Vertical Slider} xywh {30 45 20 145} selection_color 1 labelsize 8 align 1
- }
- Fl_Slider {} {
- label FL_VERT_FILL_SLIDER
- user_data {"Fl_Slider FL_VERT_FILL_SLIDER"}
- callback callback
- xywh {70 55 20 145} type {Vert Fill} selection_color 1 labelsize 8
- }
- Fl_Slider {} {
- label FL_VERT_NICE_SLIDER
- user_data {"Fl_Slider FL_VERT_NICE_SLIDER"}
- callback callback
- xywh {105 45 20 145} type {Vert Knob} box FLAT_BOX color 10 selection_color 1 labelsize 8 align 1
- }
- Fl_Slider {} {
- label FL_HORIZONTAL
- user_data {"Fl_Slider FL_HORIZONTAL"}
- callback callback selected
- xywh {140 80 130 20} type Horizontal selection_color 1 labelsize 8
- }
- Fl_Slider {} {
- label FL_HOR_FILL_SLIDER
- user_data {"Fl_Slider FL_HOR_FILL_SLIDER"}
- callback callback
- xywh {140 120 130 20} type {Horz Fill} selection_color 1 labelsize 8
- }
- Fl_Slider {} {
- label FL_HOR_NICE_SLIDER
- user_data {"Fl_Slider FL_HOR_NICE_SLIDER"}
- callback callback
- xywh {140 160 130 20} type {Horz Knob} box FLAT_BOX color 10 selection_color 1 labelsize 8
- }
- Fl_Box {} {
+ } {
+ Fl_Slider {} {
+ label 0
+ user_data {"Fl_Slider FL_VERT_SLIDER"}
+ callback callback
+ tooltip {Vertical Slider} xywh {30 45 20 145} selection_color 1 labelsize 8 align 1
+ }
+ Fl_Slider {} {
+ label FL_VERT_FILL_SLIDER
+ user_data {"Fl_Slider FL_VERT_FILL_SLIDER"}
+ callback callback
+ xywh {70 55 20 145} type {Vert Fill} selection_color 1 labelsize 8
+ }
+ Fl_Slider {} {
+ label FL_VERT_NICE_SLIDER
+ user_data {"Fl_Slider FL_VERT_NICE_SLIDER"}
+ callback callback
+ xywh {105 45 20 145} type {Vert Knob} box FLAT_BOX color 10 selection_color 1 labelsize 8 align 1
+ }
+ Fl_Slider {} {
+ label FL_HORIZONTAL
+ user_data {"Fl_Slider FL_HORIZONTAL"}
+ callback callback
+ xywh {140 80 130 20} type Horizontal selection_color 1 labelsize 8
+ }
+ Fl_Slider {} {
+ label FL_HOR_FILL_SLIDER
+ user_data {"Fl_Slider FL_HOR_FILL_SLIDER"}
+ callback callback
+ xywh {140 120 130 20} type {Horz Fill} selection_color 1 labelsize 8
+ }
+ Fl_Slider {} {
+ label FL_HOR_NICE_SLIDER
+ user_data {"Fl_Slider FL_HOR_NICE_SLIDER"}
+ callback callback
+ xywh {140 160 130 20} type {Horz Knob} box FLAT_BOX color 10 selection_color 1 labelsize 8
+ }
+ }
+ Fl_Group {} {
label Fl_Value_Slider
xywh {10 230 280 210} box ENGRAVED_BOX labelfont 1 align 17
- }
- Fl_Value_Slider {} {
- label 0
- user_data {"FL_VERT_SLIDER"}
- callback callback
- tooltip {Value Slider} xywh {30 260 30 145} selection_color 1 labelsize 8 align 1
- }
- Fl_Value_Slider {} {
- label FL_VERT_FILL_SLIDER
- user_data {"Fl_Value_Slider FL_VERT_FILL_SLIDER"}
- callback callback
- xywh {70 275 30 140} type {Vert Fill} selection_color 1 labelsize 8
- }
- Fl_Value_Slider {} {
- label FL_VERT_NICE_SLIDER
- user_data {"Fl_Value_Slider FL_VERT_NICE_SLIDER"}
- callback callback
- xywh {110 260 20 145} type {Vert Knob} box FLAT_BOX color 10 selection_color 1 labelsize 8 align 1
- }
- Fl_Value_Slider {} {
- label FL_HOR_SLIDER
- user_data {"Fl_Value_Slider FL_HOR_SLIDER"}
- callback callback
- xywh {140 290 130 20} type Horizontal selection_color 1 labelsize 8
- }
- Fl_Value_Slider {} {
- label FL_HOR_FILL_SLIDER
- user_data {"Fl_Value_Slider FL_HOR_FILL_SLIDER"}
- callback callback
- xywh {140 330 130 20} type {Horz Fill} selection_color 1 labelsize 8
- }
- Fl_Value_Slider {} {
- label FL_HOR_NICE_SLIDER
- user_data {"Fl_Value_Slider FL_HOR_NICE_SLIDER"}
- callback callback
- xywh {140 370 130 20} type {Horz Knob} box FLAT_BOX color 10 selection_color 1 labelsize 8
- }
- Fl_Box {} {
+ } {
+ Fl_Value_Slider {} {
+ label 0
+ user_data {"FL_VERT_SLIDER"}
+ callback callback
+ tooltip {Value Slider} xywh {30 260 30 145} selection_color 1 labelsize 8 align 1
+ }
+ Fl_Value_Slider {} {
+ label FL_VERT_FILL_SLIDER
+ user_data {"Fl_Value_Slider FL_VERT_FILL_SLIDER"}
+ callback callback
+ xywh {70 275 30 140} type {Vert Fill} selection_color 1 labelsize 8
+ }
+ Fl_Value_Slider {} {
+ label FL_VERT_NICE_SLIDER
+ user_data {"Fl_Value_Slider FL_VERT_NICE_SLIDER"}
+ callback callback
+ xywh {110 260 20 145} type {Vert Knob} box FLAT_BOX color 10 selection_color 1 labelsize 8 align 1
+ }
+ Fl_Value_Slider {} {
+ label FL_HOR_SLIDER
+ user_data {"Fl_Value_Slider FL_HOR_SLIDER"}
+ callback callback
+ xywh {140 290 130 20} type Horizontal selection_color 1 labelsize 8
+ }
+ Fl_Value_Slider {} {
+ label FL_HOR_FILL_SLIDER
+ user_data {"Fl_Value_Slider FL_HOR_FILL_SLIDER"}
+ callback callback
+ xywh {140 330 130 20} type {Horz Fill} selection_color 1 labelsize 8
+ }
+ Fl_Value_Slider {} {
+ label FL_HOR_NICE_SLIDER
+ user_data {"Fl_Value_Slider FL_HOR_NICE_SLIDER"}
+ callback callback
+ xywh {140 370 130 20} type {Horz Knob} box FLAT_BOX color 10 selection_color 1 labelsize 8
+ }
+ }
+ Fl_Group {} {
label Fl_Value_Input
xywh {10 450 135 50} box ENGRAVED_BOX labelfont 1 align 17
- }
- Fl_Value_Input {} {
- label 0
- user_data {"Fl_Value_Input"}
- callback callback
- tooltip {Value Input} xywh {30 470 105 25} labelsize 8 maximum 100 step 0.1
- }
- Fl_Box {} {
+ } {
+ Fl_Value_Input {} {
+ label 0
+ user_data {"Fl_Value_Input"}
+ callback callback
+ tooltip {Value Input} xywh {30 470 105 25} labelsize 8 maximum 100 step 0.1
+ }
+ }
+ Fl_Group {} {
label Fl_Value_Output
user_data {"Fl_Value_Output"}
xywh {155 450 135 50} box ENGRAVED_BOX labelfont 1 align 17
- }
- Fl_Value_Output {} {
- label 0
- callback callback
- tooltip {Value Output} xywh {170 470 105 25} labelsize 8 maximum 100 step 0.1
- }
- Fl_Box {} {
+ } {
+ Fl_Value_Output {} {
+ label 0
+ callback callback
+ tooltip {Value Output} xywh {170 470 105 25} labelsize 8 maximum 100 step 0.1
+ }
+ }
+ Fl_Group {} {
label { Fl_Scrollbar}
xywh {300 10 130 120} box ENGRAVED_BOX labelfont 1 align 21
- }
- Fl_Scrollbar {} {
- label FL_HORIZONTAL
- user_data {"Fl_Scrollbar FL_HORIZONTAL"}
- callback callback
- tooltip {Horizontal Scrollbar} xywh {305 55 95 20} type Horizontal labelsize 8 maximum 100 value 20
- }
- Fl_Scrollbar {} {
- label {FL_VERTICAL (0) ->}
- user_data {"Fl_Scrollbar FL_VERTICAL"}
- callback callback
- tooltip {Vertical Scrollbar} xywh {405 30 20 90} labelsize 8 align 13 maximum 100 value 20
- }
- Fl_Box {} {
+ } {
+ Fl_Scrollbar {} {
+ label FL_HORIZONTAL
+ user_data {"Fl_Scrollbar FL_HORIZONTAL"}
+ callback callback
+ tooltip {Horizontal Scrollbar} xywh {305 55 95 20} type Horizontal labelsize 8 maximum 100 value 20
+ }
+ Fl_Scrollbar {} {
+ label {FL_VERTICAL (0) ->}
+ user_data {"Fl_Scrollbar FL_VERTICAL"}
+ callback callback
+ tooltip {Vertical Scrollbar} xywh {405 30 20 90} labelsize 8 align 13 maximum 100 value 20
+ }
+ }
+ Fl_Group {} {
label Fl_Adjuster
xywh {440 10 130 120} box ENGRAVED_BOX labelfont 1 align 17
- }
- Fl_Adjuster {} {
- label {w()>h()}
- user_data {"Fl_Adjuster w()>h()"}
- callback callback
- tooltip {Horizontal Adjuster} xywh {450 60 75 25} labelsize 8
- }
- Fl_Adjuster {} {
- label {w()<h()}
- user_data {"Fl_Adjuster w()<h()"}
- callback callback
- tooltip {Vertical Adjuster} xywh {530 35 25 75} labelsize 8
- }
- Fl_Box {} {
+ } {
+ Fl_Adjuster {} {
+ label {w()>h()}
+ user_data {"Fl_Adjuster w()>h()"}
+ callback callback
+ tooltip {Horizontal Adjuster} xywh {450 60 75 25} labelsize 8
+ }
+ Fl_Adjuster {} {
+ label {w()<h()}
+ user_data {"Fl_Adjuster w()<h()"}
+ callback callback
+ tooltip {Vertical Adjuster} xywh {530 35 25 75} labelsize 8
+ }
+ }
+ Fl_Group {} {
label Fl_Counter
xywh {300 140 130 120} box ENGRAVED_BOX labelfont 1 align 17
- }
- Fl_Counter {} {
- label 0
- user_data {"Fl_Counter"}
- callback callback
- tooltip {Standard Counter} xywh {310 175 110 25} labelsize 8
- }
- Fl_Counter {} {
- label FL_SIMPLE_COUNTER
- user_data {"Fl_Counter FL_SIMPLE_COUNTER"}
- callback callback
- tooltip {Simple Counter} xywh {310 215 110 25} type Simple labelsize 8
- }
- Fl_Box {} {
+ } {
+ Fl_Counter {} {
+ label 0
+ user_data {"Fl_Counter"}
+ callback callback
+ tooltip {Standard Counter} xywh {310 175 110 25} labelsize 8
+ }
+ Fl_Counter {} {
+ label FL_SIMPLE_COUNTER
+ user_data {"Fl_Counter FL_SIMPLE_COUNTER"}
+ callback callback
+ tooltip {Simple Counter} xywh {310 215 110 25} type Simple labelsize 8
+ }
+ }
+ Fl_Group {} {
label Fl_Spinner
xywh {440 140 130 120} box ENGRAVED_BOX labelfont 1 align 17
- }
- Fl_Spinner {} {
- label FL_INT_INPUT
- user_data {"Fl_Spinner FL_INT_INPUT"}
- callback callback_spinner
- xywh {465 176 80 24} labelsize 8 align 2 minimum -30 maximum 30 step 2 value 5
- }
- Fl_Spinner {} {
- label FL_FLOAT_INPUT
- user_data {"Fl_Spinner FL_FLOAT_INPUT"}
- callback callback_spinner
- xywh {465 216 80 24} type Float labelsize 8 align 2 minimum 0 maximum 1 step 0.01 value 0.05
- code0 {o->wrap(0); // disable wrap mode}
- }
- Fl_Box {} {
+ } {
+ Fl_Spinner {} {
+ label FL_INT_INPUT
+ user_data {"Fl_Spinner FL_INT_INPUT"}
+ callback callback_spinner
+ xywh {465 176 80 24} labelsize 8 align 2 minimum -30 maximum 30 step 2 value 5
+ }
+ Fl_Spinner {} {
+ label FL_FLOAT_INPUT
+ user_data {"Fl_Spinner FL_FLOAT_INPUT"}
+ callback callback_spinner
+ xywh {465 216 80 24} type Float labelsize 8 align 2 minimum 0 maximum 1 step 0.01 value 0.05
+ code0 {o->wrap(0); // disable wrap mode}
+ }
+ }
+ Fl_Group {} {
label Fl_Dial
xywh {300 270 270 105} box ENGRAVED_BOX labelfont 1 align 17
- }
- Fl_Dial {} {
- label 0
- user_data {"Fl_Dial"}
- callback callback
- tooltip {Standard Dial} xywh {320 295 65 65} color 10 selection_color 1 labelsize 8 value 0.5
- code0 {o->angles(0,315);}
- }
- Fl_Dial {} {
- label FL_LINE_DIAL
- user_data {"Fl_Dial FL_LINE_DIAL"}
- callback callback
- tooltip {Line Dial} xywh {400 295 65 65} type Line color 10 selection_color 1 labelsize 8 value 0.5
- }
- Fl_Dial {} {
- label FL_FILL_DIAL
- user_data {"Fl_Dial FL_FILL_DIAL"}
- callback callback
- tooltip {Fill Dial} xywh {480 295 65 65} type Fill color 10 selection_color 1 labelsize 8 value 1
- code0 {o->angles(0,360);}
- }
- Fl_Box {} {
+ } {
+ Fl_Dial {} {
+ label 0
+ user_data {"Fl_Dial"}
+ callback callback
+ tooltip {Standard Dial} xywh {320 295 65 65} color 10 selection_color 1 labelsize 8 value 0.5
+ code0 {o->angles(0,315);}
+ }
+ Fl_Dial {} {
+ label FL_LINE_DIAL
+ user_data {"Fl_Dial FL_LINE_DIAL"}
+ callback callback
+ tooltip {Line Dial} xywh {400 295 65 65} type Line color 10 selection_color 1 labelsize 8 value 0.5
+ }
+ Fl_Dial {} {
+ label FL_FILL_DIAL
+ user_data {"Fl_Dial FL_FILL_DIAL"}
+ callback callback
+ tooltip {Fill Dial} xywh {480 295 65 65} type Fill color 10 selection_color 1 labelsize 8 value 1
+ code0 {o->angles(0,360);}
+ }
+ }
+ Fl_Group {} {
label Fl_Roller
xywh {300 385 150 115} box ENGRAVED_BOX labelfont 1 align 17
- }
- Fl_Roller {} {
- label 0
- user_data {"Fl_Roller FL_VERTICAL"}
- callback callback
- tooltip {Vertical Roller} xywh {315 390 20 95} labelsize 8
- }
- Fl_Roller {} {
- label FL_HORIZONTAL
- user_data {"Fl_Roller FL_HORIZONTAL"}
- callback callback
- tooltip {Horizontal Roller} xywh {345 430 90 20} type Horizontal labelsize 8
+ } {
+ Fl_Roller {} {
+ label 0
+ user_data {"Fl_Roller FL_VERTICAL"}
+ callback callback
+ tooltip {Vertical Roller} xywh {315 390 20 95} labelsize 8
+ }
+ Fl_Roller {} {
+ label FL_HORIZONTAL
+ user_data {"Fl_Roller FL_HORIZONTAL"}
+ callback callback
+ tooltip {Horizontal Roller} xywh {345 430 90 20} type Horizontal labelsize 8
+ }
}
Fl_Box {} {
label {Some widgets have color(FL_GREEN) and color2(FL_RED) to show the areas these effect.}
xywh {460 385 110 115} box BORDER_FRAME color 0 selection_color 0 labelsize 11 align 128
}
- Fl_Box tty {
+ Fl_Box tty {selected
xywh {10 513 560 117} color 0
code0 {o->ansi(true);}
class Fl_Simple_Terminal