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. --- test/preferences.fl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/preferences.fl b/test/preferences.fl index dec03d2b3..23a6c1a38 100644 --- a/test/preferences.fl +++ b/test/preferences.fl @@ -186,9 +186,11 @@ Fl_Input::paste_menu_text = gettext("Paste");} {} MenuItem {} { label sandals callback {[](Fl_Widget*, void*) +/* If this code generates an error, you are using an older version of Fluid */ +/* Support for lambda callbacks was added dec 12 2025 */ { puts("The shoe is the sign!"); -}} selected +}} xywh {0 0 100 20} } MenuItem {} { @@ -223,6 +225,8 @@ Fl_Input::paste_menu_text = gettext("Paste");} {} Fl_Check_Button wShave { label shave callback {[](Fl_Widget* w, void*)->void { +/* If this code generates an error, you are using an older version of Fluid */ +/* Support for lambda callbacks was added dec 12 2025 */ auto* btn = static_cast(w); if (btn->value()) { puts("Shave."); @@ -230,7 +234,7 @@ Fl_Input::paste_menu_text = gettext("Paste");} {} puts("Don't shave."); } }} - comment {// Testing lambdas for callbacks} + comment {// Testing lambdas for callbacks} selected xywh {25 212 105 24} down_box DOWN_BOX } Fl_Check_Button wBrush { -- cgit v1.2.3