Class: TMomentaryActionControlState

Declaration: ActionControlStates.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MMomentaryControlState, MControlActionState

Inherited By:

TMomentaryMenuActionControlState

Purpose:

TMomentaryActionControlState is a class that can be used by TMomentaryControls as the control state. TMomentaryActionControlState generates a view action when the Select member function is called.

Instantiation:

Always allocate on the heap.

Deriving Classes:

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

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TMomentaryActionControlState::TMomentaryActionControlState

  1. TMomentaryActionControlState (TViewHandle momentaryControl, const TSemanticActionType & message =TStandardActions :: kDefaultMessage)
  2. TMomentaryActionControlState (const TMomentaryActionControlState &)
  3. TMomentaryActionControlState ()

Interface Category:

API.

Purpose:

  1. Constructs a TMomentaryActionControlState that may be adopted.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. Called to construct an instance which is then adopted into a control.
  2. Called to copy an object.
  3. Called by the stream-in operators, and possibly in cases where either the control or the message is not known at construction time.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMomentaryActionControlState::operator=

TMomentaryActionControlState & operator =(const TMomentaryActionControlState &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMomentaryActionControlState::~TMomentaryActionControlState

virtual ~ TMomentaryActionControlState ()

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: TMomentaryActionControlState::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: TMomentaryActionControlState::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: TMomentaryActionControlState::Select

virtual void Select ()

Interface Category:

API.

Purpose:

Generates and queues for propagation a TViewAction object with the given control handle as the initial target and with the given message. The action event type is TStandardControlActions::kSelect.

Calling Context:

Called by the control that references or owns the TMomentaryActionControlState to handle the control being selected, such as when a button is pressed. You could override this to do some more work, then called inherited Select 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.