Class: TChangeCanvasGraphicCmd

Declaration: CanvasCoreCommands.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TCommandOn

Inherited By:

TRotateCanvasGraphicCmd TScaleCanvasGraphicCmd TSetCanvasGraphicFillColorCmd TSetCanvasGraphicFrameColorCmd TSetCanvasGraphicLineWidthCmd TTransformCanvasGraphicCmd TTranslateCanvasGraphicCmd

Purpose:

An abstract base class for any command that changes canvas graphics in the target selection.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Abstract base class; must be derived.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TChangeCanvasGraphicCmd::TChangeCanvasGraphicCmd

  1. TChangeCanvasGraphicCmd ()
  2. TChangeCanvasGraphicCmd (const TChangeCanvasGraphicCmd &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and constructors of derived classes.
  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: TChangeCanvasGraphicCmd::~TChangeCanvasGraphicCmd

virtual ~ TChangeCanvasGraphicCmd ()

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: TChangeCanvasGraphicCmd::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: TChangeCanvasGraphicCmd::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 no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TChangeCanvasGraphicCmd::operator=

TChangeCanvasGraphicCmd & operator =(const TChangeCanvasGraphicCmd &)

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: TChangeCanvasGraphicCmd::BeginChange

virtual void BeginChange (MCanvasRepresentation &, MCanvasGraphic &)

Interface Category:

API.

Purpose:

Changes a specified canvas graphic and saves undo information to later restore the graphic in UndoChange.

Calling Context:

Called by TChangeCanvasGraphicCmd::HandleDoBegin.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

A pure virtual member function that must be overridden. The derived class implementation should save undo information from the graphic and then change the graphic as per the design of the command class.

Member Function: TChangeCanvasGraphicCmd::ContinueChange

virtual void ContinueChange (MCanvasRepresentation &, MCanvasGraphic &)

Interface Category:

API.

Purpose:

Changes a specified canvas graphic.

Calling Context:

Called by TChangeCanvasGraphicCmd::HandleDoIncrement.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

A pure virtual member function that must be overridden. The derived class implementation should change the graphic as per the design of the command class.

Member Function: TChangeCanvasGraphicCmd::UndoChange

virtual void UndoChange (MCanvasRepresentation &, MCanvasGraphic &)

Interface Category:

API.

Purpose:

Undoes prior changes to a specified canvas graphic and saves redo information to later restore the graphic in RedoChange.

Calling Context:

Called for each canvas graphic in the target selection by TChangeCanvasGraphicCmd::HandleUndo.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

A pure virtual member function that must be overridden. The derived class implementation should undo the change on the graphic as per the design of the command class. TCanvasGraphicAssociationsWith can be used to store undo and redo information.

Member Function: TChangeCanvasGraphicCmd::RedoChange

virtual void RedoChange (MCanvasRepresentation &, MCanvasGraphic &)

Interface Category:

API.

Purpose:

Redoes changes to a specified canvas graphic and saves undo information to later restore the graphic in UndoChange.

Calling Context:

Called for each canvas graphic in the target selection by TChangeCanvasGraphicCmd::HandleRedo.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

A pure virtual member function that must be overridden. The derived class implementation should redo change the graphic as per the design of the command class. TCanvasGraphicAssociationsWith can be used to store undo and redo information.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.