// ================================================================================= // CDDListBox.h ©1995 J. Rodden, DD/MF & Associates. All rights reserved // // Based on: // CDDxList ©1995 Malcolm Pradhan. All rights reserved // ================================================================================= #pragma once #include #include #ifndef __LISTS__ #include #endif typedef struct { Cell vCell; long vSenderID; } listBoxFlavor; const long CDDListBoxID = 'dlst'; const FlavorType listBoxFlavorType = CDDListBoxID; class CDDListBox : public CBetterListBox, public CDragAndDrop { public: enum { classID = CDDListBoxID }; static CDDListBox* CreateFromStream(LStream *inStream); CDDListBox(); CDDListBox(LStream *inStream); protected: virtual void FinishCreateSelf(); virtual Boolean ClickInCell(const SMouseDownEvent &inMouseDown, Rect& inRect, Cell& inCell); // Drag and Drop short mInsertDrop; Boolean mAcceptsInternalDrags; Boolean mDrawInsertionLine; virtual void AddFlavors(DragReference inDragRef); virtual void SetLocalFrame(); virtual Boolean ItemIsAcceptable( DragReference inDragRef, ItemReference inItemRef); virtual void LeaveDropArea (DragReference inDragRef); virtual void HiliteDropArea (DragReference inDragRef); virtual void InsideDropArea (DragReference inDragRef, Point& theMouseLocation, Point& thePinnedLocation); virtual void ReceiveDragItem(DragReference inDragRef, ItemReference inItemRef, Boolean inCopyData, Boolean inFromFinder, Rect& inItemBounds); virtual void CopyOrMoveDragData( void* inDragData, Size inDataSize, Boolean inCopyData, Boolean inFromFinder, Rect& inItemBounds); virtual void CopyCell( Cell inSrcCell, Cell inDestCell); void ListBoxDragCleanup(); void InvertCellEdge (Cell theCell); void CleanInsertionLine (void); };