Class: TCanvasDragInteractor

Declaration: CanvasInteraction.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TCanvasInteractor

Inherited By:

TCanvasGraphicRotatingInteractor TCanvasGraphicScalingInteractor TCanvasGraphicTranslatingInteractor TCanvasLineDragInteractor TCanvasPolylineDragInteractor TCanvasRectDragInteractor TCanvasTextGraphicCreationInteractor

Purpose:

Models a drag style interaction. Drag interaction begins with a mouse down, continues with subsequent mouse moves, and ends with a mouse up. Derived classes implement how each stage of interaction is used to accomplish a specific task, such as do a command. Derived classes also implement drawing of feedback if required.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Abstract base class; must be derived. Intended to be derived for drag style interaction, such as line or curve creation.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TCanvasDragInteractor::TCanvasDragInteractor

TCanvasDragInteractor (MToolHandler *)

Interface Category:

API.

Purpose:

Constructor.

Calling Context:

Called by constructors of derived classes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCanvasDragInteractor::~TCanvasDragInteractor

virtual ~ TCanvasDragInteractor ()

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: TCanvasDragInteractor::MouseDown

virtual bool MouseDown (TMouseDownEvent &)

Interface Category:

API.

Purpose:

Handles the mouse-down event in the context of drag interaction.

Calling Context:

Called by the Mouse Input framework. Clients do not call this function. Derived classes must call the base class implementation.

Parameters:

Return Value:

Returns true because the mouse-down event is always handled.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCanvasDragInteractor::MouseMoved

virtual bool MouseMoved (TMouseMovedEvent &)

Interface Category:

API.

Purpose:

Handles the mouse-moved event in the context of drag interaction.

Calling Context:

Called by the Mouse Input framework. Clients do not call this function. Derived classes must call the base class implementation.

Parameters:

Return Value:

Returns true because the mouse-moved event is always handled.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCanvasDragInteractor::MouseUp

virtual bool MouseUp (TMouseUpEvent &)

Interface Category:

API.

Purpose:

Handles the mouse-up event in the context of drag interaction.

Calling Context:

Called by the Mouse Input framework. Clients do not call this function. Derived classes must call the base class implementation.

Parameters:

Return Value:

Returns true because the mouse-up event is always handled.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCanvasDragInteractor::DrawFeedback

virtual void DrawFeedback ()

Interface Category:

API.

Purpose:

Implements how feedback is drawn.

Calling Context:

Called by mouse event handling functions of this class.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCanvasDragInteractor::StartInteraction

virtual void StartInteraction ()

Interface Category:

API.

Purpose:

Implements what semantic action takes place when interaction starts. Typically, a command binding is executed by calling MToolInteractor::DoBegin.

Calling Context:

Called from the MouseDown of this class.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCanvasDragInteractor::ContinueInteraction

virtual void ContinueInteraction ()

Interface Category:

API.

Purpose:

Implements what semantic action takes place as interaction continues. Typically, a command binding is executed by calling MToolInteractor::DoIncrement.

Calling Context:

Called from the MouseMoved of this class.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCanvasDragInteractor::EndInteraction

virtual void EndInteraction ()

Interface Category:

API.

Purpose:

Implements what semantic action takes place when interaction ends. Typically, a command binding is executed by calling either MToolInteractor::AdoptAndDoEnd or MToolHandler::AdoptAndDo.

Calling Context:

Called from the MouseUp of this class.

Parameters:

Return Value:

None.

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.