diff options
| author | Matthias Melcher <github@matthiasm.com> | 2022-12-10 13:11:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-10 13:11:49 +0100 |
| commit | fa41211ccae24d75e940721bae68d3abe7f2e1ee (patch) | |
| tree | 406d73ec3b15c01935982300de421393b6a68f0d /fluid/widget_panel.fl | |
| parent | 5673072271cdd797de3fa0f3136ca3f1d219484e (diff) | |
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
Diffstat (limited to 'fluid/widget_panel.fl')
| -rw-r--r-- | fluid/widget_panel.fl | 112 |
1 files changed, 66 insertions, 46 deletions
diff --git a/fluid/widget_panel.fl b/fluid/widget_panel.fl index 798a386ac..9c306abd2 100644 --- a/fluid/widget_panel.fl +++ b/fluid/widget_panel.fl @@ -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 - } } } } |
