#include <umenu.hpp>
Inheritance diagram for UMenu:
Public Member Functions | |
UMenu (const UArgs &a=UArgs::none) | |
virtual const UStyle & | getStyle (UContext *) const |
virtual UGroup * | getBrowsingGroup () |
[impl]. | |
virtual void | open () |
opens the menu (use this method instead of show(true) in the general case) | |
virtual void | close (int status=0) |
closes the menu (use this method instead of show(false) in the general case) | |
virtual void | setPlacement (const class UPlacement *) |
virtual void | setPlacement (const class UPlacement &) |
specifies automatic placement rules (see UPlacement) | |
virtual bool | realize () |
[impl.] initializes the window and its children | |
Static Public Member Functions | |
const UStyle & | makeStyle () |
Static Public Attributes | |
UStyle * | style = null |
Friends | |
UMenu & | umenu (const UArgs &a=UArgs::none) |
creator shortcut that is equivalent to: *new UMenu(). |
Notes:
See also classes: UWin, UMenubar, UPopmenu.
Example:
umenubar( ubutton("Menu 1" + umenu( ubutton("aaa") + ubutton("bbb") )) + ubutton("Menu 2" + umenu( ulabel("xxx") + ucheckbox("ccc") )) )
|
closes the menu (use this method instead of show(false) in the general case) There is usually no need to call this function explicitely as menus are automatically closed the close() method 1) ungrabs the mouse, 2) hides this menu and its cascaded children See also: UWin::close() Reimplemented from UWin. |
|
opens the menu (use this method instead of show(true) in the general case) Notes:
Details: the open() method:
|
|
[impl.] initializes the window and its children creates the associated graphics context and native window if this is a "hard window". this fct. is automatically called when the window is shown for the first time (so that unused windows won't consume unnecessary resources) Implements UWin. |
|
specifies automatic placement rules (see UPlacement) Details:
|