Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_Command Class Reference

Class used to handle a single command. More...

List of all members.

Public Types

enum  {
  CP_E_CH_UseCommandStatus = 1, CP_E_CH_AlwaysEnable = 2, CP_E_CH_AlwaysDisable = 4, CP_E_CH_DisableIfLowMemory = 8,
  CP_E_CH_DisableIfModalDialog = 0x10, CP_E_CH_EnableIfDocWindowTopmost = 0x20
}

Public Member Functions

Constructor / Destructor
 CP_Command ()
 Constructor.
 CP_Command (const CP_Command &inCommand)
 ~CP_Command ()
 Destructor.
Getters
CP_CommandNo GetCommand ()
SInt32 GetCommandFlags ()
CP_CommandHandlerSignalGetCommandHandlerSignal ()
CP_CommandStatusSignalGetCommandStatusHandlerSignal ()
Operators
CP_Commandoperator= (const CP_Command &inCommand)
Setters
void SetCommand (CP_CommandNo inCommand)
void SetCommandFlags (SInt32 inFlags)
void SetCommandHandlerSignal (CP_CommandHandlerSignal *inSignal)
void SetCommandStatusSignal (CP_CommandStatusSignal *inStatusSignal)

Private Attributes

CP_CommandNo fCommand
SInt32 fCommandFlags
CP_CommandHandlerSignalfCommandHandler
CP_CommandStatusSignalfCommandStatus


Detailed Description


Member Enumeration Documentation

anonymous enum
 

Flags used to set and get the status of commands.

Enumeration values:
CP_E_CH_UseCommandStatus  Command uses the CP_CommandStatus class to obtain information.
CP_E_CH_AlwaysEnable  Always enable the commnand.
CP_E_CH_AlwaysDisable  Always disable the command.
CP_E_CH_DisableIfLowMemory  Disable the command because of low memory.
CP_E_CH_DisableIfModalDialog  Disable the command because of a modal dialog being displayed.
CP_E_CH_EnableIfDocWindowTopmost  Enable the command if the top most window is a CPLAT document window.


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_Command::CP_Command  ) 
 

Constructor. Sets all of the fields of this object to their default values. The default valaues for this object are 0, or NULL.

Exceptions:
none 

CP_Command::CP_Command const CP_Command inCommand  ) 
 

Copy constructor. Sets the fields of this object to those of the passed in CP_Command.

Parameters:
inCommand CP_Command to copy the fields from.
Exceptions:
none 

CP_Command::~CP_Command  ) 
 

Destructor.

Exceptions:
none 


Member Function Documentation

CP_CommandNo CP_Command::GetCommand  ) 
 

Returns the CP_CommandNo associated with this command.

Exceptions:
none 
Returns:
CP_CommandNo The CP_CommandNo associated with this command.

SInt32 CP_Command::GetCommandFlags  ) 
 

Returns any flags associated with this command.

Exceptions:
none 
Returns:
SInt32 Flags associated with this command.

CP_CommandHandlerSignal* CP_Command::GetCommandHandlerSignal  ) 
 

Returns the command handler signal associated with this command. This is the signal that will be called when the user selects this command from a menu, or otherwise causes the command number to be sent. The command and signal need to be registered with the CP_CommandHanlingManager first.

Exceptions:
none 
Returns:
CP_CommandHandlerSignal Signal emited with this command.

CP_CommandStatusSignal* CP_Command::GetCommandStatusHandlerSignal  ) 
 

Returns the command status signal associated with this command. This is the signal that will be called whenn the status for this command needs to be updated, such as a menu opening. The command and signal need to be registered with the CP_CommandHanlingManager first. You can use this inplace of the CP_E_CH enumeration above to determine the status of enabled commands, if you need finer control than having a command always enabled or disabled, such as when the state of the command is determined by runtime conditions.

Exceptions:
none 
Returns:
CP_CommandHandlerSignal Signal emited with this command.

CP_Command & CP_Command::operator= const CP_Command inCommand  ) 
 

Assignment operator. Assigns data from the passed in CP_Command.

Parameters:
inCommand CP_Command to copy the fields from.
Exceptions:
none 
Returns:
CP_Command& Returns a reference to ourselves.

void CP_Command::SetCommand CP_CommandNo  inCommand  ) 
 

Sets the CP_CommandNo associated with this command.

Parameters:
inCommand The CP_CommandNo associated with this command.
Exceptions:
none 
Returns:
void

void CP_Command::SetCommandFlags SInt32  inFlags  ) 
 

Flags associated with this command and used to determine the status of the command. The flags should be one of the following:

  • CP_E_CH_UseCommandStatus
  • CP_E_CH_AlwaysEnable
  • CP_E_CH_AlwaysDisable
  • CP_E_CH_DisableIfLowMemory
  • CP_E_CH_DisableIfModalDialog
  • CP_E_CH_EnableIfDocWindowTopmost

Parameters:
inFlags Flags associated with this command.
Exceptions:
none 
Returns:
void

void CP_Command::SetCommandHandlerSignal CP_CommandHandlerSignal inSignal  ) 
 

Sets the signal associated with this command when it is selected, or sent by a control.

Parameters:
inSignal Signal sent when this command is selected or sent.
Exceptions:
none 
Returns:
void

void CP_Command::SetCommandStatusSignal CP_CommandStatusSignal inStatusSignal  ) 
 

Sets the signal associated with this command needs to be enabled. This is used when you need finer control than that provided by the SetCommandFlags, such as when the state of a command is dependent upon some runtime conditionn.

Parameters:
inSignal Signal sent when this command status needs updating.
Exceptions:
none 
Returns:
void


Member Data Documentation

CP_CommandNo CP_Command::fCommand [private]
 

SInt32 CP_Command::fCommandFlags [private]
 

CP_CommandNo assigned for this command.

CP_CommandHandlerSignal* CP_Command::fCommandHandler [private]
 

Flags used to find information out about the status of the command.

CP_CommandStatusSignal* CP_Command::fCommandStatus [private]
 

Signal called to handle the command.


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:01:27 2005 for CPLAT by  doxygen 1.4.0