Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_DragDrop Class Reference

A class to manage a drag and drop operation.

List of all members.

Public Member Functions

Constructor / Destructor
 CP_DragDrop ()
 Constructor.
 CP_DragDrop (const CP_DragDrop &inDragDrop)
virtual ~CP_DragDrop () throw ()
 Destructor.
Getters
UInt16 GetCount () const
CP_DataStream GetItem (UInt16 inItemIndex)
Operators
CP_DragDropoperator= (const CP_DragDrop &inDragDrop)
Tracking
void TrackDrag (CP_Event_Base &inEvent)
Constructor / Destructor
 CP_DragDrop (DragRef inDragRef)
 Constructor.
Getters
DragRef GetDragRef () const
ItemReference GetItemReference (UInt16 inIndex) const
Flavors
void AddFlavor (FlavorType inFlavor, const void *inData, SInt32 inSize, FlavorFlags inFlags, ItemReference inItem)
DataStream
void AddDataStream (CP_DataStream &inDataStream)

Protected Attributes

DragRef fDragRef
CP_Event_Base fDragDropEvent
CP_DataStream_ArrayfDataItems


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_DragDrop::CP_DragDrop  ) 
 

Constructor.

Exceptions:
none 

CP_DragDrop::CP_DragDrop const CP_DragDrop inDragDrop  ) 
 

Copy constructor.

Parameters:
inDragDrop The CP_DragDrop object to copy fields from.
Exceptions:
none 

CP_DragDrop::~CP_DragDrop  )  throw () [virtual]
 

Desstructor.

Exceptions:
none 

CP_DragDrop::CP_DragDrop DragRef  inDragRef  ) 
 

List of items in the drag.


Member Function Documentation

UInt16 CP_DragDrop::GetCount  )  const
 

Returns the number of items contained in this drag.

Exceptions:
none 
Returns:
UInt16 const The number of items in the drag operation.

CP_DataStream CP_DragDrop::GetItem UInt16  inItemIndex  ) 
 

Returns the nth item in the drag.

Parameters:
inItemIndex The index of the item to be returned.
Exceptions:
none 
Returns:
CP_DataStream A CP_DataStream item that contains the data for the requested item.

CP_DragDrop & CP_DragDrop::operator= const CP_DragDrop inDragDrop  ) 
 

Assignment operator.

Parameters:
CP_DragDrop CP_DragDrop object to copy the data from.
Exceptions:
none 
Returns:
CP_DragDrop& Returns a reference to ourselves.

void CP_DragDrop::TrackDrag CP_Event_Base inEvent  ) 
 

Handles the tracking of the drag.

Parameters:
inEvent Originating event to begin the drag and drop.
Exceptions:
none 
Returns:
void

DragRef CP_DragDrop::GetDragRef  )  const
 

ItemReference CP_DragDrop::GetItemReference UInt16  inIndex  )  const
 

Returns a MacOS ItemReference for the specified item at the passed in index.

Parameters:
inIndex Index of the item to be returned.
Exceptions:
none 
Returns:
ItemReference The MacOS ItemReference for the desired item.

void CP_DragDrop::AddFlavor FlavorType  inFlavor,
const void *  inData,
SInt32  inSize,
FlavorFlags  inFlags,
ItemReference  inItem
 

Add a data flavor to our drag. Use this for adding an item to a single item drag only.

Parameters:
inFlavor The FlavorType of the data.
inData Pointer to the data to add.
inSize The size of the data.
inFlags Any FlavorFlags to add to this drag.
inItem An ItemReference for this item, used to locate it on the receiving end.
Exceptions:
none 
Returns:
void

void CP_DragDrop::AddDataStream CP_DataStream inDataStream  ) 
 

Adds a CP_DataStream item to the list of items being dragged.

Parameters:
inDataStream The CP_DataStream item being added.
Exceptions:
none 
Returns:
void


Member Data Documentation

DragRef CP_DragDrop::fDragRef [protected]
 

CP_Event_Base CP_DragDrop::fDragDropEvent [protected]
 

MacOS drag reference for this drag.

CP_DataStream_Array* CP_DragDrop::fDataItems [protected]
 

MacOS CarbonEvent for the drag receive event.


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:01:32 2005 for CPLAT by  doxygen 1.4.0