From 83fab8cb0ffd6ee7a38ec6e4dd768b1b3f9eb896 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Mon, 29 Dec 2025 16:21:17 +0100 Subject: Fix Fl_Pack to support more box types. Old code supported only frame styles, this code can now handle box types with a background. --- FL/Fl_Pack.H | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'FL') 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 +#include /** 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 "surprising". 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: -- cgit v1.2.3