diff options
| author | Matthias Melcher <github@matthiasm.com> | 2022-11-01 13:30:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-01 13:30:05 +0100 |
| commit | 93ea93ee2b424ded25358d87529b1160cdb4f80c (patch) | |
| tree | a0a445a21ac71c72e4983a5ed8bf854a70dec3a8 /fluid/widget_panel.fl | |
| parent | 31ec6f623ab76d3f1107af9782237b8d7a089026 (diff) | |
Fluid support for Fl_Flex (#523) and some Fl_Flex improvements
* Adding Fluid support for Fl_Flex, margins, and gap.
* Fluid Fl_Flex mostly working. Fixed in Fl_Flex::set_size().
* Fluid Flex live mode works, interactive dragging works
* Fluid Flex: adding check box for fixed children
* Fluid Flex: visual flexibility indicator in guides.
* Fluid Flex: bug in generated code.
* Fix formatting
* Fixing Tooltip, fixing resize issue PR #518.
* Removing unused variables.
Co-authored-by: Albrecht Schlosser <albrechts.fltk@online.de>
Diffstat (limited to 'fluid/widget_panel.fl')
| -rw-r--r-- | fluid/widget_panel.fl | 67 |
1 files changed, 60 insertions, 7 deletions
diff --git a/fluid/widget_panel.fl b/fluid/widget_panel.fl index 1f0b3b2ad..de82b3871 100644 --- a/fluid/widget_panel.fl +++ b/fluid/widget_panel.fl @@ -23,7 +23,7 @@ comment {// decl {\#include "Fl_Widget_Type.h"} {private global } -decl {\#include "Shortcut_Button.h"} {selected public global +decl {\#include "Shortcut_Button.h"} {public global } Function {make_widget_panel()} { @@ -31,8 +31,8 @@ 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 hide resizable hotspot - code0 {o->size_range(o->w(), o->h());} size_range {420 400 0 0} + xywh {500 209 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 {} { callback {propagate_load((Fl_Group *)o,v);} open @@ -258,8 +258,8 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 te } Fl_Group {} { label {Position:} - callback propagate_load open - xywh {95 150 314 20} labelfont 1 labelsize 11 align 4 + callback position_group_cb open + xywh {95 150 314 20} labelfont 1 labelsize 11 align 4 hide } { Fl_Input widget_x_input { label {X:} @@ -295,8 +295,27 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 te } } Fl_Group {} { + label {Flex Parent:} + callback flex_size_group_cb open + xywh {95 150 314 20} labelfont 1 labelsize 11 align 4 + } { + Fl_Value_Input widget_flex_size { + label {Size:} + callback flex_size_cb + tooltip {Fixed Width or Height for a horizontal or vertical Fl_Flex Parent.} xywh {95 150 55 20} labelsize 11 align 5 textsize 11 + } + Fl_Check_Button widget_flex_fixed { + label fixed + callback flex_fixed_cb selected + tooltip {If checked, the size of the widget stays fixed.} xywh {155 150 55 20} down_box DOWN_BOX labelsize 11 + } + Fl_Box {} { + xywh {398 150 1 20} resizable + } + } + Fl_Group {} { label {Values:} - callback propagate_load + callback values_group_cb open xywh {95 185 300 20} labelfont 1 labelsize 11 align 4 } { Fl_Value_Input {} { @@ -329,8 +348,42 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 te } } Fl_Group {} { + label {Margins:} + callback flex_margin_group_cb open + xywh {95 185 300 20} labelfont 1 labelsize 11 align 4 hide + } { + Fl_Value_Input {} { + label {Left:} + callback flex_margin_left_cb + tooltip {Left margin in group.} xywh {95 185 55 20} labelsize 11 align 5 textsize 11 + } + Fl_Value_Input {} { + label {Top:} + callback flex_margin_top_cb + tooltip {Top margin in group.} xywh {155 185 55 20} labelsize 11 align 5 textsize 11 + } + Fl_Value_Input {} { + label {Right:} + callback flex_margin_right_cb + tooltip {Right margin in group.} xywh {215 185 55 20} labelsize 11 align 5 textsize 11 + } + Fl_Value_Input {} { + label {Bottom:} + callback flex_margin_bottom_cb + tooltip {Bottom margin in group.} xywh {275 185 55 20} labelsize 11 align 5 textsize 11 + } + Fl_Value_Input {} { + label {Gap:} + callback flex_margin_gap_cb + tooltip {Gap between children.} xywh {335 185 55 20} labelsize 11 align 5 textsize 11 + } + Fl_Box {} { + xywh {395 185 0 20} resizable + } + } + Fl_Group {} { label {Size Range:} - callback propagate_load + callback size_range_group_cb open xywh {95 185 300 20} labelfont 1 labelsize 11 align 4 hide } { Fl_Value_Input {} { |
