Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csMenu Class Reference

The Menu class represents two types of menu: vertical (popup) menus and bar menus. More...

#include <csmenu.h>

Inheritance diagram for csMenu:

csComponent List of all members.

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.

csComponentGetItem (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

csComponentcurrent
 Current menu item.


Friends

class  csMenuItem

Detailed Description

The Menu class represents two types of menu: vertical (popup) menus and bar menus.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000