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.
- TSimpleTextToolInteractor (MToolHandler * handlerAlias, TTextToolInteractionTarget * targetToAdopt, TCommandOn < MTextSelection > * commandToAdopt, TColor * colorToAdopt)
- TSimpleTextToolInteractor (const TSimpleTextToolInteractor & interactor)
Interface Category:
API.
Purpose:
- Constructs a simple text tool interactor with the specified tool handler, target, TCommandOn < MTextSelection > command to execute, and color.
- Copy constructor.
Calling Context:
- Typically not called directly by clients.
- 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.
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.
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:
- TMouseDownEvent & mouseDown -The mouse-down event to that caused this function to be called.
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.
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:
- TMouseUpEvent & mouseUp -The mouse-up event to that caused this function to be called.
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.
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:
- TMouseMovedEvent & mouseMoved -The mouse-moved event to that caused this function to be called.
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.