From 8826dca1066361b474139bcc5aeed2e3a5246ed0 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 5 Jan 2023 13:51:30 +0100 Subject: Add close buttons for individual tabs in Fl_Tabs (#628) Add close buttons for Fl_Tabs Introducing callback reasons FLUID shows all FL_WHEN_... options Adding Fl_Tabs overflow types Improved test/tabs to show new features --- FL/Fl_Menu_Item.H | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'FL/Fl_Menu_Item.H') diff --git a/FL/Fl_Menu_Item.H b/FL/Fl_Menu_Item.H index 7ae1faeef..0f1083a9a 100644 --- a/FL/Fl_Menu_Item.H +++ b/FL/Fl_Menu_Item.H @@ -390,14 +390,14 @@ struct FL_EXPORT Fl_Menu_Item { The callback is called with the stored user_data() as its second argument. You must first check that callback() is non-zero before calling this. */ - void do_callback(Fl_Widget* o) const {callback_(o, user_data_);} + void do_callback(Fl_Widget* o) const {Fl::callback_reason_=FL_REASON_SELECTED; callback_(o, user_data_);} /** Calls the Fl_Menu_Item item's callback, and provides the Fl_Widget argument. This call overrides the callback's second argument with the given value \p arg. You must first check that callback() is non-zero before calling this. */ - void do_callback(Fl_Widget* o,void* arg) const {callback_(o, arg);} + void do_callback(Fl_Widget* o,void* arg) const {Fl::callback_reason_=FL_REASON_SELECTED; callback_(o, arg);} /** Calls the Fl_Menu_Item item's callback, and provides the Fl_Widget argument. @@ -406,7 +406,7 @@ struct FL_EXPORT Fl_Menu_Item { the callback. You must first check that callback() is non-zero before calling this. */ - void do_callback(Fl_Widget* o,long arg) const {callback_(o, (void*)(fl_intptr_t)arg);} + void do_callback(Fl_Widget* o,long arg) const {Fl::callback_reason_=FL_REASON_SELECTED; callback_(o, (void*)(fl_intptr_t)arg);} /** Back compatibility only. \deprecated -- cgit v1.2.3