Class: TBasicCanvasGraphicCreationTool

Declaration: BasicCanvasGraphic.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TSimpleMouseTool

Inherited By:

None.

Purpose:

A generic cursor tool that creates a TBasicCanvasGraphicCreationInteractor which in turn creates a canvas graphic as specified in the constructor of this tool (the constructor that takes a const MGraphic&). The cursor graphic for this tool is a simple cross hair. Examples of this tool can be seen in MarsPresenter.C.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Intended to be used as is, not likely to be derived but can be derived.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TBasicCanvasGraphicCreationTool::TBasicCanvasGraphicCreationTool

  1. TBasicCanvasGraphicCreationTool (const MGraphic & thePrototype)
  2. TBasicCanvasGraphicCreationTool (const TBasicCanvasGraphicCreationTool &)
  3. TBasicCanvasGraphicCreationTool ()

Interface Category:

API.

Purpose:

  1. Constructs from an MGraphic for the basic canvas graphic to wrap.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. Called to create a new tool.
  2. Called to copy a tool.
  3. Called by the stream-in operators.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

A unit MGraphic is passed to the TBasicCanvasGraphicCreationInteractor that eventually transforms the MGraphic to fit in a bounds defined during interaction.

Member Function: TBasicCanvasGraphicCreationTool::~TBasicCanvasGraphicCreationTool

virtual ~ TBasicCanvasGraphicCreationTool ()

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

TBasicCanvasGraphicCreationTool & operator =(const TBasicCanvasGraphicCreationTool &)

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

virtual 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: TBasicCanvasGraphicCreationTool::operator<<=

virtual 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 TStandardException (kStreamBadVersion,0) if streaming in a version other than kOriginalVersion. Passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBasicCanvasGraphicCreationTool::CreateCursorGraphic

virtual MGraphic * CreateCursorGraphic () const

Interface Category:

API.

Purpose:

Creates a graphic to represent the tool as a cursor.

Calling Context:

Called by Cursor Tools framework.

Parameters:

Return Value:

MGraphic * -A crosshair graphic.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBasicCanvasGraphicCreationTool::CreateInteractor

virtual TToolInteractor * CreateInteractor (MToolTarget * target) const

Interface Category:

API.

Purpose:

Creates an interactor to manage the interaction of creating a basic canvas graphic for the tool.

Calling Context:

Called by Cursor Tools.

Parameters:

Return Value:

TToolInteractor * -A new TBasicCanvasGraphicCreationInteractor.

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.