#include <umenu.hpp>
Inheritance diagram for UPopmenu:
Public Member Functions | |
UPopmenu (const UArgs &a=UArgs::none) | |
virtual void | autoOpens (UBox &opener, u_id button_mask, u_id keysym, bool children_open_menu=false) |
virtual void | autoOpens (UBox &opener, const std::vector< InputCond > &, bool children_open_menu) |
this 'opener' will automatically open the menu | |
virtual const UStyle & | getStyle (UContext *) const |
Static Public Member Functions | |
const UStyle & | makeStyle () |
Static Public Attributes | |
UStyle * | style = null |
Protected Member Functions | |
virtual bool | autoOpenCheck (UEvent &) |
virtual void | autoOpenImpl (UEvent &) |
function called by autoOpens() when the menu pops up. | |
Protected Attributes | |
std::vector< InputCond > | input_conds |
Friends | |
UPopmenu & | upopmenu (const UArgs &a=UArgs::none) |
creator shortcut that is equivalent to: *new UPopmenu(). |
UPopmenu objects are NOT automatically OPENED by their parent(s). There a two ways for opening Popmenus:
Note: as other Ubit UBricks, menus MUST HAVE at least one parent.
See also classes: UWin, UMenu.
Example (see also method: autoOpens()) :
opener.addlist(menu + UOn::mpress / ucall(&menu, openMenu))
void openMenu(UEvent& e, UPopmenu* pop) { popmenu->move(e, 0, 0); // move the menu to Event location popmenu->open(); // open the menu }
|
this 'opener' will automatically open the menu Arguments:
|