DragAndDropTarget
interface DragAndDropTarget
Provides a means of receiving a transfer data from a drag and drop session.
Functions
fun onDrop(event: DragAndDropEvent): Boolean
An item has been dropped inside this DragAndDropTarget
.
Returns
true to indicate that the DragAndDropEvent was consumed; false indicates it was rejected. |
fun onStarted(event: DragAndDropEvent) = Unit
A drag and drop session has just been started and this DragAndDropTarget
is eligible to
receive it. This gives an opportunity to set the state for a DragAndDropTarget
in
preparation for consuming a drag and drop session.
fun onEntered(event: DragAndDropEvent) = Unit
An item being dropped has entered into the bounds of this DragAndDropTarget
.
fun onMoved(event: DragAndDropEvent) = Unit
An item being dropped has moved within the bounds of this DragAndDropTarget
.
fun onExited(event: DragAndDropEvent) = Unit
An item being dropped has moved outside the bounds of this DragAndDropTarget
.
fun onChanged(event: DragAndDropEvent) = Unit
An event in the current drag and drop session has changed within this DragAndDropTarget
bounds. Perhaps a modifier key has been pressed or released.
fun onEnded(event: DragAndDropEvent) = Unit
The drag and drop session has been completed. All DragAndDropTarget
instances in the
hierarchy that previously received an onStarted
event will receive this event. This gives
an opportunity to reset the state for a DragAndDropTarget
.