CODDropTarget Class

class CODDropTarget: public COleDropTarget

OLE drop target.

Defined in: OdDropTarget.h

Class Members

VIEWS_API CODDropTarget()

Constructor.

VIEWS_API 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.

VIEWS_API CODModel* GetModel()

Gets the model that the viewport observes.

VIEWS_API CODController* GetCtlr() const

Gets the controller associated with this drop target.

VIEWS_API CLIPFORMAT GetClipFormat()

Gets the clipboard format used for the dragging operation.

VIEWS_API BOOL ClipboardTextEnabled() const

Indicates if text is supported for clipboard operations.

VIEWS_API BOOL ClipboardEnhMetafileEnabled() const

Indicates if enhanced metafile format is supported for clipboard operations.

VIEWS_API void ClearComponents()

Clears the component set from memory.

VIEWS_API virtual BOOL IsSameModel()

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

VIEWS_API virtual void GetOriginalComponents(CODComponentSet* pCompSet)

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

VIEWS_API virtual void OnDragScroll()

Called by the framework when the drag scroll timer fires.

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

Called when the drag operation first enters this viewport.

VIEWS_API virtual void OnDragLeave(CWnd* pWnd)

Called when the drag operation leaves this viewport.

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

Called as the components are being dragged across the viewport.

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

Called when the components are dropped onto the viewport.

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

Called when the components are dragged near the scrollbars.

VIEWS_API virtual BOOL Register(CODViewport* pViewport)

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

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

Serializes a set of components.