Class: TFloatActionState

Declaration: ActionControlStates.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MFloatControlState, MControlActionState

Inherited By:

TSeekActionState TVolumeActionState

Purpose:

TFloatActionState is a class that reports changes to float controls.

Instantiation:

Always allocate on the heap.

Deriving Classes:

Derive from this class if you wanted to add information to the float control action or do some other behavior in addition to posting the action. When plugged into a float control, it is called like any other MFloatControlState. When SetFloatValue is called, it sends a float 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: TFloatActionState::TFloatActionState

  1. TFloatActionState (TViewHandle floatControl, bool continuousActions =false, const TSemanticActionType & message =TStandardActions :: kDefaultMessage)
  2. TFloatActionState (const TFloatActionState & copy)
  3. TFloatActionState ()

Interface Category:

API.

Purpose:

  1. Constructs a usable TFloatActionState instance.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. Called to construct a usable TFloatActionState.
  2. Called to copy an object.
  3. Called by the stream-in operators.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFloatActionState::operator=

TFloatActionState & operator =(const TFloatActionState & 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: TFloatActionState::~TFloatActionState

virtual ~ TFloatActionState ()

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

virtual TStream & operator >>=(TStream & output) 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: TFloatActionState::operator<<=

virtual TStream & operator <<= (TStream & input)

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: TFloatActionState::SetFloatValue

virtual void SetFloatValue (double newValue)

Interface Category:

API.

Purpose:

Sets the value of the control. If this control state is marked as continuous, a TFloatControlAction with event type TStandardControlActions::kValueChanged is generated and distributed.

Calling Context:

Called by the float control that references or owns the TFloatActionState when the control value is being changed interactively. You could override this to do some more work, then called inherited SetFloatValue to let it post the action. Override CreateFloatAction to change only the action that is created.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFloatActionState::GetFloatValue

virtual double GetFloatValue () const

Interface Category:

API.

Purpose:

Gets the current value of the control.

Calling Context:

Called to find out the current value of the control.

Parameters:

Return Value:

Floating point value of the control.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFloatActionState::GetFloatConstraints

virtual void GetFloatConstraints (double & minimum, double & maximum, double & intervalSize) const

Interface Category:

API.

Purpose:

Gets the range and step size of the control.

Calling Context:

Called by the control to find out the range and step size associated with the control, for constraining the value.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFloatActionState::SetFloatConstraints

virtual void SetFloatConstraints (const double & minimum, const double & maximum, const double & intervalSize)

Interface Category:

API.

Purpose:

Sets the constraints on the float control's value. Call this function directly.

Calling Context:

Called to change the constraints on the float control's value.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFloatActionState::CreateFloatAction

virtual TFloatControlAction * CreateFloatAction (const TEventType & eventType, const TViewHandle & viewHandle, double value, const TSemanticActionType & semanticMessage =TStandardActions :: kDefaultMessage, TMemoryHeap * whichHeap =NIL)

Interface Category:

API.

Purpose:

Creates a float action for this action state.

Calling Context:

Called from SetFloatValue to create a float action for this action state. Override this function to create a different kind of float action.

Parameters:

Return Value:

A pointer to the action that was created.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFloatActionState::StartInteraction

virtual void StartInteraction ()

Interface Category:

API.

Purpose:

Begins interaction with the float control associated with this object.

Calling Context:

Called by the float control to begin interaction with the float control associated with this object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFloatActionState::SetContinuousActions

virtual void SetContinuousActions (bool continuousActions)

Interface Category:

API.

Purpose:

Enables or disables the continuous action of this float control.

Calling Context:

Called to enable or disable the continuous action of this float control. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFloatActionState::GetContinuousActions

bool GetContinuousActions ()

Interface Category:

API.

Purpose:

Returns true if continuous action is enabled for this control.

Calling Context:

Called by the float control to determine if continuous action is enabled for this control.

Parameters:

Return Value:

Returns true if continuous action is enabled for this control.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFloatActionState::EndInteraction

virtual void EndInteraction (bool cancelled)

Interface Category:

API.

Purpose:

Ends the interaction with the float control associated with this object. The parameter cancelled may be set to true to indicate that the interaction was canceled.

Calling Context:

Called by the float control to begin interaction with the float control associated with this object.

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.