![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TTool, MMouseEventHandler
Inherited By:
TBasicCanvasGraphicCreationTool
TCanvasCurveCreationTool
TCanvasLineCreationTool
TCanvasPolygonCreationTool
TCanvasPolylineCreationTool
TCanvasTextGraphicCreationTool
TFrameCreationToolFor
THighlightTextTool
TSimpleTextTool
Purpose:
TSimpleMouseTool allows mouse tools to bind to a tool target through a cursor tool interactor. TSimpleMouseTool is used when the action of the tool can be defined in the tool itself, rather than in the tool target.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Derive classes from TSimpleMouseTool to create your own mouse tools.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TSimpleMouseTool ()
- TSimpleMouseTool (const TTypeDescription &)
- TSimpleMouseTool (const TSimpleMouseTool &)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a TSimpleMouseTool for the specified tool target.
- Copy constructor.
Calling Context:
- Called to create a TSimpleMouseTool suitable for streaming into.
- Called to create a TSimpleMouseTool for a specific tool target.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TSimpleMouseTool ()
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.
TSimpleMouseTool & operator =(const TSimpleMouseTool &)
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.
TStream & operator >>=(TStream &) 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.
TStream & operator <<= (TStream &)
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 TGlobalExceptionKludge (kStreamBadVersion) if the version of the streamed in object is not the original version.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetToolView (const TViewHandle &)
Interface Category:
API.
Purpose:
Sets the view with which this tool is associated.
Calling Context:
Called to set the tool view associated with this tool. Called by TToolNegotiator's DispatchEvent function so that the current tool can work on the view that is handling the event.
Parameters:
- const TViewHandle & -The view to associate with this tool.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool MouseDown (TMouseDownEvent &)
Interface Category:
API.
Purpose:
Calls the interactor that handles the event of a mouse button being pressed while the cursor is in this view. False is returned if there is no interactor defined for this event.
Calling Context:
Called by the Input System when a mouse button is pressed while the cursor is in this view.
Parameters:
Return Value:
Returns true if the event was handled.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSimpleMouseTool::CreateInteractor
virtual TToolInteractor * CreateInteractor (MToolTarget * adoptTarget) const
Interface Category:
API.
Purpose:
Creates an interactor for the specified target.
Calling Context:
Called by TSimpleMouseTool::MouseDown to create an interactor for the specified target.
Parameters:
Return Value:
A pointer to the interactor created.
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.