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

CSubmenu

Methods Index

Heritage
Description
Usage
Protected Data Members
Public methods
Constructor and Destructor Methods
Collection Methods
Protected Methods

CSubmenu


Heritage

Superclass: CMenu

Subclasses: None


Description

CSubmenu defines submenus as they are used with menu items and other submenus. A submenu is a collection of submenus and menu items. Note that submenus can be nested.


Usage

CMenubar *aMenubar = GetMenuBar();

CSubmenu aSubmenu("Window, WINDOW_TAG, 'W',
CMenu::ENABLED);
CMenuItem aMenuItem("~Paste", PASTE_TAG, 'P',
CMenu::ENABLED | CMenu::CHECKABLE);

aSubmenu.Append(aMenuItem);
aSubmenu.Append(aNotShownSubmenu);
aMenuBar->AppendSubmenu(aSubmenu);
aMenuBar->DoUpdate();

CMenu *aMenu = aSubmenu.Find(PASTE_TAG);
BOOLEAN isSep = PtrCast(CMenuItem, aMenu)->
IsSeparator();

Protected Data Members

CSubmenuRep *itsSubmenuRep; An implementation attribute


Public methods

Constructor and Destructor Methods

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

Collection Methods

Collection methods perform deep operations, (i.e., before nested submenus, they automatically find the submenu regardless of where that submenu is located in the submenu hierarchy.)

BOOLEAN Append(const CMenu &theMenu);
BOOLEAN Insert(MENU_TAG theInFrontOfTag, 
const CMenu &theMenu);
BOOLEAN Replace(MENU_TAG theTag, 
const CMenu &theMenu);
BOOLEAN Remove(MENU_TAG theTag);
CMenu* Find(MENU_TAG theTag);
const RWOrdered* GetMenus(void) const;

Protected Methods

void DestructiveHandle(void);


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

support@xvt.com


Visit our online help desk for tech support

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