#include <umenu.hpp>
Inheritance diagram for UMenu:
Public Member Functions | |
UMenu (const UArgs &a=UArgs::none) | |
virtual const UStyle & | getStyle (UContext *) const |
returns the contextual UStyle of this object | |
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. | |
Static Public Member Functions | |
static const UStyle & | makeStyle () |
creates the Style of this object. | |
Static Public Attributes | |
static UStyle * | style = null |
corresponding Ubit UStyle | |
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. |
|
returns the contextual UStyle of this object This virtual function calls the makeStyle() static function that was redefined for this specific class
Reimplemented from UWin. Reimplemented in UPopmenu. |
|
creates the Style of this object. This static function is redefined by each class that derives from UGroup. It is called by the virtual function UGroup::getStyle()
Reimplemented from UWin. Reimplemented in UPopmenu. |
|
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:
|