Fl
view release on metacpan or search on metacpan
lib/Fl/MenuButton.pod view on Meta::CPAN
This is a button that when pushed pops up a menu (or hierarchy of menus)
defined by an array of Fl::MenuItem objects.
=for html <center><img src="http://www.fltk.org/doc-1.3/menu_button.png" /></center>
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::MenuButton 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::MenuButton->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 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
lib/Fl/MenuButton.pod view on Meta::CPAN
definitions => [{returns => 'void' }
]
};
xs {name => 'handle',
definitions => [{required => [[qw[int event]]], returns => 'int' }
]
};
=pod
=head2 popup( )
Act exactly as though the user clicked the button or typed the shortcut key.
The menu appears, it waits for the user to pick an item, and if they pick one
it sets value() and does the callback or sets changed() as described above.
The menu item is returned or NULL if the user dismisses the menu.
=cut
xs {name => 'popup',
definitions => [
{returns => 'const Fl_Menu_Item *'}
]
};
=pod
=head1 LICENSE
Copyright (C) Sanko Robinson.
( run in 0.545 second using v1.01-cache-2.11-cpan-364913b4093 )