#include <csmenu.h>
Inheritance diagram for csMenu:
Public Methods | |
csMenu (csComponent *iParent, csMenuFrameStyle iFrameStyle=csmfs3D, int iMenuStyle=CSMS_DEFAULTVALUE) | |
Create menu object. | |
virtual void | Draw () |
Draw the menu. | |
virtual bool | HandleEvent (iEvent &Event) |
Handle input events. | |
virtual bool | PreHandleEvent (iEvent &Event) |
Pre-handle keyboard events to catch hotkeys. | |
bool | CurrentHandleEvent (iEvent &Event) |
Pass a event to current item. | |
virtual void | PlaceItems () |
Recalculate menu size (called after each menu item insertion). | |
bool | IsMenuBar () |
Return true if menu is a menu bar. | |
virtual void | SetState (int mask, bool enable) |
Set/clear given component state flags. | |
bool | SetCurrent (csComponent *newCurrent, bool DropSubmenu=false) |
Set a child as current menu item. | |
virtual bool | SetRect (int xmin, int ymin, int xmax, int ymax) |
Re-position childs when rescaled. | |
void | Deactivate (int DismissCode) |
Deactivate menu. | |
csComponent* | GetItem (int iCommandCode) |
Find the item with given command code (even in submenus). | |
void | SetCheck (int iCommandCode, bool iState) |
Set/remove a checkmark left to menu item. | |
virtual void | Insert (csComponent *comp) |
Set fPlaceItems since a item has been inserted. | |
virtual void | Delete (csComponent *comp) |
Set fPlaceItems since a item has been removed. | |
virtual void | SuggestSize (int &w, int &h) |
Suggest the size of the menu. | |
Public Attributes | |
csComponent* | current |
Current menu item. | |
Friends | |
class | csMenuItem |