diff options
| -rw-r--r-- | FL/Fl_Menu_Button.H | 22 |
1 files 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 <P>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. </P> + 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). </P> <P>The menu will also pop up in response to shortcuts indicated by putting a '&' character in the label(). </P> <P>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); |
