# IRsDaDSource Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
Methods
HRESULT | GetObjectUnderCursor ([in] POINT pntCursor,[out, retval] VARIANT *pvVal)
HRESULT | GetImageForDrag ([in] POINT pntCursor,[out, retval] HBITMAP *pVal)
HRESULT | OnClick ([in] POINT pntCursor,[in] RtUlong ulKey)
HRESULT | DropObjectWithoutTarget ([in] POINT pntCursor,[in] RtUlong ulKey,[in] VARIANT vVal)
HRESULT | AllowDropToTarget ([in] POINT pntCursor,[in] IRsObject *pTarget,[out] RtBool *bOK)
HRESULT | DroppedObject ([in] POINT pntCursor,[in] RtUlong ulKey,[in] VARIANT vVal,[in] IRsObject *pDaDTarget)

## Detailed Description

Interface of Rosetta Drag & Drop Source window.

Author:
  Ivan Hronec This interface declares properties and methods that allow drag object from window.

## Member Function Documentation

HRESULT IRsDaDSource::GetObjectUnderCursor | ( | [in] POINT | pntCursor,
|  | [out, retval] VARIANT * | pvVal |
| ) |  |  |

This method retrieves pointer of object under cursor.

Parameters:

  | pntCursor | [In] Cursor position in screen coordinates.
  | ppVal | [Out] Pointer to buffer for pointer.

Returns:
  S_OK when no error occured.

  Error code otherwise.

HRESULT IRsDaDSource::GetImageForDrag | ( | [in] POINT | pntCursor,
|  | [out, retval] HBITMAP * | pVal |
| ) |  |  |

This method retrieves image for dragged object.

Parameters:

  | pntCursor | [In] Cursor position in screen coordinates.
  | pVal | [Out] Pointer to buffer for handle.

Returns:
  S_OK when no error occured.

  Error code otherwise.

HRESULT IRsDaDSource::OnClick | ( | [in] POINT | pntCursor,
|  | [in] RtUlong | ulKey |
| ) |  |  |

This method is called when user made just click on object under cursor, no drag occured.

Parameters:

  | pntCursor | [In] Cursor position in screen coordinates.

Returns:
  S_OK when no error occured.

  Error code otherwise.

HRESULT IRsDaDSource::DropObjectWithoutTarget | ( | [in] POINT | pntCursor,
|  | [in] RtUlong | ulKey,
|  | [in] VARIANT | vVal |
| ) |  |  |

This method handles drop of dragged object when no target was found.

Parameters:

  | pntCursor | [In] Cursor position in screen coordinates.
  | pVal | [Out] Pointer to dropped object.

Returns:
  S_OK when no error occured.

  Error code otherwise.

HRESULT IRsDaDSource::AllowDropToTarget | ( | [in] POINT | pntCursor,
|  | [in] IRsObject * | pTarget,
|  | [out] RtBool * | bOK |
| ) |  |  |

This method handles drop of dragged object when no target was found.

Parameters:

  | pntCursor | [In] Cursor position in screen coordinates.
  | pVal | [Out] Pointer to dropped node.

Returns:
  S_OK when no error occured.

  Error code otherwise.

HRESULT IRsDaDSource::DroppedObject | ( | [in] POINT | pntCursor,
|  | [in] RtUlong | ulKey,
|  | [in] VARIANT | vVal,
|  | [in] IRsObject * | pDaDTarget |
| ) |  |  |

This method handles drop of dragged object when target was found.

Parameters:

  | pntCursor | [In] Cursor position in screen coordinates.
  | pVal | [In] Pointer to dropped object.
  | pTarget[In] | Drop destionation

Returns:
  S_OK when no error occured.

  Error code otherwise.