LibreOffice LibreOffice 26.2 SDK API Reference

Loading...
Searching...
No Matches
XDropTarget Interface Referencepublished

This interface is implemented by a view or window that supports drop operations. More...

`import "XDropTarget.idl";`

Inheritance diagram for XDropTarget:

## Public Member Functions
void | addDropTargetListener ([in] XDropTargetListener dtl)
| Add a DropTargetListener.
void | removeDropTargetListener ([in] XDropTargetListener dtl)
| Remove a drop target listener.
boolean | isActive ()
| Indicates either a drop target object is active or not.
void | setActive ([in] boolean active)
| Sets the drop target object active or inactive.
byte | getDefaultActions ()
| Determine the actions supported by a drop target.
void | setDefaultActions ([in] byte actions)
| Sets the default acceptable actions for this drop target.
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

This interface is implemented by a view or window that supports drop operations.

Differently to Java, the association between view and interface is fixed and cannot be changed. Otherwise, the AWT messaging would have to be implemented for any window supporting Drag and Drop operations, which would be a performance issue.

## Member Function Documentation

## ◆ addDropTargetListener()

void addDropTargetListener | ( | [in] XDropTargetListener | dtl | ) |

Add a DropTargetListener.

The listener will be queried for the XAutoscroll interface to see if it supports autoscrolling.

Parameters

  dtl | The listener to add to the notification list.

## ◆ getDefaultActions()

byte getDefaultActions | ( |  | ) |

Determine the actions supported by a drop target.

Returns
  The current action or actions supported by this drop target.

By default this will include all drag and drop actions.

See also
  com::sun::star::datatransfer::dnd::DNDConstants

## ◆ isActive()

boolean isActive | ( |  | ) |

Indicates either a drop target object is active or not.

Returns
  A boolean indicating whether or not this drop target object is currently active, that is ready to accept drops.

## ◆ removeDropTargetListener()

void removeDropTargetListener | ( | [in] XDropTargetListener | dtl | ) |

Remove a drop target listener.

Parameters

  dtl | The listener to remove from notification list.

## ◆ setActive()

void setActive | ( | [in] boolean | active | ) |

Sets the drop target object active or inactive.

Parameters

  active | A value of TRUE sets the drop target object active.

A value of FALSE sets the drop target object inactive.

## ◆ setDefaultActions()

void setDefaultActions | ( | [in] byte | actions | ) |

Sets the default acceptable actions for this drop target.

This method is a way to reduce the number of Drag and Drop events by blocking events for actions not supported by this target.

By default the listener will receive notifications for all actions.

Parameters

  actions | The actions.

See also
  com::sun::star::datatransfer::dnd::DNDConstants

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

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