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/Fl_Group_Type.h | |
| 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/Fl_Group_Type.h')
| -rw-r--r-- | fluid/Fl_Group_Type.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/fluid/Fl_Group_Type.h b/fluid/Fl_Group_Type.h index 581f9ce3a..3d21a44b6 100644 --- a/fluid/Fl_Group_Type.h +++ b/fluid/Fl_Group_Type.h @@ -21,6 +21,7 @@ #include <FL/Fl_Tabs.H> #include <FL/Fl_Pack.H> +#include <FL/Fl_Flex.H> #include <FL/Fl_Wizard.H> void group_cb(Fl_Widget *, void *); @@ -82,6 +83,38 @@ public: void copy_properties(); }; +extern const char flex_type_name[]; +extern Fl_Menu_Item flex_type_menu[]; + +class Fl_Flex_Type : public Fl_Group_Type { + Fl_Menu_Item *subtypes() {return flex_type_menu;} + int fixedSizeTableSize; + int *fixedSizeTable; + int suspend_auto_layout; +public: + Fl_Flex_Type() : fixedSizeTableSize(0), fixedSizeTable(NULL), suspend_auto_layout(0) { } + virtual const char *type_name() {return flex_type_name;} + virtual const char *alt_type_name() {return "fltk::FlexGroup";} + Fl_Widget_Type *_make() { return new Fl_Flex_Type(); } + Fl_Widget *widget(int X,int Y,int W,int H) { + Fl_Flex *g = new Fl_Flex(X,Y,W,H); Fl_Group::current(0); return g;} + int pixmapID() { return 56; } + void write_properties(); + void read_property(const char *); + Fl_Widget *enter_live_mode(int top=0); + void copy_properties(); + void postprocess_read(); + void write_code2(); + void add_child(Fl_Type*, Fl_Type*); + void move_child(Fl_Type*, Fl_Type*); + void remove_child(Fl_Type*); + int is_flex() const {return 1;} + void change_subtype_to(int n); + static int parent_is_flex(Fl_Type*); + static int size(Fl_Type*, char fixed_only=0); + static int is_fixed(Fl_Type*); +}; + extern const char table_type_name[]; class Fl_Table_Type : public Fl_Group_Type { |
