[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

 

LCmdEnablerAttachment



Overview:

LCmdEnablerAttachment is a PowerPlant class that is used for coupling commands and updating chores in PowerPlant object relationships.

Methods :

The methods in this class are:

 

LCmdEnablerAttachment()  
ExecuteSelf()  

Data Members:

The data members in this class are:

 

mCmdToEnable  
 

Operation:

This Attachment responds to the msg_CommandStatus message. When you create the Attachment, you also specify the command that should be enabled.. When it executes, this Attachment enables the menu item associated with the command. It also prevents the host from executing, because it has already enabled the related command. It does not do any item manipulation such as setting a mark in the menu.

You can uset shi Attachment as a model for handling other updating tasks. For example, you might create a check mark Attachment that puts a check mark in front of a menu item.

Source files:

(Utility Classes)

UAttachments.h

UAttachments.cp

See also:

LAttachment

LPane

LCmdEnablerAttachment()

Purpose:

The constructor creates the object containing the passed-in parameters.

Access:

Public

Prototype:

LCmdEnablerAttachment( CommandT inCmdToEnable );

LCmdEnablerAttachment( LStream* inStream );
Parameters:

The parameters for these constructors are:

 

CommandT  
inCmdToEnable  
A command that we want to enable.  
LStream*  
inStream  
A pointer to a stream object that contains the information to create the LCmdEnablerAttachment object.  

ExecuteSelf()

Purpose:

This method decides whether to enable the command, then sets mExecuteHost appropriately. This is an override of ExecuteSelf() in LAttachment.

mCmdToEnable

Purpose:

This member holds the value of the command for which we want to control enabling behavior.

Access:

Protected

Prototype:

CommandT mCmdToEnable;

 


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: July 21, 2000