Class: MTextControlActionHandler

Declaration: TextControlActions.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

Mixin for handling actions generated by text controls. Typically (though not necessarily) mixed in to classes along with MActionTarget. Provides the HandleTextControlAction function which the mixing-in derived class overrides to deal with text control actions. This class does not have to be mixed in to TView derived classes; any class may mix this class in. Also, MActionTarget is not required to be mixed in with classes which mix this class in.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None, you mix this into your action handling classes.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

In your mixing-in derived class, you will need to include a call to DynamicCastDeclarationsMacro in the class declaration, and use one of the DynamicCastDefinitionsMacro when you define your class' member functions. The DynamicCastDefinitionsMacro must mention this class' name as one of the ancestors in order for the HandleTextControlAction function to be a candidate for invocation.

Member Function: MTextControlActionHandler::~MTextControlActionHandler

virtual ~ MTextControlActionHandler ()

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: MTextControlActionHandler::HandleTextControlAction

virtual bool HandleTextControlAction (TTextControlAction & action)

Interface Category:

API.

Purpose:

Handles a text control action. You can do anything you like with the action, including changing the message, the sending control, the event type, etc., and continue its propagation.

Calling Context:

Called by the framework when a TTextControlAction (or a derived class thereof) is the action being dispatched and this class has been mixed in.

Parameters:

Return Value:

Returns true if you want to signal the framework that you have successfully handled the action, and you do not want the action to be further propagated, forwarded, or given to other handlers.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: MTextControlActionHandler::MTextControlActionHandler

MTextControlActionHandler ()

Interface Category:

API.

Purpose:

Default constructor.

Calling Context:

Called by the stream-in operators and called during construction of concrete derived classes.

Parameters:

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.