Class: TBooleanMenuActionControlState

Declaration: ActionControlStates.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TBooleanActionState

Inherited By:

None.

Purpose:

TBooleanMenuActionControlState sends a Boolean menu action when a Boolean menu item is selected.

Instantiation:

Always allocate on the heap.

Deriving Classes:

Derive from this class if you want to add information to the Boolean action or do some other behavior in addition to posting the action. When plugged into a Boolean menu item, it is called like any other MBooleanControlState.When SetBooleanState is called, it sends a Boolean control action that contains the semantic message passed in at construction.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TBooleanMenuActionControlState::TBooleanMenuActionControlState

  1. TBooleanMenuActionControlState (TViewHandle targetView, MMenuItem * itemToAlias, const TSemanticActionType & message =TStandardActions :: kDefaultMessage)
  2. TBooleanMenuActionControlState (TMenu * targetToAlias, MMenuItem * itemToAlias, const TSemanticActionType & message =TStandardActions :: kDefaultMessage)
  3. TBooleanMenuActionControlState (const TBooleanMenuActionControlState & copy)
  4. TBooleanMenuActionControlState ()

Interface Category:

API.

Purpose:

  1. Constructs a usable instance associated with a TView.
  2. Construct a usable instance associated with a TMenu.
  3. Copy constructor.
  4. Default constructor.

Calling Context:

  1. Called to construct an instance for a TView which can then be adopted into a TBooleanMenuItem.
  2. Called to construct an instance for a TMenu which can then be adopted into a TBooleanMenuItem.
  3. Called to copy an object.
  4. Called by the stream-in operators and when the requisite information is not available.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanMenuActionControlState::operator=

TBooleanMenuActionControlState & operator =(const TBooleanMenuActionControlState & assign)

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: TBooleanMenuActionControlState::~TBooleanMenuActionControlState

virtual ~ TBooleanMenuActionControlState ()

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: TBooleanMenuActionControlState::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

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

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanMenuActionControlState::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

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

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanMenuActionControlState::GetMenuItem

MMenuItem * GetMenuItem ()

Interface Category:

API.

Purpose:

Gets the menu item associated with this state.

Calling Context:

Called to obtain the menu item for this state.

Parameters:

Return Value:

An alias to the item that will be included in generated actions.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanMenuActionControlState::SetMenuItem

virtual void SetMenuItem (MMenuItem * itemAlias)

Interface Category:

API.

Purpose:

Specifies the menu item alias to be used in generated actions.

Calling Context:

Called to set or change the menu item referenced by generated actions.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBooleanMenuActionControlState::SetBooleanState

virtual void SetBooleanState (EBooleanState state)

Interface Category:

API.

Purpose:

Creates a TBooleanMenuAction object and queues it for propagation. The initial view for the propagation is the menu associated with the item that owns the control state. If the action is not handled by the menu, it is passed up the view hierarchy for the menu. If the top if the hierarchy is reached and the action still has not been handled, it is passed up the menu hierarchy, if one exists, otherwise it is forwarded to the presenter that owns the menu. The action generated is TStandardControlActions::kValueChanged.

Calling Context:

Called by the menu item that references or owns the TBooleanMenuActionControlState when the menu item is selected. You could override this to do some more work, then called inherited SetBooleanState to let it post the action.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

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