MFC Grid manual

CDragSource Class Reference

Grid items source in drag & drop clipboard operations. More...

#include <Dapfor/GUI/DragSource.h>

List of all members.


Public Member Functions

 CDragSource (const CGrid &grid, ContextType contextType, Handles &items, const CHeader *header)
 Constructor.
virtual ~CDragSource ()
 Virtual destructor.
CDragImage SetDragImage (const CDragImage &dragImage)
 Sets new drag image.
Get- methods
const CGridGetGrid () const
 Gets a reference to the grid from which data is taken.
ContextType GetContextType () const
 Gets the context where the drag operation occurs.
Handles & GetItems ()
 Gets a list of handles to be serialized to the clipboard.
const Handles & GetItems () const
 Gets a list of handles to be serialized to the clipboard. Const version.
CDragImage GetDragImage () const
 Gets an image of dragged items.
const CHeaderGetHeader () const
 Gets a header of the grid.
Set- methods
void SetContextType (ContextType contextType)
 Sets a new context type(s).
void SetHeader (const CHeader *header)
 Sets a new header.

Detailed Description

Grid items source in drag & drop clipboard operations.

Version:
1.0.0.0 Initial version

Constructor & Destructor Documentation

CDragSource ( const CGrid grid,
ContextType  contextType,
Handles &  items,
const CHeader header 
)

Constructor.

Parameters:
[in] grid A Reference to the grid
[in] contextType Context where the drag operation is occurred.
[in] items List of handles to be serialized to the clipboard.
[in] header Header of the grid.

~CDragSource (  )  [virtual]

Virtual destructor.

Frees all resources. Deletes a bitmap object if it exists.


Member Function Documentation

const CGrid & GetGrid (  )  const

Gets a reference to the grid from which data is taken.

Returns:
A Reference to the grid.

ContextType GetContextType (  )  const

Gets the context where the drag operation occurs.

Returns:
Context(s) where the drag operation is occurred.

Handles & GetItems (  ) 

Gets a list of handles to be serialized to the clipboard.

Returns:
List of handles to be serialized to the clipboard.

const Handles & GetItems (  )  const

Gets a list of handles to be serialized to the clipboard. Const version.

Returns:
Const list of handles to be serialized to the clipboard.

CDragImage GetDragImage (  )  const

Gets an image of dragged items.

Returns:
An image of dragged items if it exists. Otherwise '0'.

const CHeader * GetHeader (  )  const

Gets a header of the grid.

Returns:
Header which is used in the drag operation.

CDragImage SetDragImage ( const CDragImage dragImage  ) 

Sets new drag image.

Parameters:
[in] dragImage A new drag image
Returns:
Previous drag image

void SetContextType ( ContextType  contextType  ) 

Sets a new context type(s).

Parameters:
[in] contextType A new context where the drag operation is occurred.

void SetHeader ( const CHeader header  ) 

Sets a new header.

Parameters:
[in] header A new header to be used in the drag operation.