LibreOffice: XDragSourceContext Interface Reference

LibreOffice LibreOffice 26.8 SDK API Reference

Loading...
Searching...
No Matches
XDragSourceContext Interface Referencepublished

The drag source context class is responsible for managing the initiator side of the Drag and Drop protocol. More...

`import "XDragSourceContext.idl";`

Inheritance diagram for XDragSourceContext:

## Public Member Functions
long | getCurrentCursor ()
| Get the identifier of the currently used cursor.
void | setCursor ([in] long cursorId)
| This method sets the current drag cursor.
void | setImage ([in] long imageId)
| This method sets the current drag image.
void | transferablesFlavorsChanged ()
| This method notifies the context that the com::sun::star::datatransfer::DataFlavor types of the transferable object have changed.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Detailed Description

The drag source context class is responsible for managing the initiator side of the Drag and Drop protocol.

In particular, it is responsible for managing event notifications to the DragSourceListener and providing the Transferable state to enable the data transfer.

An instance of this class is created as a result of the method XDragSource::startDrag() being successfully invoked. This instance is responsible for tracking the state of the operation on behalf of the drag source and dispatching state changes to the drag source listener.

See also
  com::sun::star::datatransfer::dnd::XDragSourceContext
  com::sun::star::datatransfer::dnd::XDragSourceListener

## Member Function Documentation

## ◆ getCurrentCursor()

long getCurrentCursor | ( |  | ) |

Get the identifier of the currently used cursor.

Returns
  The currently selected drag cursor.

## ◆ setCursor()

void setCursor | ( | [in] long | cursorId | ) |

This method sets the current drag cursor.

This method should only be called to set another cursor than the default one for drag action currently selected by the user.

Invalid cursor identifiers will be ignored.

Parameters

  cursorId | The identifier the drag source returned when registering the cursor.

## ◆ setImage()

void setImage | ( | [in] long | imageId | ) |

This method sets the current drag image.

Parameters

  imageId | The identifier the drag source returned when registering the image (0 = none). Invalid identifier will be ignored.

## ◆ transferablesFlavorsChanged()

void transferablesFlavorsChanged | ( |  | ) |

This method notifies the context that the com::sun::star::datatransfer::DataFlavor types of the transferable object have changed.

See also
  com::sun::star::datatransfer::XTransferable

The documentation for this interface was generated from the following file:

- com/sun/star/datatransfer/dnd/XDragSourceContext.idl