summaryrefslogtreecommitdiff
path: root/test/preferences.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 /test/preferences.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 'test/preferences.fl')
-rw-r--r--test/preferences.fl8
1 files changed, 6 insertions, 2 deletions
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<Fl_Check_Button*>(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 {