From 5cfa1ac7062e65e2932e16d605297e463d31ccbc Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Sat, 10 Jan 2015 17:46:10 +0000 Subject: [PATCH] Improvements to Fl_Menu_ docs regarding how callbacks are invoked. In response to misinterpretation raised in STR #3172. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10511 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Menu_.H | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/FL/Fl_Menu_.H b/FL/Fl_Menu_.H index d39b751bc..b6a4e1577 100644 --- a/FL/Fl_Menu_.H +++ b/FL/Fl_Menu_.H @@ -35,6 +35,17 @@

The class contains a pointer to an array of structures of type Fl_Menu_Item. The array may either be supplied directly by the user program, or it may be "private": a dynamically allocated array managed by the Fl_Menu_. + + When the user clicks a menu item: + + - If the Fl_Menu_Item has a callback set, that callback + is invoked with any userdata configured for it. + (The Fl_Menu_ widget's callback is NOT invoked. + + - For any Fl_Menu_Items that \b don't have a callback set, + the Fl_Menu_ widget's callback is invoked with any userdata + configured for it. The callback can determine which item + was picked using value(), mvalue(), item_pathname(), etc. */ class FL_EXPORT Fl_Menu_ : public Fl_Widget {