Class: TSimpleMouseTool

Declaration: MouseCursorTools.h

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.

Member Function: TSimpleMouseTool::TSimpleMouseTool

  1. TSimpleMouseTool ()
  2. TSimpleMouseTool (const TTypeDescription &)
  3. TSimpleMouseTool (const TSimpleMouseTool &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a TSimpleMouseTool for the specified tool target.
  3. Copy constructor.

Calling Context:

  1. Called to create a TSimpleMouseTool suitable for streaming into.
  2. Called to create a TSimpleMouseTool for a specific tool target.
  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: TSimpleMouseTool::~TSimpleMouseTool

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.

Member Function: TSimpleMouseTool::operator=

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.

Member Function: TSimpleMouseTool::operator>>=

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.

Member Function: TSimpleMouseTool::operator<<=

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.

Member Function: TSimpleMouseTool::SetToolView

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSimpleMouseTool::MouseDown

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.