[Classes] [Prev] [Next] [Methods]

CMenu

Methods Index

Heritage
Description
Usage
Enums
Protected Data Members
Public Methods
Constructor and Destructor Methods
State Methods
Convenience Flag Methods

CMenu


Heritage

Superclass: CNotifier

Subclasses: CSubmenu, CMenuItem


Description

CMenu defines the interface and attributes common to both CMenuItem and CSubMenu. In XVT terms, a menubar is made of submenus (File, Edit, Font,...). Each submenu is made of menu items, separators, and/or cascading submenus. For clarity in this documentation, we will define a menu as being either a menu item or a submenu of a menubar.


Usage

Abstract.


Enums

MENU_FLAGS

NONE = 0
ENABLED = 1
CHECKED = 2
CHECKABLE = 4
SEPARATOR = 8

Defines the menu attributes. The default is ENABLED only. In the construction of a CMenu object, you set these attributes by OR'ing some flags (Example: CHECKED | ENABLED).


Protected Data Members

CStringRW itsText; The menu title
MENU_TAG itsTag; The menu tag; a tag is a unique ID associated with a menu
short itsMnemonic; The menu mnemonic
long itsFlags; The menu flags


Public Methods

Constructor and Destructor Methods

CMenu(void);
CMenu(const CStringRW &theText, MENU_TAG theTag, 
short theMnemonic, long theFlags = ENABLED);
CMenu(const CMenu &theMenu);
CMenu &operator= (const CMenu &theMenu);
virtual ~CMenu();

State Methods

void SetTitle(const CStringRW &theText);
const CStringRW& GetTitle(void) const;
void SetTag(MENU_TAG theTag);
MENU_TAG GetTag(void) const;
void SetFlags(long theFlags);
long GetFlags(void) const;
void SetMnemonic(short theMnemonic);
short GetMnemonic(void) const;

Convenience Flag Methods

void SetEnabled(BOOLEAN isEnabled);
BOOLEAN IsEnabled(void) const;
void SetChecked(BOOLEAN isChecked);
BOOLEAN IsChecked(void) const;
BOOLEAN IsCheckable(void) const;


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.