Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TAction
Inherited By:
TBooleanControlAction
TFloatControlAction
TGUIDialogControllerViewAction
TMenuAction
TTextControlAction
Purpose:
TViewAction is a class that represents specific actions on a view.
Instantiation:
Allocate on the stack or on the heap.
Deriving Classes:
Derive classes from TViewAction to add your own information to the provided event type, view handle, and semantic action.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TViewAction ()
- TViewAction (const TEventType & eventType, const TViewHandle & viewHandle, const TSemanticActionType & semanticMessage =TStandardActions :: kDefaultMessage)
- TViewAction (const TViewAction &)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a TViewAction initialized with the specified event, view, and message.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- Called to create a TViewAction initialized with the passed parameters. Call this directly.
- Called to copy an object. Call this directly.
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.
- const TSemanticActionType & semanticMessage =TStandardActions :: kDefaultMessage -The message associated with the action.
- const TViewAction & -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TViewAction::operator=
TViewAction & operator =(const TViewAction &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object. Call this directly.
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 ~ TViewAction ()
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: TViewAction::operator<<=
TStream & operator <<= (TStream & fromWhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data. Can be called by derived class'operator <<=, ::Resurrect, or directly.
Parameters:
- TStream & fromWhere -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.
Member Function: TViewAction::GetEventType
const TEventType & GetEventType () const
Interface Category:
API.
Purpose:
Returns the event type associated with this action.
Calling Context:
Called to return the event type associated with this action. Call this directly.
Parameters:
Return Value:
Returns the event type associated with this action.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TViewAction::SetEventType
virtual void SetEventType (const TEventType & eventType)
Interface Category:
API.
Purpose:
Sets the event type associated with this action.
Calling Context:
Called to set the event type associated with this action. Call this directly.
Parameters:
- const TEventType & eventType -The event type to associate with this action.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TViewAction::GetSender
TViewHandle GetSender () const
Interface Category:
API.
Purpose:
Returns a view handle to the sender of the action.
Calling Context:
Called to obtain a view handle for the sender of the action. Call this directly.
Parameters:
Return Value:
Returns a view handle to the sender of the action.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TViewAction::SetSender
virtual void SetSender (TViewHandle sender)
Interface Category:
API.
Purpose:
Sets the view handle to the sender of the action. This allows the creator of this object to associate it with another object.
Calling Context:
Called to set the view handle for the sender of the action. Call this directly.
Parameters:
- TViewHandle sender -The view handle to be set to the sender of the action.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TViewAction::GetMessage
const TSemanticActionType & GetMessage () const
Interface Category:
API.
Purpose:
Returns the message associated with the action.
Calling Context:
Called to obtain the message associated with the action. Call this directly.
Parameters:
Return Value:
Returns a reference to the message associated with the action.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TViewAction::SetMessage
virtual void SetMessage (const TSemanticActionType & message)
Interface Category:
API.
Purpose:
Sets the message associated with the action.
Calling Context:
Called to set the message associated with the action. Call this directly.
Parameters:
- const TSemanticActionType & message -The message to associate with this action.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TViewAction::Dispatch
virtual bool Dispatch (MActionTarget & target)
Interface Category:
API.
Purpose:
Dispatches the action to the specified target if the target can be dynamically cast to a MViewActionHandler. If MViewActionHandler::HandleViewAction returns false or if the target cannot be cast to an MViewActionHandler, TAction::Dispatch is called.
Calling Context:
Called to dispatch this action. Usually called from action target HandleActionDispatch or action derived class Dispatch.
Parameters:
Return Value:
Returns the value, true or false, returned by the either HandleViewAction or Dispatch.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TViewAction::operator>>=
TStream & operator >>=(TStream & toWhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data. Can be called by derived class' operator >>=, ::Flatten, or directly.
Parameters:
- TStream & toWhere -The destination stream.
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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.