LibreOffice
LibreOffice 7.4 SDK API Reference
Public Member Functions | List of all members
XDropTarget Interface Referencepublished

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

import"XDropTarget.idl";

Inheritance diagram for XDropTarget:
XInterface OleDropTarget X11DropTarget

Public Member Functions

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

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
dtlThe 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
dtlThe listener to remove from notification list.

◆ setActive()

void setActive ( [in] boolean  active)

Sets the drop target object active or inactive.

Parameters
activeA 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
actionsThe actions.
See also
com::sun::star::datatransfer::dnd::DNDConstants

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