Class: TDelegatingMouseTool

Declaration: MouseCursorTools.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TTool, MMouseEventHandler

Inherited By:

TStandardArrowTool

Purpose:

TDelegatingMouseTool allows mouse tools to bind directly to a tool target without a cursor tool interactor. TDelegatingMouseTool is used when the action of the tool can only be defined by the target of the tool, rather than tool itself.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Derive classes from TDelegatingMouseTool to create a tool to act on views which contain their own interactor.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TDelegatingMouseTool::TDelegatingMouseTool

  1. TDelegatingMouseTool ()
  2. TDelegatingMouseTool (const TDelegatingMouseTool &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

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

virtual ~ TDelegatingMouseTool ()

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: TDelegatingMouseTool::operator=

TDelegatingMouseTool & operator =(const TDelegatingMouseTool &)

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: TDelegatingMouseTool::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: TDelegatingMouseTool::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: TDelegatingMouseTool::SetToolView

virtual void SetToolView (const TViewHandle &)

Interface Category:

API.

Purpose:

Sets the tool view associated with this tool.

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: TDelegatingMouseTool::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: TDelegatingMouseTool::GetHint

virtual TToken GetHint () const

Interface Category:

API.

Purpose:

Returns a hint about which delegating tool is associated with the view's interactor.

Calling Context:

Called by TDelegatingMouseTool::MouseDown so the correct hint can be passed as a parameter when calling MToolHandler::CreateToolInteractor. Call this function directly.

Parameters:

Return Value:

Returns a hint about which delegating tool is associated with the view's interactor.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Deriving classes should implement this member function.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.