The behavior is different if the widget is visible() or not. Normally any mouse button will pop up a menu and it is lined up below the button as shown in the picture. If however you do a hide(), then the button only responds to the right mouse button, and the menu is aligned with wherever the mouse cursor is. This allows you to make a popup menu by making an invisible menu button that covers the whole window and is the top/last widget.
The menu will also pop up in response to shortcuts indicated by putting a '&' character in the label(). See Fl_Button for a description of this.
Typing the shortcut() of any of the menu items will cause callbacks exactly the same as when you pick the item with the mouse. The '&' character in menu item names are only looked at when the menu is popped up, however.
When the user picks an item off the menu, the item's callback is done with the menu_button as the Fl_Widget* argument. If the item does not have a callback the menu_button's callback is done instead.
Fl_Menu_Button::Fl_Menu_Button(int,int,int,int,const char *
= 0);
Fl_Boxtype Fl_Menu_Button::down_box() const ;
void Fl_Menu_Button::down_box(Fl_Boxtype);
uchar Fl_Menu_Button::down_color() const ;
void Fl_Menu_Button::down_color(uchar);
const Fl_Menu* Fl_Menu_::popup();