Class: TTextControlAction

Declaration: TextControlActions.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TViewAction

Inherited By:

None.

Purpose:

Provides a base class for the actions generated by text controls adding state information about whether the text control is empty or not. TTextActionControlState generates these actions when the text control becomes empty and non-empty.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Classes deriving from TTextControlAction usually add state information and override Dispatch to try and dynamically cast the target to a specific type of handler so that they can dispatch to that handler. If this dynamic cast fails, then derived classes usually call the inherited Dispatch member function. Dynamic casting is provided by the dynamic cast macros, so derived classes need to ensure correct use of these macros.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TTextControlAction::IsEmpty

static bool IsEmpty (const TViewAction & action)

Interface Category:

API.

Purpose:

Queries whether the text control is empty.

Calling Context:

Called by a client of the action.

Parameters:

Return Value:

Returns true if the action was generated as a result of the text control becoming empty.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextControlAction::IsNotEmpty

static bool IsNotEmpty (const TViewAction & action)

Interface Category:

API.

Purpose:

Query whether the text control is not empty.

Calling Context:

Called by a client of the action.

Parameters:

Return Value:

Returns true if the action was generated as a result of the text control becoming non-empty.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextControlAction::TTextControlAction

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

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. The constructor that is usually used to initialize a new text control action.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and by derived classes.
  2. Normally used to create a new text control action.
  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: TTextControlAction::operator=

TTextControlAction & operator =(const TTextControlAction &)

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

virtual ~ TTextControlAction ()

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: TTextControlAction::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: TTextControlAction::Dispatch

virtual bool Dispatch (MActionTarget & target)

Interface Category:

API.

Purpose:

Dispatches the action to the given target. TTextControlAction attempts to dynamically cast to MTextControlActionHandler, and if successful, it will call the HandleTextControlAction() member function on the handler, otherwise it will delegate to the inherited TViewAction::Dispatch() member function.

Calling Context:

Called when an action is being distributed.

Parameters:

Return Value:

Returns true if the target handled the action.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextControlAction::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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.