CODDropTarget Class

class CODDropTarget: public COleDropTarget

OLE drop target.

Defined in: OdDropTarget.h

Class Members

 CODDropTarget()

Constructor.

virtual  ~CODDropTarget()

Destructor.

CODViewport* m_pViewport

A pointer to the viewport this drop target is associated with.

CODComponentSet m_setComponents

The set of components being dragged.

CODComponentSet m_setDependents

The set of components depedent on those being dragged.

CODComponentSetTracker m_compSetTracker

Calculates the tracking of the components.

CPoint m_ptOrigLog

The original point where the dragging operation first entered this viewport.

CPoint m_ptLastDragOver

The last point where the component were dragged.

CRect m_rcCompRect

The bounding rectangle of the components.

DWORD m_dwLastKeyState

The last key state.

BOOL m_bEraseOldTracking

TRUE if the last tracking needs to be erased.

int m_nLastMoveX

The last horizontal offest of the dragging.

int m_nLastMoveY

The last vertical offest of the dragging.

CODModel*  GetModel()

Gets the model that the viewport observes.

CODController*  GetCtlr() const

Gets the controller associated with this drop target.

CLIPFORMAT  GetClipFormat()

Gets the clipboard format used for the dragging operation.

BOOL  ClipboardTextEnabled() const

Indicates if text is supported for clipboard operations.

BOOL  ClipboardEnhMetafileEnabled() const

Indicates if enhanced metafile format is supported for clipboard operations.

void  ClearComponents()

Clears the component set from memory.

virtual BOOL  IsSameModel()

Returns TRUE if this the drag operation is within one model.

virtual void  GetOriginalComponents(CODComponentSet* pCompSet)

Gets the original components from the model that correspond to the copies used in this class.

virtual void  OnDragScroll()

Called by the framework when the drag scroll timer fires.

virtual DROPEFFECT  OnDragEnter(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point)

Called when the drag operation first enters this viewport.

virtual void  OnDragLeave(CWnd* pWnd)

Called when the drag operation leaves this viewport.

virtual DROPEFFECT  OnDragOver(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point)

Called as the components are being dragged across the viewport.

virtual BOOL  OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point)

Called when the components are dropped onto the viewport.

virtual DROPEFFECT  OnDragScroll(CWnd* pWnd, DWORD dwKeyState, CPoint point)

Called when the components are dragged near the scrollbars.

virtual BOOL  Register(CODViewport* pViewport)

Registers this drop target as being used for the viewport passed in.

virtual void  SerializeComponents(CArchive& ar, CODComponentSet* pCompSet)

Serializes a set of components.