Added missing Doxygen doc about popup menus.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8015 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2010-12-12 10:56:07 +00:00
parent ab606d1274
commit fbf1913c92

View File

@ -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);