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.
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.
TStream & operator >>=(TStream & toWhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toWhere -The stream to which the object streams itself out.
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.
TStream & operator <<= (TStream & fromWhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromWhere -The stream from which the object streams itself in.
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.
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:
- const TDocumentReference & representedDocument -The Workspace entity being dragged, to which this source is attached.
- const TPlaceReference & placeContext -The place in which this dragging interaction is occurring.
- const TScrapInteractionModifier & modifier -The modifiers for the drag operation including keyboard modifiers
- TSequenceOf < TTypeDescription > & result -The sequence object into which the available type descriptions should be added as new heap objects.
- TMemoryHeap * whichHeap =NIL -The heap in which to create the new type description objects.
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:
- const TDocumentReference & representedDocument -The Workspace entity being dragged, to which this source is attached.
- const TPlaceReference & placeContext -The place in which this dragging interaction is occurring.
- const TScrapInteractionModifier & modifier -The modifiers for the drag operation including keyboard modifiers
- const TTypeDescription & requestedType -The scrap item type requested by the acceptor.
- TMemoryHeap * whichHeap =NIL -The heap in which to create the returned scrap item object.
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.
- TDocumentScrapItemSource ()
- TDocumentScrapItemSource (const TDocumentScrapItemSource & source)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- 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.
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.