From fbf1913c92a2312808c49c6a6e419f18914b5919 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sun, 12 Dec 2010 10:56:07 +0000 Subject: Added missing Doxygen doc about popup menus. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8015 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Menu_Button.H | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/FL/Fl_Menu_Button.H b/FL/Fl_Menu_Button.H index ec63d6ce2..7a5daa06f 100644 --- a/FL/Fl_Menu_Button.H +++ b/FL/Fl_Menu_Button.H @@ -41,8 +41,10 @@ \image latex menu_button.png " menu_button" width=5cm

Normally any mouse button will pop up a menu and it is lined up below the button as shown in the picture. However an Fl_Menu_Button - may also control a pop-up menu. This is done by setting the type() - , see below.

+ may also control a pop-up menu. This is done by setting the type(). + If type() is zero a normal menu button is produced. + If it is nonzero then this is a pop-up menu. The bits in type() indicate + what mouse buttons pop up the menu (see Fl_Menu_Button::popup_buttons).

The menu will also pop up in response to shortcuts indicated by putting a '&' character in the label().

Typing the shortcut() of any of the menu items will cause @@ -58,8 +60,20 @@ class FL_EXPORT Fl_Menu_Button : public Fl_Menu_ { protected: void draw(); public: - // values for type: - enum {POPUP1 = 1, POPUP2, POPUP12, POPUP3, POPUP13, POPUP23, POPUP123}; + /** + \brief indicate what mouse buttons pop up the menu. + + Values for type() used to indicate what mouse buttons pop up the menu. + Fl_Menu_Button::POPUP3 is usually what you want. + */ + enum popup_buttons {POPUP1 = 1, /**< pops up wih the mouse 1st button. */ + POPUP2, /**< pops up wih the mouse 2nd button. */ + POPUP12, /**< pops up wih the mouse 1st or 2nd buttons. */ + POPUP3, /**< pops up wih the mouse 3rd button. */ + POPUP13, /**< pops up wih the mouse 1st or 3rd buttons. */ + POPUP23, /**< pops up wih the mouse 2nd or 3rd buttons. */ + POPUP123 /**< pops up wih any mouse button. */ + }; int handle(int); const Fl_Menu_Item* popup(); Fl_Menu_Button(int,int,int,int,const char * =0); -- cgit v1.2.3