Main Page | Class Hierarchy | Data Structures | Directories | Data Fields

CMenu Class Reference

#include <utui.h>

Inheritance diagram for CMenu:

CDialog CWindow CDocumentClient CLayout CMenuBar

Public Types

typedef CCommandTargetptarget_t
typedef vector< SCmd > cmdvec_t
typedef const cmdvec_t & rccmdvec_t
typedef cmdvec_t::iterator iitem_t
typedef cmdvec_t::const_iterator icitem_t
typedef const Point2d & rcoffset_t

Public Member Functions

void Set (const SCmd *pCmds, size_t nCmds, cmd_t root=cmd_Root)
cmd_t ExecuteCommand (cmd_t cmd)
 Execute a command by id (this is not limited to the menu's scope).

Static Public Member Functions

static cmd_t Run (const SCmd *pCmds, size_t nCmds, cmd_t root=cmd_Root, rcoffset_t offset=s_NullOffset)

Static Public Attributes

static const Point2d s_NullOffset

Protected Member Functions

 CMenu (const SCmd *pCmds=NULL, size_t nCmds=0, cmd_t root=cmd_Root, rcoffset_t offset=s_NullOffset)
 Default constructor.
virtual void OnKey (wchar_t key)
 Handles key.
virtual void SizeHints (rrect_t wr) const
 Returns recommended window area when in r.
bool IsEmpty (void) const
wchar_t CheckForAccelerator (wchar_t key)
 If key is an item accel, focuses the item and returns kv_Enter.

Detailed Description

Displays a vertical menu of items initialized from the given list, updated via the OnUpdateCommandUI interface on the window tree.


Member Function Documentation

void CMenu::Set const SCmd *  pCmds,
size_t  nCmds,
cmd_t  root = cmd_Root
 

Sets the menu item list to pCmds of size nCmds with root. Commands should be in a hierarchy, as visible.


The documentation for this class was generated from the following files:
Generated on Sat Nov 18 11:53:53 2006 for UltraTextUI by 1.4.4 Doxygen Hosted on SourceForge.net