Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

DragDropContentsView Class Reference

CP_ScrollableView to display the contents of a CP_DragDrop operation.

List of all members.

Public Member Functions

Constructor / Destructor
 DragDropContentsView (CPLAT::CP_View *inSuperview, const CPLAT::CP_Point &inUpperLeft, const CPLAT::CP_Size &inContentSize)
 Constructor.
virtual ~DragDropContentsView () throw ()
 Destructor.
Drag and Drop
virtual bool OnCanAcceptDrag (UInt32 inItem, CPLAT::CP_DragDrop &inDragDrop)
virtual void HandleDragReceive (CPLAT::CP_DragDrop &inDragDrop)

Protected Member Functions

AboutBox
virtual void OnDraw (CPLAT::CP_Canvas &inCanvas, CPLAT::CP_Region &inUpdateArea)

Protected Attributes

CP_DroppedItems fDroppedItems


Constructor & Destructor Documentation

DragDropContentsView::DragDropContentsView CPLAT::CP_View *  inSuperview,
const CPLAT::CP_Point &  inUpperLeft,
const CPLAT::CP_Size &  inContentSize
 

Constructor. Create a pane with the upper left corner at inLocation, and the content size of inSize.

Parameters:
inSuperview The subview handler that contains this view.
inUpperLeft Upper left corner of pane in releation to its superview.
inContentSize Content size of the view.
Exceptions:
none 

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

Destructor.

Exceptions:
none 


Member Function Documentation

bool DragDropContentsView::OnCanAcceptDrag UInt32  inItem,
CPLAT::CP_DragDrop &  inDragDrop
[virtual]
 

Returns a bool if the view can accept the object being dragged over this view. In this demo, since we want to look at the flavors of all items, we just return true to indicate we can accept any item dragged over the window.

Parameters:
inItem Not used.
inDragDrop Not used.
Exceptions:
none 
Returns:
bool We always return true for this demo to indicate any item can be dragging onto the window.

void DragDropContentsView::HandleDragReceive CPLAT::CP_DragDrop &  inDragDrop  )  [virtual]
 

Called when the user has dropped some item onto this view. In this demo we will display all of the flavors in the item.

Parameters:
inDragDrop The CP_DragDrop object performing the drop.
Exceptions:
none 
Returns:
void

void DragDropContentsView::OnDraw CPLAT::CP_Canvas &  inCanvas,
CPLAT::CP_Region &  inUpdateArea
[protected, virtual]
 

Loops through all of the items in the dropped item, and displays the type of flavor, and some information about each item.

Parameters:
inCanvas The destination CP_Canvas object.
inUpdateArea The area needing to be updated.
Exceptions:
none 
Returns:
void


Member Data Documentation

CP_DroppedItems DragDropContentsView::fDroppedItems [protected]
 


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:23:46 2005 for CPLAT_MacOS by  doxygen 1.4.0