summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2025-12-29 16:21:17 +0100
committerMatthias Melcher <github@matthiasm.com>2025-12-29 16:21:17 +0100
commit83fab8cb0ffd6ee7a38ec6e4dd768b1b3f9eb896 (patch)
treefc2d32f010157e63d7534ef7e10bf1115df2ac63 /FL
parent2fb67053a14ff4d1e7d40a18b0e165e214adfb16 (diff)
Fix Fl_Pack to support more box types.
Old code supported only frame styles, this code can now handle box types with a background.
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Pack.H8
1 files changed, 8 insertions, 0 deletions
diff --git a/FL/Fl_Pack.H b/FL/Fl_Pack.H
index 3990a1907..334123115 100644
--- a/FL/Fl_Pack.H
+++ b/FL/Fl_Pack.H
@@ -21,6 +21,7 @@
#define Fl_Pack_H
#include <FL/Fl_Group.H>
+#include <FL/Fl_Rect.H>
/**
This widget was designed to add the functionality of compressing and
@@ -39,6 +40,12 @@
resizable() widget is the last widget in the group it is extended to take
the full available width or height, respectively, of the Fl_Pack group.
+ \note Fl_Pack is optimized to use a frame-only (`..._FRAME`) box type.
+ Box types with background graphics (`..._BOX`) generally work, but can be
+ slower witch a large number of children. Not all box types work well
+ with FL_Pack. Avoid irregular graphics like FL_DIAMOND_BOX and background
+ images.
+
\note You can nest Fl_Pack widgets or put them inside Fl_Scroll widgets
or inside other group widgets but their behavior can sometimes be
<i>"surprising"</i>. This is partly due to the fact that Fl_Pack widgets
@@ -61,6 +68,7 @@ public:
};
protected:
+ void draw_filler_(const Fl_Rect& rect);
void draw() override;
public: