class PSubMenu: public PMenuEntry

A class representing a list of menu entries.

Inheritance:


Public Fields

[more]PString title
Menu title.

Public Methods

[more] PSubMenu ( PSubMenu & menu, const PString & itemName, PMenuEntry * before = NULL )
Create a new sub-menu in a hierarchical menu system.
[more]virtual ~PSubMenu ()
Destroy the menu and all its menu entries.
[more]virtual void SetString ( const PString & str )
Set the string contents of the menu item.
[more]virtual PString GetString () const
Get the current string name of the menu entry.
[more]PINDEX GetSize () const
Get the count of the number of entries contained in this sub-menu.
[more]virtual PMenuEntry& operator[] ( PINDEX index )
Get the menu entry at the specified position.
[more] PSubMenu ()
Contructor for top level menues, PRootMenu class.

Public

[more] Overrides from class PMenuEntry
[more] New functions for class

Protected Fields

[more]MenuEntryList entries
List of menu items in the menu.

Protected Methods

[more]virtual void UpdateMyCommandSources ()
Scan through all menu items in the menu and execute their notification function to enable or disable and check or uncheck the menu item.

Protected

[more] New functions for class
[more] Member variables


Inherited from PMenuEntry:

Public Methods

ovirtual Comparison Compare( const PObject & obj ) const
oPSubMenu* GetMenu() const
oPRootMenu* GetRootMenu() const
oPINDEX GetPosition() const
ovirtual BOOL IsMenuItemCheckGroup(const PMenuItem & groupItem) const

Public

Overrides from PObject

Protected Fields

oPSubMenu* itsMenu


Inherited from PObject:

Public

Run Time Type functions

Comparison functions

I/O functions

Miscellaneous functions


Documentation

A class representing a list of menu entries. An instance of a sub-menu, rather than a PRootMenu which is descended from it, is a heirarchical menu supported by most platforms.
o PSubMenu( PSubMenu & menu, const PString & itemName, PMenuEntry * before = NULL )
Create a new sub-menu in a hierarchical menu system. Place the new sub-menu in the menu specified.
Parameters:
menu - Menu into which the new entry is to be placed.
itemName - Name of the sub-menus title.
before - Menu entry before which the entry is to be inserted. If this is NULL then the menu entry is appended to the end of the menu.

ovirtual ~PSubMenu()
Destroy the menu and all its menu entries.

o Overrides from class PMenuEntry

ovirtual void SetString( const PString & str )
Set the string contents of the menu item. This string is scanned for the special character '&' to place an underline attribute on the next character.

Parameters:
str - New string for the menu entry.

ovirtual PString GetString() const
Get the current string name of the menu entry.

If a top level menu, PRootMenu class, then this returns an empty string.

Returns:
string for the menu item name.

o New functions for class

oPINDEX GetSize() const
Get the count of the number of entries contained in this sub-menu.

Returns:
number of entries in sub-menu.

ovirtual PMenuEntry& operator[]( PINDEX index )
Get the menu entry at the specified position. If the parameter is beyond the number of entries in the sub-menu then this function will assert.

Returns:
reference to the menu entry at the index position.
Parameters:
index - Ordinal index of the menu entry in the sub-menu.

o New functions for class

o PSubMenu()
Contructor for top level menues, PRootMenu class.

ovirtual void UpdateMyCommandSources()
Scan through all menu items in the menu and execute their notification function to enable or disable and check or uncheck the menu item.

For a sub-menu item this calls the UpdateMyCommandSources() function for all its menu entries.

This function is used internally by the library. It would normally not be called directly.

o Member variables

oPString title
Menu title.

oMenuEntryList entries
List of menu items in the menu.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.