Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TScrapItemAcceptor
Inherited By:
None.
Purpose:
TDocumentScrapItemAcceptor is an abstract base class that defines the protocol necessary to implement an acceptor for Workspace entities. Acceptors are used by Workspace entities to accept items dropped on them during a drag and drop operation. The acceptor and the drag source negotiate over the type used to transfer information from the source to the acceptor.
Acceptor classes are attached to a Workspace entity type via the utility program AddWorkspaceDropAcceptor and removed with RemoveWorkspaceDropAcceptor.
Instantiation:
Abstract base class; do not allocate.
Deriving Classes:
Derived classes must override the pure virtual functions ChoosePreferredTypeForDocument and AcceptScrapItemForDocument.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
virtual ~ TDocumentScrapItemAcceptor ()
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 bool ChoosePreferredTypeForDocument (const TDocumentReference & representedDocument, const TPlaceReference & placeContext, const TSequenceOf < TTypeDescription > & availableTypes, TTypeDescription & chosenType) const
Interface Category:
API.
Purpose:
Chooses from the specified list the type preferred by this acceptor to accept the specified document. This function is called as part of the type negotiation performed between the drag source and this acceptor object.
Calling Context:
Called when the user drops an item on the Workspace entity to which this acceptor is attached.
Parameters:
- const TDocumentReference & representedDocument -The Workspace entity, to which this acceptor is attached, on which an object is being dropped.
- const TPlaceReference & placeContext -The place in which this dragging interaction is occurring.
- const TSequenceOf < TTypeDescription > & availableTypes -The set of type descriptions indicating the types in which the dragged item is available.
- TTypeDescription & chosenType -The type chosen as returned by this function.
Return Value:
Returns true if this function chose one of the types from the list; false otherwise.
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 TDocumentScrapItemAcceptor.
virtual bool AcceptScrapItemForDocument (const TDocumentReference & representedDocument, const TPlaceReference & placeContext, const TTypeDescription & type, const TScrapItem & scrapItem)
Interface Category:
API.
Purpose:
Accepts the specified scrap item. This function is only called after the drag source and this object has agreed on a type description.
Calling Context:
Called to accept an item dropped on the Workspace entity associated with this drop acceptor.
Parameters:
- const TDocumentReference & representedDocument -The Workspace entity, to which this acceptor is attached, on which an object is being dropped.
- const TPlaceReference & placeContext -The place in which this dragging interaction is occurring.
- const TTypeDescription & type -The type description indicating the type of scrap item provided in the next parameter.
- const TScrapItem & scrapItem -The scrap item representing the dragged and dropped entity in the requested type.
Return Value:
Returns true if the scrap item was accepted by this function; false otherwise.
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 TDocumentScrapItemAcceptor.
- TDocumentScrapItemAcceptor ()
- TDocumentScrapItemAcceptor (const TDocumentScrapItemAcceptor & 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:
TDocumentScrapItemAcceptor is an abstract base class. Do not instantiate this class.
TDocumentScrapItemAcceptor & operator =(const TDocumentScrapItemAcceptor & 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.