Class: TDragAndDropItem

Declaration: DragAndDrop.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

None.

Purpose:

TDragAndDropItem is an abstract class used to derive classes which describe a list possible data representations of a dragged object.

Instantiation:

TDragAndDropItem is an abstract class and cannot be instantiated.

Deriving Classes:

Derive classes from TDragAndDropItem to represent your own list of possible data representations of a dragged object.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

Classes derived from TDragAndDropItem do not have to support streaming because they are never copied or streamed.

Member Function: TDragAndDropItem::~TDragAndDropItem

virtual ~ TDragAndDropItem ()

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

  1. TDragAndDropItem (const TViewHandle & viewForActions)
  2. TDragAndDropItem (const TDragAndDropItem & copy)
  3. TDragAndDropItem ()

Interface Category:

API.

Purpose:

  1. Creates a TDragAndDropItem associated with the specified source view.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. Called to create a TDragAndDropItem associated with the specified source view.
  2. Called to copy an object.
  3. Called to create a TDragAndDropItem suitable for streaming into.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDragAndDropItem::operator=

TDragAndDropItem & operator =(const TDragAndDropItem & assign)

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

virtual TStream & operator <<= (TStream & readFrom)

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 TInvalidVersionError if the flattened of the object from the stream is not the original version.

Concurrency:

Not multithread safe.

Other Considerations:

Classes derived from TDragAndDropItem do not have to support streaming because, when used in the drag-and-drop system, they are never copied or streamed.

Member Function: TDragAndDropItem::operator>>=

virtual TStream & operator >>=(TStream & writeTo) 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:

Classes derived from TDragAndDropItem do not have to support streaming because, when used in the drag-and-drop system, they are never copied or streamed.

Member Function: TDragAndDropItem::CopyAvailableTypes

virtual void CopyAvailableTypes (TSequenceOf < TTypeDescription > & result, TMemoryHeap * whichHeap =NIL) const

Interface Category:

API.

Purpose:

Provides a list of type descriptions that are available from this object.

Calling Context:

Called to obtain a list of type descriptions to be published for this object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Deriving classes must implement this member function.

Member Function: TDragAndDropItem::FindItemMatchingDescription

virtual TScrapItem * FindItemMatchingDescription (const TTypeDescription & theDescription)

Interface Category:

API.

Purpose:

Creates a TScrapItem that matches the specified type description.

Calling Context:

Called to create a TScrapItem that matches the specified type description.

Parameters:

Return Value:

The TScrapItem that matches the specified type description.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Deriving classes must implement this member function.

Member Function: TDragAndDropItem::HandleDropAccepted

virtual void HandleDropAccepted ()

Interface Category:

API.

Purpose:

Handles any required processing prior to destruction of this object. The default implementation does nothing.

Calling Context:

Called by MDropAcceptor when a drag-and-drop interaction has resulted in a successful drop acceptance.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Deriving classes may override this member function.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.