Class: TBooleanMenuAction

Declaration: StandardControlActions.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TMenuAction

Inherited By:

None.

Purpose:

TBooleanMenuAction derives from TMenuAction. It is generated by menu items that have a Boolean state associated with them. The usual event type defined in a TBooleanMenuAction is TStandardControlActions::kValueChanged.

Instantiation:

This class is usually allocated on the heap so that it can be posted in a request.

Deriving Classes:

Use TBooleanMenuAction to derive classes that have additional information associated with them. Note that the Dispatch member function attempts to dispatch the action to an MBooleanMenuActionHandler first, and if no MBooleanMenuActionHandler exists, or it doesn't handle the action, then Dispatch tries to dispatch the action to an MMenuActionHandler. If this doesn't exist, or doesn't handle the action, Dispatch tries to dispatch the action to MViewActionHandler. This behavior will be the same for classes derived from TBooleanMenuAction. If you want to change this behavior, for example, if you have your own MXxxxActionHandler mixin, then you need to derive a class either directly from TMenuAction (if you want to dispatch to your MXxxxActionHandler first, and then to MMenuActionHandler, and finally to MViewActionHandler), or from TBooleanMenuAction (if you are also going to dispatch to MBooleanMenuActionHandler).

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TBooleanMenuAction::TBooleanMenuAction

  1. TBooleanMenuAction ()
  2. TBooleanMenuAction (const TEventType & eventType, const TViewHandle & viewHandle, MMenuItem * itemAlias, MBooleanControlState :: EBooleanState state, const TSemanticActionType & semanticMessage =TStandardActions :: kDefaultMessage)
  3. TBooleanMenuAction (const TBooleanMenuAction &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a TBooleanMenuAction initialized with the specified event, view, menu item ID, Boolean state, and semantic message.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to create a TBooleanMenuAction initialized with the passed parameters.
  3. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanMenuAction::operator=

TBooleanMenuAction & operator =(const TBooleanMenuAction &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanMenuAction::~TBooleanMenuAction

virtual ~ TBooleanMenuAction ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanMenuAction::GetState

MBooleanControlState :: EBooleanState GetState ()

Interface Category:

API.

Purpose:

Returns the current value of the Boolean state associated with this action.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The current value of the Boolean state.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanMenuAction::SetState

virtual void SetState (MBooleanControlState :: EBooleanState state)

Interface Category:

API.

Purpose:

Sets the current value of the Boolean state associated with this action.

Calling Context:

Called by class that generated this action.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanMenuAction::operator>>=

TStream & operator >>=(TStream & toWhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanMenuAction::operator<<=

TStream & operator <<= (TStream & fromWhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanMenuAction::Dispatch

virtual bool Dispatch (MActionTarget & target)

Interface Category:

API.

Purpose:

Dispatches the action to the specified target. First attempts to dynamically cast the target to an MBooleanMenuActionHandler, and then dispatches the action to the MBooleanMenuActionHandler. If no MBooleanMenuActionHandler exists, or it doesn't handle the action, then Dispatch calls the inherited TMenuAction Dispatch function, which tries to dispatch the action to an MMenuActionHandler. If this doesn't exist, or doesn't handle the action, then the TMenuAction Dispatch function tries to dispatch the action to an MViewActionHandler.

Calling Context:

Called to dispatch this action.

Parameters:

Return Value:

Returns true if the action was successfully dispatched, false otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited TMenuAction function.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.