Class: TSimpleTextToolInteractor

Declaration: TextToolsCore.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TToolInteractor, MMouseEventHandler

Inherited By:

None.

Purpose:

TSimpleTextToolInteractor is derived from TToolInteractor and MMouseEventHandler. It is an interactor that gives selection feedback in the highlight color, and applies a text command at the end of the interaction to all the text selected. The command is either a TCommandOn<MTextSelection> or a TCommandOn<TTextPresenterStateSelection> . A TSimpleTextToolInteractor object is created by a call to the CreateInteractor function of a TSimpleTextTool object.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

This class is designed to be used directly.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TSimpleTextToolInteractor::TSimpleTextToolInteractor

  1. TSimpleTextToolInteractor (MToolHandler * handlerAlias, TTextToolInteractionTarget * targetToAdopt, TCommandOn < MTextSelection > * commandToAdopt, TColor * colorToAdopt)
  2. TSimpleTextToolInteractor (const TSimpleTextToolInteractor & interactor)

Interface Category:

API.

Purpose:

  1. Constructs a simple text tool interactor with the specified tool handler, target, TCommandOn < MTextSelection > command to execute, and color.
  2. Copy constructor.

Calling Context:

  1. Typically not called directly by clients.
  2. Typically not called directly by clients.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSimpleTextToolInteractor::~TSimpleTextToolInteractor

virtual ~ TSimpleTextToolInteractor ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Typically not called directly by clients.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSimpleTextToolInteractor::MouseDown

virtual bool MouseDown (TMouseDownEvent & mouseDown)

Interface Category:

API.

Purpose:

Handles the event that occurs when the user pushes down the mouse button. Sets up for the mouse dragging to follow. Creates a text tool interaction target selection at the mouse-down position, and sets the text selection color.

Calling Context:

Typically not called directly by clients.

Parameters:

Return Value:

Returns true when finished handling the event.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited MMouseEventHandler function.

Member Function: TSimpleTextToolInteractor::MouseUp

virtual bool MouseUp (TMouseUpEvent & mouseUp)

Interface Category:

API.

Purpose:

Handles the event that occurs when the user lets the mouse button up. Extends the text tool interaction target selection based on the mouse up position. Applies the MTextSelection or TTextPresenterStateSelection command to the selected text. For MTextSelection commands, computes the final position of the mouse and sets an insertion point at the computed location. For presenter state commands, accepts the selection that results from executing the command.

Calling Context:

Typically not called directly by clients.

Parameters:

Return Value:

Returns true when finished handling the event.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited MMouseEventHandler function.

Member Function: TSimpleTextToolInteractor::MouseMoved

virtual bool MouseMoved (TMouseMovedEvent & mouseMoved)

Interface Category:

API.

Purpose:

Tracks mouse movement for click and drag behavior. Extends the text tool interaction target selection based on the current position of the mouse.

Calling Context:

Typically not called directly by clients.

Parameters:

Return Value:

Returns true when finished handling the event.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited MMouseEventHandler function.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.