FLUID event handling and UI changes (#575)

* Full support o when()
* Making undo suspend nesting
* Finally correct undo handling for Label: input
* Documentation.
* Adding more undo checkpoints for the Widget Panel
* Quick selection of default user_data types
* Pulldown menu for system colors
* Make sure that partially typed text fields are propagated before saving
This commit is contained in:
Matthias Melcher
2022-12-10 13:11:49 +01:00
committed by GitHub
parent 5673072271
commit fa41211cca
9 changed files with 431 additions and 210 deletions
-1
View File
@@ -267,7 +267,6 @@ Fl_Type::Fl_Type() {
user_data_type_ = 0;
callback_ = 0;
comment_ = 0;
rtti = 0;
level = 0;
code_position = header_position = -1;
code_position_end = header_position_end = -1;
-1
View File
@@ -64,7 +64,6 @@ public: // things that should not be public:
char selected; // copied here by selection_changed()
char open_; // state of triangle in browser
char visible; // true if all parents are open
char rtti; // hack because I have no rtti, this is 0 for base class
int level; // number of parents over this
static Fl_Type *first, *last;
Fl_Type *next, *prev;
+255 -106
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -483,6 +483,7 @@ void modal_cb(Fl_Light_Button* i, void* v) {
i->show();
i->value(((Fl_Window_Type *)current_widget)->modal);
} else {
undo_checkpoint();
((Fl_Window_Type *)current_widget)->modal = i->value();
set_modflag(1);
}
@@ -494,6 +495,7 @@ void non_modal_cb(Fl_Light_Button* i, void* v) {
i->show();
i->value(((Fl_Window_Type *)current_widget)->non_modal);
} else {
undo_checkpoint();
((Fl_Window_Type *)current_widget)->non_modal = i->value();
set_modflag(1);
}
@@ -505,6 +507,7 @@ void border_cb(Fl_Light_Button* i, void* v) {
i->show();
i->value(((Fl_Window*)(current_widget->o))->border());
} else {
undo_checkpoint();
((Fl_Window*)(current_widget->o))->border(i->value());
set_modflag(1);
}
@@ -522,6 +525,7 @@ void xclass_cb(Fl_Input* i, void* v) {
i->value(((Fl_Widget_Type *)current_widget)->xclass);
} else {
int mod = 0;
undo_checkpoint();
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
if (o->selected && o->is_widget()) {
mod = 1;
+18
View File
@@ -298,6 +298,17 @@ void update_sourceview_timer(void*);
// ----
extern Fl_Window *the_panel;
// make sure that a currently changed text widgets propagates its contents
void flush_text_widgets() {
if (Fl::focus() && (Fl::focus()->top_window() == the_panel)) {
Fl_Widget *old_focus = Fl::focus();
Fl::focus(NULL);
Fl::focus(old_focus);
}
}
// ----
/**
Change the current working directory to the .fl project directory.
@@ -471,6 +482,7 @@ static void external_editor_timer(void*) {
\param[in] v if v is not NULL, or no filename is set, open a filechooser.
*/
void save_cb(Fl_Widget *, void *v) {
flush_text_widgets();
Fl_Native_File_Chooser fnfc;
const char *c = filename;
if (v || !c || !*c) {
@@ -645,6 +657,7 @@ void revert_cb(Fl_Widget *,void *) {
If the design was modified, a dialog will ask for confirmation.
*/
void exit_cb(Fl_Widget *,void *) {
flush_text_widgets();
// Stop any external editor update timers
ExternalCodeEditor::stop_update_timer();
@@ -978,6 +991,7 @@ void new_from_template_cb(Fl_Widget *w, void *v) {
\return 1 if the operation failed, 0 if it succeeded
*/
int write_code_files() {
flush_text_widgets();
if (!filename) {
save_cb(0,0);
if (!filename) return 1;
@@ -1030,6 +1044,7 @@ void write_cb(Fl_Widget *, void *) {
*/
void write_strings_cb(Fl_Widget *, void *) {
static const char *exts[] = { ".txt", ".po", ".msg" };
flush_text_widgets();
if (!filename) {
save_cb(0,0);
if (!filename) return;
@@ -1066,6 +1081,7 @@ void openwidget_cb(Fl_Widget *, void *) {
User chose to copy the currently selected widgets.
*/
void copy_cb(Fl_Widget*, void*) {
flush_text_widgets();
if (!Fl_Type::current) {
fl_beep();
return;
@@ -1153,6 +1169,8 @@ void duplicate_cb(Fl_Widget*, void*) {
return;
}
flush_text_widgets();
if (!write_file(cutfname(1),1)) {
fl_message("Can't write %s: %s", cutfname(1), strerror(errno));
return;
+2 -2
View File
@@ -207,10 +207,10 @@ void undo_clear() {
// Resume undo checkpoints
void undo_resume() {
undo_paused = 0;
undo_paused--;
}
// Suspend undo checkpoints
void undo_suspend() {
undo_paused = 1;
undo_paused++;
}
+71 -49
View File
@@ -71,6 +71,14 @@ Fl_Value_Input *widget_flex_size=(Fl_Value_Input *)0;
Fl_Check_Button *widget_flex_fixed=(Fl_Check_Button *)0;
Fl_Button *w_labelcolor=(Fl_Button *)0;
Fl_Button *w_color=(Fl_Button *)0;
Fl_Button *w_selectcolor=(Fl_Button *)0;
Fl_Button *w_textcolor=(Fl_Button *)0;
Fl_Menu_Item menu_2[] = {
{"private", 0, 0, (void*)(0), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
{"public", 0, 0, (void*)(1), 0, (uchar)FL_NORMAL_LABEL, 0, 11, 0},
@@ -95,6 +103,14 @@ Fl_Text_Editor *wComment=(Fl_Text_Editor *)0;
CodeEditor *wCallback=(CodeEditor *)0;
Fl_Menu_Item menu_4[] = {
{"void*", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 4, 11, 0},
{"long", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 4, 11, 0},
{0,0,0,0,0,0,0,0,0}
};
Fl_Box *w_when_box=(Fl_Box *)0;
Fl_Button *wLiveMode=(Fl_Button *)0;
/**
@@ -129,7 +145,7 @@ Fl_Double_Window* make_widget_panel() {
o->labelsize(11);
o->textsize(11);
o->callback((Fl_Callback*)label_cb);
o->when(FL_WHEN_CHANGED);
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);
@@ -629,7 +645,7 @@ sized to fit the container.");
o->labelsize(11);
o->callback((Fl_Callback*)propagate_load);
o->align(Fl_Align(FL_ALIGN_LEFT));
{ Fl_Choice* o = new Fl_Choice(95, 40, 170, 20);
{ Fl_Choice* o = new Fl_Choice(95, 40, 152, 20);
o->tooltip("The style of the label text.");
o->box(FL_THIN_UP_BOX);
o->down_box(FL_BORDER_BOX);
@@ -640,7 +656,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(264, 40, 50, 20);
{ Fl_Value_Input* o = new Fl_Value_Input(246, 40, 50, 20);
o->tooltip("The size of the label text.");
o->labelsize(11);
o->maximum(100);
@@ -649,11 +665,15 @@ sized to fit the container.");
o->textsize(11);
o->callback((Fl_Callback*)labelsize_cb);
} // Fl_Value_Input* o
{ Fl_Button* o = new Fl_Button(314, 40, 90, 20, "Label Color");
o->tooltip("The color of the label text.");
o->labelsize(11);
o->callback((Fl_Callback*)labelcolor_cb);
} // Fl_Button* o
{ w_labelcolor = new Fl_Button(296, 40, 90, 20, "Label Color");
w_labelcolor->tooltip("The color of the label text.");
w_labelcolor->labelsize(11);
w_labelcolor->callback((Fl_Callback*)labelcolor_cb);
} // Fl_Button* w_labelcolor
{ Fl_Menu_Button* o = new Fl_Menu_Button(386, 40, 18, 20);
o->callback((Fl_Callback*)labelcolor_menu_cb);
o->menu(colormenu);
} // Fl_Menu_Button* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(95, 65, 309, 20, "Box:");
@@ -661,7 +681,7 @@ sized to fit the container.");
o->labelsize(11);
o->callback((Fl_Callback*)propagate_load);
o->align(Fl_Align(FL_ALIGN_LEFT));
{ Fl_Choice* o = new Fl_Choice(95, 65, 219, 20);
{ Fl_Choice* o = new Fl_Choice(95, 65, 201, 20);
o->tooltip("The \"up\" box of the widget.");
o->box(FL_THIN_UP_BOX);
o->down_box(FL_BORDER_BOX);
@@ -672,11 +692,15 @@ sized to fit the container.");
Fl_Group::current()->resizable(o);
o->menu(boxmenu);
} // Fl_Choice* o
{ Fl_Button* o = new Fl_Button(314, 65, 90, 20, "Color");
o->tooltip("The background color of the widget.");
o->labelsize(11);
o->callback((Fl_Callback*)color_cb);
} // Fl_Button* o
{ w_color = new Fl_Button(296, 65, 90, 20, "Color");
w_color->tooltip("The background color of the widget.");
w_color->labelsize(11);
w_color->callback((Fl_Callback*)color_cb);
} // Fl_Button* w_color
{ Fl_Menu_Button* o = new Fl_Menu_Button(386, 65, 18, 20);
o->callback((Fl_Callback*)color_menu_cb);
o->menu(colormenu);
} // Fl_Menu_Button* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(95, 90, 309, 20, "Down Box:");
@@ -684,22 +708,27 @@ sized to fit the container.");
o->labelsize(11);
o->callback((Fl_Callback*)propagate_load);
o->align(Fl_Align(FL_ALIGN_LEFT));
{ Fl_Choice* o = new Fl_Choice(95, 90, 219, 20);
{ Fl_Choice* o = new Fl_Choice(95, 90, 201, 20);
o->tooltip("The \"down\" box of the widget.");
o->box(FL_THIN_UP_BOX);
o->down_box(FL_BORDER_BOX);
o->labelfont(1);
o->labelsize(11);
o->labelcolor(FL_DARK2);
o->textsize(11);
o->callback((Fl_Callback*)down_box_cb);
Fl_Group::current()->resizable(o);
o->menu(boxmenu);
} // Fl_Choice* o
{ Fl_Button* o = new Fl_Button(314, 90, 90, 20, "Select Color");
o->tooltip("The selection color of the widget.");
o->labelsize(11);
o->callback((Fl_Callback*)color2_cb);
} // Fl_Button* o
{ w_selectcolor = new Fl_Button(296, 90, 90, 20, "Select Color");
w_selectcolor->tooltip("The selection color of the widget.");
w_selectcolor->labelsize(11);
w_selectcolor->callback((Fl_Callback*)color2_cb);
} // Fl_Button* w_selectcolor
{ Fl_Menu_Button* o = new Fl_Menu_Button(386, 90, 18, 20);
o->callback((Fl_Callback*)color2_menu_cb);
o->menu(colormenu);
} // Fl_Menu_Button* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(95, 115, 309, 20, "Text Font:");
@@ -707,7 +736,7 @@ sized to fit the container.");
o->labelsize(11);
o->callback((Fl_Callback*)propagate_load);
o->align(Fl_Align(FL_ALIGN_LEFT));
{ Fl_Choice* o = new Fl_Choice(95, 115, 170, 20);
{ Fl_Choice* o = new Fl_Choice(95, 115, 152, 20);
o->tooltip("The value text style.");
o->box(FL_DOWN_BOX);
o->down_box(FL_BORDER_BOX);
@@ -718,7 +747,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(264, 115, 50, 20);
{ Fl_Value_Input* o = new Fl_Value_Input(246, 115, 50, 20);
o->tooltip("The value text size.");
o->labelsize(11);
o->maximum(100);
@@ -727,11 +756,15 @@ sized to fit the container.");
o->textsize(11);
o->callback((Fl_Callback*)textsize_cb);
} // Fl_Value_Input* o
{ Fl_Button* o = new Fl_Button(314, 115, 90, 20, "Text Color");
o->tooltip("The value text color.");
o->labelsize(11);
o->callback((Fl_Callback*)textcolor_cb);
} // Fl_Button* o
{ w_textcolor = new Fl_Button(296, 115, 90, 20, "Text Color");
w_textcolor->tooltip("The value text color.");
w_textcolor->labelsize(11);
w_textcolor->callback((Fl_Callback*)textcolor_cb);
} // Fl_Button* w_textcolor
{ Fl_Menu_Button* o = new Fl_Menu_Button(386, 115, 18, 20);
o->callback((Fl_Callback*)textcolor_menu_cb);
o->menu(colormenu);
} // Fl_Menu_Button* o
o->end();
} // Fl_Group* o
{ Fl_Box* o = new Fl_Box(95, 140, 300, 40);
@@ -890,7 +923,7 @@ access the Widget pointer and \'v\' to access the user value.");
o->callback((Fl_Callback*)user_data_cb);
Fl_Group::current()->resizable(o);
} // Fl_Input* o
{ Fl_Choice* o = new Fl_Choice(300, 310, 105, 20, "When:");
{ Fl_Menu_Button* o = new Fl_Menu_Button(260, 310, 145, 20, "When");
o->tooltip("When to call the callback function.");
o->box(FL_THIN_UP_BOX);
o->down_box(FL_BORDER_BOX);
@@ -900,7 +933,7 @@ access the Widget pointer and \'v\' to access the user value.");
o->callback((Fl_Callback*)when_cb);
o->when(FL_WHEN_CHANGED);
o->menu(whenmenu);
} // Fl_Choice* o
} // Fl_Menu_Button* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(95, 335, 310, 20, "Type:");
@@ -908,7 +941,7 @@ access the Widget pointer and \'v\' to access the user value.");
o->labelsize(11);
o->callback((Fl_Callback*)propagate_load);
o->align(Fl_Align(FL_ALIGN_LEFT));
{ Fl_Input* o = new Fl_Input(95, 335, 158, 20);
{ Fl_Input_Choice* o = new Fl_Input_Choice(95, 335, 158, 20);
o->tooltip("The type of the user data.");
o->labelfont(1);
o->labelsize(11);
@@ -916,13 +949,14 @@ access the Widget pointer and \'v\' to access the user value.");
o->textsize(11);
o->callback((Fl_Callback*)user_data_type_cb);
Fl_Group::current()->resizable(o);
} // Fl_Input* o
{ Fl_Light_Button* o = new Fl_Light_Button(300, 335, 105, 20, "No Change");
o->tooltip("Call the callback even if the value has not changed.");
o->selection_color((Fl_Color)1);
o->labelsize(11);
o->callback((Fl_Callback*)when_button_cb);
} // Fl_Light_Button* o
o->menu(menu_4);
} // Fl_Input_Choice* o
{ w_when_box = new Fl_Box(260, 332, 145, 26, "FL_WHEN_NEVER");
w_when_box->box(FL_FLAT_BOX);
w_when_box->selection_color((Fl_Color)1);
w_when_box->labelsize(8);
w_when_box->align(Fl_Align(193|FL_ALIGN_INSIDE));
} // Fl_Box* w_when_box
o->end();
} // Fl_Group* o
o->end();
@@ -938,12 +972,6 @@ access the Widget pointer and \'v\' to access the user value.");
o->hide();
Fl_Group::current()->resizable(o);
} // Fl_Box* o
{ // Hidden Revert button
Fl_Button* o = new Fl_Button(90, 370, 60, 20, "Revert");
o->labelsize(11);
o->callback((Fl_Callback*)revert_cb);
o->hide();
} // Fl_Button* o
{ wLiveMode = new Fl_Button(155, 370, 80, 20, "Live &Resize");
wLiveMode->tooltip("Create a live duplicate of the selected widgets to test resizing and menu beh\
avior.");
@@ -961,12 +989,6 @@ avior.");
o->labelsize(11);
o->callback((Fl_Callback*)ok_cb);
} // Fl_Return_Button* o
{ // Hidden cancel button
Fl_Button* o = new Fl_Button(345, 370, 65, 20, "Cancel");
o->labelsize(11);
o->callback((Fl_Callback*)cancel_cb);
o->hide();
} // Fl_Button* o
o->end();
} // Fl_Group* o
o->size_range(o->w(), o->h());
+66 -46
View File
@@ -31,7 +31,7 @@ Function {make_widget_panel()} {
} {
Fl_Window {} {
comment {Use a Double Window to avoid flickering.} open
xywh {500 209 420 400} type Double labelsize 11 align 80 resizable hotspot
xywh {566 244 420 400} type Double labelsize 11 align 80 resizable hotspot
code0 {o->size_range(o->w(), o->h());} size_range {420 400 0 0} visible
} {
Fl_Tabs {} {
@@ -49,9 +49,9 @@ Function {make_widget_panel()} {
xywh {95 40 309 20} labelfont 1 labelsize 11 align 4
} {
Fl_Input {} {
callback label_cb
callback label_cb selected
tooltip {The label text for the widget.
Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 textsize 11 resizable
Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 15 textsize 11 resizable
}
Fl_Choice {} {
callback labeltype_cb open
@@ -287,7 +287,7 @@ w, pw, sw, cw, and i} xywh {215 150 55 20} labelsize 11 align 5 textsize 11
}
Fl_Input widget_h_input {
label {Height:}
callback h_cb selected
callback h_cb
tooltip {The height of the widget as a number or formula.
Formulas can be simple math, including the variables
h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
@@ -515,84 +515,108 @@ Use Ctrl-J for newlines.} xywh {95 285 310 20} labelfont 1 labelsize 11 textsize
}
Fl_Group {} {
label Style
callback propagate_load
callback propagate_load open
xywh {10 30 400 330} labelsize 11 when 0 hide
} {
Fl_Group {} {
label {Label Font:}
callback propagate_load
callback propagate_load open
xywh {95 40 309 20} labelfont 1 labelsize 11 align 4
} {
Fl_Choice {} {
callback labelfont_cb open
tooltip {The style of the label text.} xywh {95 40 170 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11 resizable
tooltip {The style of the label text.} xywh {95 40 152 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11 resizable
code0 {extern Fl_Menu_Item fontmenu[];}
code1 {o->menu(fontmenu);}
} {}
Fl_Value_Input {} {
callback labelsize_cb
tooltip {The size of the label text.} xywh {264 40 50 20} labelsize 11 maximum 100 step 1 value 14 textsize 11
tooltip {The size of the label text.} xywh {246 40 50 20} labelsize 11 maximum 100 step 1 value 14 textsize 11
}
Fl_Button {} {
Fl_Button w_labelcolor {
label {Label Color}
callback labelcolor_cb
tooltip {The color of the label text.} xywh {314 40 90 20} labelsize 11
tooltip {The color of the label text.} xywh {296 40 90 20} labelsize 11
}
Fl_Menu_Button {} {
callback labelcolor_menu_cb open
xywh {386 40 18 20}
code0 {extern Fl_Menu_Item colormenu[];}
code1 {o->menu(colormenu);}
} {}
}
Fl_Group {} {
label {Box:}
callback propagate_load
callback propagate_load open
xywh {95 65 309 20} labelfont 1 labelsize 11 align 4
} {
Fl_Choice {} {
callback box_cb open
tooltip {The "up" box of the widget.} xywh {95 65 219 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11 resizable
tooltip {The "up" box of the widget.} xywh {95 65 201 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11 resizable
code0 {extern Fl_Menu_Item boxmenu[];}
code1 {o->menu(boxmenu);}
} {}
Fl_Button {} {
Fl_Button w_color {
label Color
callback color_cb
tooltip {The background color of the widget.} xywh {314 65 90 20} labelsize 11
tooltip {The background color of the widget.} xywh {296 65 90 20} labelsize 11
}
Fl_Menu_Button {} {
callback color_menu_cb open
xywh {386 65 18 20}
code0 {extern Fl_Menu_Item colormenu[];}
code1 {o->menu(colormenu);}
} {}
}
Fl_Group {} {
label {Down Box:}
callback propagate_load
callback propagate_load open
xywh {95 90 309 20} labelfont 1 labelsize 11 align 4
} {
Fl_Choice {} {
callback down_box_cb open
tooltip {The "down" box of the widget.} xywh {95 90 219 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11 resizable
tooltip {The "down" box of the widget.} xywh {95 90 201 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 labelcolor 45 textsize 11 resizable
code0 {extern Fl_Menu_Item boxmenu[];}
code1 {o->menu(boxmenu);}
} {}
Fl_Button {} {
Fl_Button w_selectcolor {
label {Select Color}
callback color2_cb
tooltip {The selection color of the widget.} xywh {314 90 90 20} labelsize 11
tooltip {The selection color of the widget.} xywh {296 90 90 20} labelsize 11
}
Fl_Menu_Button {} {
callback color2_menu_cb open
xywh {386 90 18 20}
code0 {extern Fl_Menu_Item colormenu[];}
code1 {o->menu(colormenu);}
} {}
}
Fl_Group {} {
label {Text Font:}
callback propagate_load
callback propagate_load open
xywh {95 115 309 20} labelfont 1 labelsize 11 align 4
} {
Fl_Choice {} {
callback textfont_cb open
tooltip {The value text style.} xywh {95 115 170 20} box DOWN_BOX down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11 resizable
tooltip {The value text style.} xywh {95 115 152 20} box DOWN_BOX down_box BORDER_BOX labelfont 1 labelsize 11 textsize 11 resizable
code0 {extern Fl_Menu_Item fontmenu[];}
code1 {o->menu(fontmenu);}
} {}
Fl_Value_Input {} {
callback textsize_cb
tooltip {The value text size.} xywh {264 115 50 20} labelsize 11 maximum 100 step 1 value 14 textsize 11
tooltip {The value text size.} xywh {246 115 50 20} labelsize 11 maximum 100 step 1 value 14 textsize 11
}
Fl_Button {} {
Fl_Button w_textcolor {
label {Text Color}
callback textcolor_cb
tooltip {The value text color.} xywh {314 115 90 20} labelsize 11
tooltip {The value text color.} xywh {296 115 90 20} labelsize 11
}
Fl_Menu_Button {} {
callback textcolor_menu_cb open
xywh {386 115 18 20}
code0 {extern Fl_Menu_Item colormenu[];}
code1 {o->menu(colormenu);}
} {}
}
Fl_Box {} {
xywh {95 140 300 40} labelsize 11 resizable
@@ -600,12 +624,12 @@ Use Ctrl-J for newlines.} xywh {95 285 310 20} labelfont 1 labelsize 11 textsize
}
Fl_Group {} {
label {C++}
callback propagate_load
callback propagate_load open
xywh {10 30 400 330} labelsize 11 when 0 hide
} {
Fl_Group {} {
label {Class:}
callback propagate_load
callback propagate_load open
xywh {95 40 310 20} labelfont 1 labelsize 11 align 4
} {
Fl_Input {} {
@@ -720,10 +744,10 @@ wCallback->do_callback(wCallback, v);} open
callback user_data_cb
tooltip {The user data to pass into the callback code.} xywh {95 310 158 20} labelfont 1 labelsize 11 textfont 4 textsize 11 resizable
}
Fl_Choice {} {
label {When:}
Fl_Menu_Button {} {
label When
callback when_cb open
tooltip {When to call the callback function.} xywh {300 310 105 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 when 1 textsize 11
tooltip {When to call the callback function.} xywh {260 310 145 20} box THIN_UP_BOX down_box BORDER_BOX labelfont 1 labelsize 11 when 1 textsize 11
code0 {extern Fl_Menu_Item whenmenu[];}
code1 {o->menu(whenmenu);}
} {}
@@ -733,14 +757,22 @@ wCallback->do_callback(wCallback, v);} open
callback propagate_load open
xywh {95 335 310 20} labelfont 1 labelsize 11 align 4
} {
Fl_Input {} {
callback user_data_type_cb
Fl_Input_Choice {} {
callback user_data_type_cb open
tooltip {The type of the user data.} xywh {95 335 158 20} labelfont 1 labelsize 11 textfont 4 textsize 11 resizable
} {
MenuItem {} {
label {void*}
xywh {0 0 31 20} labelfont 4 labelsize 11
}
MenuItem {} {
label long
xywh {0 0 31 20} labelfont 4 labelsize 11
}
}
Fl_Light_Button {} {
label {No Change}
callback when_button_cb
tooltip {Call the callback even if the value has not changed.} xywh {300 335 105 20} selection_color 1 labelsize 11
Fl_Box w_when_box {
label FL_WHEN_NEVER
xywh {260 332 145 26} box FLAT_BOX selection_color 1 labelsize 8 align 209
}
}
}
@@ -752,12 +784,6 @@ wCallback->do_callback(wCallback, v);} open
comment {Hidden resizable box}
xywh {10 370 75 20} labelsize 11 hide resizable
}
Fl_Button {} {
label Revert
callback revert_cb
comment {Hidden Revert button}
xywh {90 370 60 20} labelsize 11 hide
}
Fl_Button wLiveMode {
label {Live &Resize}
callback live_mode_cb
@@ -773,12 +799,6 @@ wCallback->do_callback(wCallback, v);} open
callback ok_cb
xywh {345 370 65 20} labelsize 11
}
Fl_Button {} {
label Cancel
callback cancel_cb
comment {Hidden cancel button}
xywh {345 370 65 20} labelsize 11 hide
}
}
}
}
+15 -5
View File
@@ -90,14 +90,24 @@ extern Fl_Menu_Item fontmenu[];
extern void labelfont_cb(Fl_Choice*, void*);
extern void labelsize_cb(Fl_Value_Input*, void*);
extern void labelcolor_cb(Fl_Button*, void*);
extern Fl_Button *w_labelcolor;
#include <FL/Fl_Menu_Button.H>
extern Fl_Menu_Item colormenu[];
extern void labelcolor_menu_cb(Fl_Menu_Button*, void*);
extern Fl_Menu_Item boxmenu[];
extern void box_cb(Fl_Choice*, void*);
extern void color_cb(Fl_Button*, void*);
extern Fl_Button *w_color;
extern void color_menu_cb(Fl_Menu_Button*, void*);
extern void down_box_cb(Fl_Choice*, void*);
extern void color2_cb(Fl_Button*, void*);
extern Fl_Button *w_selectcolor;
extern void color2_menu_cb(Fl_Menu_Button*, void*);
extern void textfont_cb(Fl_Choice*, void*);
extern void textsize_cb(Fl_Value_Input*, void*);
extern void textcolor_cb(Fl_Button*, void*);
extern Fl_Button *w_textcolor;
extern void textcolor_menu_cb(Fl_Menu_Button*, void*);
extern void subclass_cb(Fl_Input*, void*);
extern void subtype_cb(Fl_Choice*, void*);
extern void name_cb(Fl_Input*, void*);
@@ -113,20 +123,20 @@ extern void callback_cb(CodeEditor*, void*);
extern CodeEditor *wCallback;
extern void user_data_cb(Fl_Input*, void*);
extern Fl_Menu_Item whenmenu[];
extern void when_cb(Fl_Choice*, void*);
extern void user_data_type_cb(Fl_Input*, void*);
extern void when_button_cb(Fl_Light_Button*, void*);
extern void revert_cb(Fl_Button*, void*);
extern void when_cb(Fl_Menu_Button*, void*);
#include <FL/Fl_Input_Choice.H>
extern void user_data_type_cb(Fl_Input_Choice*, void*);
extern Fl_Box *w_when_box;
extern void live_mode_cb(Fl_Button*, void*);
extern Fl_Button *wLiveMode;
extern void overlay_cb(Fl_Button*, void*);
#include <FL/Fl_Return_Button.H>
extern void ok_cb(Fl_Return_Button*, void*);
extern void cancel_cb(Fl_Button*, void*);
Fl_Double_Window* make_widget_panel();
extern Fl_Menu_Item menu_[];
extern Fl_Menu_Item menu_1[];
extern Fl_Menu_Item menu_Children[];
extern Fl_Menu_Item menu_2[];
extern Fl_Menu_Item menu_3[];
extern Fl_Menu_Item menu_4[];
#endif