![]() |
Public API Reference |
#include <csmenu.h>
Inheritance diagram for csMenu:
Public Methods | |
csMenu (csComponent *iParent, csMenuFrameStyle iFrameStyle=csmfs3D, int iMenuStyle=CSMS_DEFAULTVALUE) | |
Create menu object. More... | |
virtual void | Draw () |
Draw the menu. More... | |
virtual bool | HandleEvent (iEvent &Event) |
Handle input events. More... | |
virtual bool | PreHandleEvent (iEvent &Event) |
Pre-handle keyboard events to catch hotkeys. More... | |
bool | CurrentHandleEvent (iEvent &Event) |
Pass a event to current item. More... | |
virtual void | PlaceItems () |
Recalculate menu size (called after each menu item insertion). More... | |
bool | IsMenuBar () |
Return true if menu is a menu bar. More... | |
virtual void | SetState (int mask, bool enable) |
Set/clear given component state flags. More... | |
bool | SetCurrent (csComponent *newCurrent, bool DropSubmenu=false) |
Set a child as current menu item. More... | |
virtual bool | SetRect (int xmin, int ymin, int xmax, int ymax) |
Re-position childs when rescaled. More... | |
void | Deactivate (int DismissCode) |
Deactivate menu. More... | |
csComponent * | GetItem (int iCommandCode) |
Find the item with given command code (even in submenus). More... | |
void | SetCheck (int iCommandCode, bool iState) |
Set/remove a checkmark left to menu item. More... | |
virtual void | Insert (csComponent *comp) |
Set fPlaceItems since a item has been inserted. More... | |
virtual void | Delete (csComponent *comp) |
Set fPlaceItems since a item has been removed. More... | |
virtual void | SuggestSize (int &w, int &h) |
Suggest the size of the menu. More... | |
Public Attributes | |
csComponent * | current |
Current menu item. More... | |
Friends | |
class | csMenuItem |
In fact, menu class is a bit messy just now, and as soon as I will have time it should be cleaned up. However, it works reasonably well, so it is just a matter of taste.
Definition at line 220 of file csmenu.h.
|
Create menu object.
|
|
Pass a event to current item.
|
|
Deactivate menu.
|
|
Set fPlaceItems since a item has been removed.
Reimplemented from csComponent. |
|
Draw the menu.
Reimplemented from csComponent. |
|
Find the item with given command code (even in submenus).
|
|
Handle input events.
Reimplemented from csComponent. |
|
Set fPlaceItems since a item has been inserted.
Reimplemented from csComponent. |
|
Return true if menu is a menu bar.
Definition at line 265 of file csmenu.h. References csmfsBar. |
|
Recalculate menu size (called after each menu item insertion).
|
|
Pre-handle keyboard events to catch hotkeys.
Reimplemented from csComponent. |
|
Set/remove a checkmark left to menu item.
|
|
Set a child as current menu item.
|
|
Re-position childs when rescaled.
Reimplemented from csComponent. |
|
Set/clear given component state flags.
Reimplemented from csComponent. |
|
Suggest the size of the menu.
Reimplemented from csComponent. |
|
Current menu item.
|