Class: TFloatControlAction

Declaration: StandardControlActions.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TViewAction

Inherited By:

TScrollAction

Purpose:

TFloatControlAction derives from TViewAction. This action is generated by float controls. It contains the value as of the last change to the control, so that you don't have to down cast to the particular control type to get the value out of it, and you can know in your MFloatControlActionHandler that it's a float control that's present in the contained view handle.

Instantiation:

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

Deriving Classes:

Use TFloatControlAction to derive classes that have additional information associated with them. Note that the Dispatch member function attempts to dispatch the action to an MFloatControlActionHandler first, and if no MFloatControlActionHandler exists, or it doesn't handle the action, then Dispatch tries to dispatch the action to an MViewActionHandler. This behavior will be the same for classes derived from TFloatControlAction. 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 TViewAction (if you want to dispatch to your MXxxxActionHandler first, and then to MViewActionHandler), or from TFloatControlAction (if you are also going to dispatch to MFloatControlActionHandler).

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TFloatControlAction::TFloatControlAction

  1. TFloatControlAction ()
  2. TFloatControlAction (const TEventType & eventType, const TViewHandle & viewHandle, double value, const TSemanticActionType & semanticMessage =TStandardActions :: kDefaultMessage)
  3. TFloatControlAction (const TFloatControlAction &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a TFloatControlAction initialized with the specified event, view, value, and semantic message.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to create a TFloatControlAction 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: TFloatControlAction::operator=

TFloatControlAction & operator =(const TFloatControlAction &)

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

virtual ~ TFloatControlAction ()

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: TFloatControlAction::IsSameTypeAs

virtual bool IsSameTypeAs (const TEventType &) const

Interface Category:

API.

Purpose:

Determines whether or not the event type associated with this action is the same as the passed in event type. The event types usually specified in a TFloatControlAction are TFloatControlAction::kCancelledInteraction, TFloatControlAction::kEndInteraction, TFloatControlAction::kBeginInteraction and TStandardControlActions::kValueChanged.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the event types are the same, false otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFloatControlAction::GetValue

double GetValue ()

Interface Category:

API.

Purpose:

Returns the current float control value associated with this action.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The current float control value associated with this action.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFloatControlAction::SetValue

virtual void SetValue (double value)

Interface Category:

API.

Purpose:

Sets the float control value to be associated with this action.

Calling Context:

Called by the float control to specify the current value.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFloatControlAction::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: TFloatControlAction::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: TFloatControlAction::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 MFloatControlActionHandler, and then dispatches the action to the MFloatControlActionHandler. If no MFloatControlActionHandler exists, or it doesn't handle the action, then Dispatch calls the inherited TViewAction Dispatch function, which 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 TViewAction function.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.