class PMenuEntry: public PObject

A abstract class representing an entry in a menu.

Inheritance:


Public Methods

[more] PMenuEntry ( PSubMenu & menu, PMenuEntry * before )
Create a menu entry.
[more]virtual ~PMenuEntry ()
Destroy the menu entry.
[more]virtual Comparison Compare ( const PObject & obj ) const
Determine if the two menu entry objects are the "same".
[more]virtual void SetString ( const PString & str )
Set the string name of the menu entry.
[more]virtual PString GetString () const
Get the current string name of the menu entry.
[more]PSubMenu* GetMenu () const
Get the menu this entry is contained in.
[more]PRootMenu* GetRootMenu () const
Get the top most menu of the tree of sub-menus that the entry is contained in.
[more]PINDEX GetPosition () const
Get the position in the menu of this entry.
[more]virtual BOOL IsMenuItemCheckGroup (const PMenuItem & groupItem) const
Determine if the menu entry is in a menu item check group.

Public

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

Protected Fields

[more]PSubMenu* itsMenu
The menu that this entry is contained in.

Protected Methods

[more] PMenuEntry ()
Internal constructor for root menus.
[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.


Inherited from PObject:

Public

Run Time Type functions

Comparison functions

I/O functions

Miscellaneous functions


Documentation

A abstract class representing an entry in a menu. A menu entry may be a menu item that may be selected by the user, a menu separator or a sub-menu of more menu entries.
o PMenuEntry( PSubMenu & menu, PMenuEntry * before )
Create a menu entry. This places the new menu entry into the menu specified at the position specified.
Parameters:
menu - Menu into which the new entry is to be placed.
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 ~PMenuEntry()
Destroy the menu entry.

o Overrides from PObject

ovirtual Comparison Compare( const PObject & obj ) const
Determine if the two menu entry objects are the "same".

Returns:
EqualTo if the two menus entries have the same position in the same menu, otherwise GreaterThan.
Parameters:
obj - Menu entry to compare against.

o New functions for class

ovirtual void SetString( const PString & str )
Set the string name of the menu entry. The specific descendent class determines what the string is. For example in a separator this does nothing but in a menu item it is the text representation of the menu item.
Parameters:
str - New string for the menu entry.

ovirtual PString GetString() const
Get the current string name of the menu entry. The specific descendent class determines what the string is. For example in a separator this does nothing but in a menu item it is the text representation of the menu item.

Returns:
string for the menu entry.

oPSubMenu* GetMenu() const
Get the menu this entry is contained in.

Returns:
pointer to owner menu.

oPRootMenu* GetRootMenu() const
Get the top most menu of the tree of sub-menus that the entry is contained in.

Returns:
root menu for entry.

oPINDEX GetPosition() const
Get the position in the menu of this entry. This first entry is at zero.

Returns:
ordinal index position in the menu for the entry.

ovirtual BOOL IsMenuItemCheckGroup(const PMenuItem & groupItem) const
Determine if the menu entry is in a menu item check group. If the entry is not a menu item or does not have the same notification function, the qualification for being in a menu check group, then returns FALSE.

Returns:
TRUE if in check group, FALSE otherwise.

o PMenuEntry()
Internal constructor for root menus.

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.

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

oPSubMenu* itsMenu
The menu that this entry is contained in.


Direct child classes:
PSubMenu
PMenuSeparator
PMenuItem

Alphabetic index HTML hierarchy of classes or Java



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