csMenu Class Reference
[Menu]
The Menu class represents two types of menu: vertical (popup) menus and bar menus.
More...
#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 of the menu item. | |
| bool | GetCheck (int iCommandCode) |
| Get the checked state of the specified 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. | |
Detailed Description
The Menu class represents two types of menu: vertical (popup) menus and bar menus.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 225 of file csmenu.h.
Constructor & Destructor Documentation
|
||||||||||||||||
|
Create menu object.
|
Member Function Documentation
|
|
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. |
|
|
Get the checked state of the specified menu item.
|
|
|
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 270 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 of the 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. |
Member Data Documentation
|
|
Current menu item.
|
The documentation for this class was generated from the following file:
- csws/csmenu.h
Generated for Crystal Space by doxygen 1.2.18
