Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TViewAction
Inherited By:
None.
Purpose:
TBooleanControlAction derives from TViewAction. This action is generated by Boolean controls. It contains the current value of the control, so you don't have to ask the control specifically for it. TViewActions can be handled by the MBooleanControlActionHandler.
The usual event type defined in a TBooleanControlAction is TStandardControlActions::kValueChanged.
Instantiation:
This class is usually allocated on the heap so that it can be posted in a request.
Deriving Classes:
Use TBooleanControlAction to derive classes that have additional information associated with them.
Note that the Dispatch member function attempts to dispatch the action to an MBooleanControlActionHandler first, and if no MBooleanControlActionHandler exists, or it doesn't handle the action, then Dispatch tries to dispatch the action to an MViewActionHandler. This behavior is the same for classes derived from TBooleanControlAction. 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 TBooleanControlAction (if you are also going to dispatch to MBooleanControlActionHandler).
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TBooleanControlAction ()
- TBooleanControlAction (const TEventType & eventType, const TViewHandle & viewHandle, MBooleanControlState :: EBooleanState state, const TSemanticActionType & semanticMessage =TStandardActions :: kDefaultMessage)
- TBooleanControlAction (const TBooleanControlAction &)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a TBooleanControlAction initialized with the specified event, view, Boolean control state, and semantic message.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- Called to create a TBooleanControlAction initialized with the passed parameters.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TEventType & eventType -The event type associated with this action.
- const TViewHandle & viewHandle -Handle to the view with which this action is to be associated.
- MBooleanControlState :: EBooleanState state -The Boolean control state.
- const TSemanticActionType & semanticMessage =TStandardActions :: kDefaultMessage -The message associated with the action.
- const TBooleanControlAction & -The object to copy.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TBooleanControlAction & operator =(const TBooleanControlAction &)
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 ~ TBooleanControlAction ()
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.
MBooleanControlState :: EBooleanState GetState ()
Interface Category:
API.
Purpose:
Returns the current value of the Boolean control associated with this action.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The current value of the Boolean control.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetState (MBooleanControlState :: EBooleanState state)
Interface Category:
API.
Purpose:
Sets the current value of the Boolean control associated with this action.
Calling Context:
Called by the Boolean control that generated this action.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TStream & operator >>=(TStream & toWhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toWhere -The stream the object streams itself out to.
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.
TStream & operator <<= (TStream & fromWhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromWhere -The stream the object streams itself in from.
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.
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 MBooleanControlActionHandler, and then dispatches the action to the MBooleanControlActionHandler. If no MBooleanControlActionHandler 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.