LibreOffice
LibreOffice 24.2 SDK API Reference
|
This interface is implemented by a view or window that supports drag operations and will be received as part of a DragGestureEvent through a com::sun::star::datatransfer::dnd::XDragGestureListener::dragGestureRecognized() callback. More...
import"XDragSource.idl";
Public Member Functions | |
boolean | isDragImageSupported () |
In order to query if drag image support is available. More... | |
long | getDefaultCursor ([in] byte dragAction) raises ( com::sun::star::lang::IllegalArgumentException ) |
To get the default cursor for a specified drag action. More... | |
void | startDrag ([in] DragGestureEvent trigger, [in] byte sourceActions, [in] long cursor, [in] long image, [in] com::sun::star::datatransfer::XTransferable trans, [in] XDragSourceListener listener) |
Starts the drag operation. More... | |
Public Member Functions inherited from XInterface | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
This interface is implemented by a view or window that supports drag operations and will be received as part of a DragGestureEvent through a com::sun::star::datatransfer::dnd::XDragGestureListener::dragGestureRecognized() callback.
Differently to Java, the association between view and interface is fixed and can not be changed. Otherwise, the AWT messaging would have to be implemented for any window supporting Drag and Drop operations, which would be a real performance issue.
long getDefaultCursor | ( | [in] byte | dragAction | ) | |
raises | ( | com::sun::star::lang::IllegalArgumentException | |||
) |
To get the default cursor for a specified drag action.
dragAction | A drag action as specified in DNDConstants. |
The returned value may be used as parameter for the method com::sun::star::datatransfer::dnd::XDragSourceContext::setCursor().
boolean isDragImageSupported | ( | ) |
In order to query if drag image support is available.
void startDrag | ( | [in] DragGestureEvent | trigger, |
[in] byte | sourceActions, | ||
[in] long | cursor, | ||
[in] long | image, | ||
[in] com::sun::star::datatransfer::XTransferable | trans, | ||
[in] XDragSourceListener | listener | ||
) |
Starts the drag operation.
Note: this call does not block until the drag and drop operation ends. If the Drag and Drop system is unable to initiate a drag operation or if the user attempts to start a drag while an existing drag operation is still executing, the action fails immediately. This is indicated by calling com::sun::star::datatransfer::dnd::XDragSourceListener::dragDropEnd() on the parameter listener with a DragSourceDragEvent showing a failure.
trigger | The DragGestureEvent that initiated the drag. |
sourceActions | The action or actions supported for this transferable as defined in DNDConstants. |
cursor | The initial drag cursor id or 0 as default. |
image | The initial drag image id or 0 as default. |
trans | The transferable object dragged. |
listener | The XDragSourceListener. |