Class: TDocumentScrapItemSource

Declaration: DocumentScrapItemSource.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TScrapItemSource

Inherited By:

None.

Purpose:

TDocumentScrapItemSource is an abstract base class that defines the protocol necessary to implement a drag source for Workspace entities. Drag sources are used by Workspace entities to provide the appropriate scrap items for an object dragged out of them by the user. The drag source and the acceptor negotiate over the type used to transfer information from the source to the acceptor. Drag source classes are attached to a Workspace entity type via the utility program AddWorkspaceDragSource and removed with RemoveWorkspaceDragSource.

Instantiation:

Abstract base class; do not allocate.

Deriving Classes:

Derived classes must override the pure virtual functions CopyAvailableTypesOfDocument, and CreateItemOfDocumentMatchingDescription.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TDocumentScrapItemSource::~TDocumentScrapItemSource

virtual ~ TDocumentScrapItemSource ()

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

TStream & operator >>=(TStream & toWhere) 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: TDocumentScrapItemSource::operator<<=

TStream & operator <<= (TStream & fromWhere)

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 TInvalidVersionError if the version of the object on the stream is unknown to the version of the shared library installed.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDocumentScrapItemSource::CopyAvailableTypesOfDocument

virtual void CopyAvailableTypesOfDocument (const TDocumentReference & representedDocument, const TPlaceReference & placeContext, const TScrapInteractionModifier & modifier, TSequenceOf < TTypeDescription > & result, TMemoryHeap * whichHeap =NIL) const

Interface Category:

API.

Purpose:

Provides the type descriptions which indicate the types in which the dragged object is available. This function is called as part of the type negotiation performed between the acceptor and this drag source object.

Calling Context:

Called when the user begins dragging the Workspace entity to which this source is attached.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is a pure virtual function and must be overridden by classes deriving from TDocumentScrapItemSource.

Member Function: TDocumentScrapItemSource::CreateItemOfDocumentMatchingDescription

virtual TScrapItem * CreateItemOfDocumentMatchingDescription (const TDocumentReference & representedDocument, const TPlaceReference & placeContext, const TScrapInteractionModifier & modifier, const TTypeDescription & requestedType, TMemoryHeap * whichHeap =NIL) const

Interface Category:

API.

Purpose:

Creates a scrap item of the appropriate type which is used to hand the data to the acceptor.

Calling Context:

Called to provide the scrap item for the dragged object after successful type negotiation between this drag source an an acceptor.

Parameters:

Return Value:

Returns the scrap item created by this function.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is a pure virtual function and must be overridden by classes deriving from TDocumentScrapItemSource.

Member Function: TDocumentScrapItemSource::TDocumentScrapItemSource

  1. TDocumentScrapItemSource ()
  2. TDocumentScrapItemSource (const TDocumentScrapItemSource & source)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

TDocumentScrapItemSource is an abstract base class. Do not instantiate this class.

Member Function: TDocumentScrapItemSource::operator=

TDocumentScrapItemSource & operator =(const TDocumentScrapItemSource & source)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

Parameters:

Return Value:

Returns a const reference to the left-hand side object.

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.