MFC Grid manual

IDragDrop Class Reference

Drag and drop interface. More...

#include <Dapfor/GUI/IDragDrop.h>

Inheritance diagram for IDragDrop:

IAutoDelete CDragDrop

List of all members.


Public Member Functions

virtual ~IDragDrop ()
 Virtual destructor.
virtual DROPEFFECT DoDrag (CDragSource &dragSource)=0
 Called to perform a drag operation.
virtual DROPEFFECT OnDragEnter (const CDropTarget &dropTarget)=0
 Called by CGrid when the cursor is dragged into a window for the first time.
virtual DROPEFFECT OnDragOver (const CDropTarget &dropTarget)=0
 Called by CGrid when the cursor is dragged over a window.
virtual BOOL OnDrop (const CDropTarget &dropTarget, DROPEFFECT dropEffect)=0
 Called by CGrid when a drop operation is about to occur.
virtual void OnDragLeave (const CGrid &grid)=0
 Called by the framework when the cursor leaves a window during a dragging operation.
virtual bool CanDrop (const CDropTarget &dropTarget) const =0
 The function indicates whether data can be dropped to a specified location.

Detailed Description

Drag and drop interface.

Version:
1.0.0.0 Initial version

Member Function Documentation

DROPEFFECT DoDrag ( CDragSource dragSource  )  [pure virtual]

Called to perform a drag operation.

Parameters:
[in] dragSource Contains a header, list of item handles and the grid itself where these handles are taken.
Returns:
Drop effect generated by drag-and-drop operation if success. Otherwise DROPEFFECT_NONE.

Implemented in CDragDrop.

DROPEFFECT OnDragEnter ( const CDropTarget dropTarget  )  [pure virtual]

Called by CGrid when the cursor is dragged into a window for the first time.

Parameters:
[in] dropTarget Contains the drop position where a clipboard content should be placed.
Returns:
dropEffect The effect that the user chose for the drop operation. It can be one of the following:
DROPEFFECT_COPY A copy operation would be performed.
DROPEFFECT_MOVE A move operation would be performed.
DROPEFFECT_LINK A link to the original data would be established.

Implemented in CDragDrop.

DROPEFFECT OnDragOver ( const CDropTarget dropTarget  )  [pure virtual]

Called by CGrid when the cursor is dragged over a window.

Parameters:
[in] dropTarget Contains a drop position where the clipboard content should be placed.
Returns:
dropEffect The effect that the user chose for the drop operation. It can be one of the following:
DROPEFFECT_COPY A copy operation would be performed.
DROPEFFECT_MOVE A move operation would be performed.
DROPEFFECT_LINK A link to the original data would be established.

Implemented in CDragDrop.

BOOL OnDrop ( const CDropTarget dropTarget,
DROPEFFECT  dropEffect 
) [pure virtual]

Called by CGrid when a drop operation is about to occur.

Parameters:
[in] dropTarget Contains the drop position where a clipboard content should be placed.
Returns:
dropEffect The effect that the user chose for the drop operation. It can be one of the following:
DROPEFFECT_COPY A copy operation would be performed.
DROPEFFECT_MOVE A move operation would be performed.
DROPEFFECT_LINK A link to the original data would be established.

TRUE if the clipboard data have been successfully dropped. Otherwise FALSE.

Implemented in CDragDrop.

void OnDragLeave ( const CGrid grid  )  [pure virtual]

Called by the framework when the cursor leaves a window during a dragging operation.

Parameters:
[in] grid Reference to the grid the cursor is leaving.

Implemented in CDragDrop.

bool CanDrop ( const CDropTarget dropTarget  )  const [pure virtual]

The function indicates whether data can be dropped to a specified location.

Returns:
True If the clipboard content can be dropped. Otherwise false.

Implemented in CDragDrop.