class PCommandSink: public PObject

This class represents a command sink.

Inheritance:


Public Methods

[more] PCommandSink ()
This constructor is used for instances created by the declaration macros within the window class.
[more]virtual void Execute ( PTitledWindow * wind ) const
Execute the command.
[more]virtual BOOL Enabled ( PTitledWindow * wind ) const
Determine the commands enable state.
[more]virtual PINDEX Value ( PTitledWindow * wind ) const
Determine the commands value state.

Protected Methods

[more] PCommandSink ( const char * className, const char * commandName )
Register the command name which is attached to the specific window class.


Inherited from PObject:

Public

Run Time Type functions

Comparison functions

I/O functions

Miscellaneous functions


Documentation

This class represents a command sink. This works in conjunction with the PCommandSource and PCommandManager classes to implement dynamically bound commands on PTopLevelWindow or PMDIDocWindow classes.

The user does not directly create descendents of this abstract class. These are created by a series of macros that are used in the declaration of the users PTopLevelWindow or PMDIDocWindow class descendent.

To create a command sink, use one of the following macros: PDECLARE_COMMAND_X PDECLARE_COMMAND_XE PDECLARE_COMMAND_XS PDECLARE_COMMAND_XES PDECLARE_COMMAND PDECLARE_COMMAND_ENABLE PDECLARE_COMMAND_VALUE PDECLARE_COMMAND_FULL

o PCommandSink()
This constructor is used for instances created by the declaration macros within the window class. There is actually no instance data it is merely a place holder for the virtual function call.

ovirtual void Execute( PTitledWindow * wind ) const
Execute the command. The overridden version of this function will execute the member function on the wind parameter. The override and code to do this is generated by the command declaration macros.
Parameters:
wind - Window instance to receive the command.

ovirtual BOOL Enabled( PTitledWindow * wind ) const
Determine the commands enable state. The overridden version of this function will execute the member function on the wind parameter. The override and code to do this is generated by the command declaration macros.
Parameters:
wind - Window instance to receive the command.

ovirtual PINDEX Value( PTitledWindow * wind ) const
Determine the commands value state. The overridden version of this function will execute the member function on the wind parameter. The override and code to do this is generated by the command declaration macros.
Parameters:
wind - Window instance to receive the command.

o PCommandSink( const char * className, const char * commandName )
Register the command name which is attached to the specific window class. This allows the same command, eg "save", to have a different implementation depending on the class of the window, eg when several different types of MDI child window are used.
Parameters:
className - Name of the window class that the command sink descendent was declared within.
commandName - Arbitrary name of the command.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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