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.
- TFloatActionState (TViewHandle floatControl, bool continuousActions =false, const TSemanticActionType & message =TStandardActions :: kDefaultMessage)
- TFloatActionState (const TFloatActionState & copy)
- TFloatActionState ()
Interface Category:
API.
Purpose:
- Constructs a usable TFloatActionState instance.
- Copy constructor.
- Default constructor.
Calling Context:
- Called to construct a usable TFloatActionState.
- Called to copy an object.
- Called by the stream-in operators.
Parameters:
- TViewHandle floatControl -The initial control that the action distribution will use.
- bool continuousActions =false -Determines if the control generates actions for all intermediate values or only for the final value.
- const TSemanticActionType & message -The message to include in the action.
- const TFloatActionState & copy -The object to be copied.
- Takes no parameters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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.
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.
virtual TStream & operator >>=(TStream & output) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & output -The destination stream.
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.
virtual TStream & operator <<= (TStream & input)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & input -The source stream.
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.
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:
- double newValue -The new value of the float control, included in the action.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- double & minimum -The minimum allowable value. The default is 0.0.
- double & maximum -The maximum allowable value. The default is 1.0.
- double & intervalSize -The step size for the value. The default value of zero indicates completely continuous values.
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:
- const double & minimum -The minimum allowable value.
- const double & maximum -The maximum allowable value.
- const double & intervalSize -The step size.
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:
- const TEventType & eventType -The event type associated with the action.
- const TViewHandle & viewHandle -The view associated with the action.
- double value -The value associated with the action.
- const TSemanticActionType & semanticMessage =TStandardActions :: kDefaultMessage -The message associated with the action.
- TMemoryHeap * whichHeap =NIL -The heap on which to create the action. If NIL, the default heap is used.
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:
- bool continuousActions -If set to true, continuous action of this float control is enabled. If set to false, continuous action is disabled.
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.
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:
- bool cancelled -If set to true, this serves as an indication that the interaction was canceled.
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.