Class: TStandardCanvasModelSelection

Declaration: StandardGrafEdit.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TModelSelection, MCanvasSelection, MDataExchanger

Inherited By:

None.

Purpose:

A canvas selection that is also a model selection. Typically derived to develop a compound document centric GrafEdit application.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Intended to be derived but can also be used as is.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TStandardCanvasModelSelection::SelectWholeModel

virtual void SelectWholeModel ()

Interface Category:

API.

Purpose:

Selects all of the canvas graphics in the representation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardCanvasModelSelection::SelectAllGraphics

virtual void SelectAllGraphics ()

Interface Category:

API.

Purpose:

Selects all of the graphics objects in the model.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This member function acquires a read lock on the model before calling the inherited SelectAllGraphics.

Member Function: TStandardCanvasModelSelection::GetCanvasRepresentationForWriting

virtual MCanvasRepresentation * GetCanvasRepresentationForWriting ()

Interface Category:

API.

Purpose:

Provides access to the underlying canvas representation, with the ability to modify.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a pointer to the underlying canvas representation.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardCanvasModelSelection::GetCanvasRepresentationForReading

virtual MCanvasRepresentation * GetCanvasRepresentationForReading () const

Interface Category:

API.

Purpose:

Provides access to a non-modifiable representation of the underlying canvas.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a pointer to the underlying canvas representation.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardCanvasModelSelection::Invalidate

virtual void Invalidate (const TGArea &)

Interface Category:

API.

Purpose:

Results in a TStandardCanvasSelectionNotification with graphics changed interest.

Calling Context:

Typically called by commands.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardCanvasModelSelection::CreateAvailableTypesList

virtual void CreateAvailableTypesList ( TSequenceOf < TTypeDescription > & theTypes) const

Interface Category:

API.

Purpose:

Identifies which types of models can be produced.

Calling Context:

Typically called in the context of clipboard operations, linking, and model drag and drop.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Derive to add more preferred types and then call the base class function. To actually produce the types, also override HandleCopyData, HandleCopyDataInto, and HandleOrphanData.

Member Function: TStandardCanvasModelSelection::ChooseTypes

virtual void ChooseTypes (const TSequenceOf < TTypeDescription > & theChoices, TSequenceOf < TTypeDescription > & theChosenTypes) const

Interface Category:

API.

Purpose:

Identifies which of types of models can be accepted.

Calling Context:

Typically called in the context of clipboard operations, linking, and model drag and drop.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Derive to add more preferred types and then call the base class to add its types. To actually accept the types, also override HandleReplaceData.

Member Function: TStandardCanvasModelSelection::HandleCopyData

virtual TModel * HandleCopyData (const TTypeDescription & theType) const

Interface Category:

API.

Purpose:

Produces a model of the requested type with a copy of the selected graphics.

Calling Context:

Typically called in the context of clipboard operations, linking, and model drag and drop.

Parameters:

Return Value:

TModel * -The copy model.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardCanvasModelSelection::HandleCopyDataInto

virtual void HandleCopyDataInto (TModel & theModel) const

Interface Category:

API.

Purpose:

Copies selected graphics into the provided model.

Calling Context:

Called by HandleCopyData.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardCanvasModelSelection::HandleOrphanData

virtual TModel * HandleOrphanData ()

Interface Category:

API.

Purpose:

Orphans selected graphics in a new model and removes these graphics from the selection.

Calling Context:

Typically called in the context of clipboard operations, linking, and model drag and drop.

Parameters:

Return Value:

TModel * -A model with the orphaned canvas graphics.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardCanvasModelSelection::HandleReplaceData

virtual TModel * HandleReplaceData (TModel * theData)

Interface Category:

API.

Purpose:

Replaces currently selected graphics with the graphics in the provided model. Then, it moves the replaced graphics from the selection and selects new graphics. Finally, it returns a new model containing the replaced graphics.

Calling Context:

Typically called in the context of clipboard operations, linking, and model drag and drop.

Parameters:

Return Value:

TModel * -A model with the graphics that are replaced.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardCanvasModelSelection::EnumerateGraphics

virtual void EnumerateGraphics (TCanvasGraphicFilter &, TCanvasGraphicFunnel &) const

Interface Category:

API.

Purpose:

Passively iterates over selected graphics in the underlying standard canvas model. The filter controls which graphics are enumerated and in which order. The funnel defines how each enumerated graphic is processed.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardCanvasModelSelection::operator=

TStandardCanvasModelSelection & operator =(const TStandardCanvasModelSelection &)

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

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TStandardCanvasModelSelection::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: TStandardCanvasModelSelection::~TStandardCanvasModelSelection

virtual ~ TStandardCanvasModelSelection ()

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: TStandardCanvasModelSelection::TStandardCanvasModelSelection

  1. TStandardCanvasModelSelection (const TStandardCanvasModel &)
  2. TStandardCanvasModelSelection (const TStandardCanvasModelSelection &)
  3. TStandardCanvasModelSelection ()

Interface Category:

API.

Purpose:

  1. Constructor.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. Called to create a new object.
  2. Called to copy an object.
  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:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.