interface DragAndDropTarget
Provides a means of receiving a transfer data from a drag and drop session.
Functions
onDrop
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. |
onStarted
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.
onEntered
fun onEntered(event: DragAndDropEvent) = Unit
An item being dropped has entered into the bounds of this DragAndDropTarget.
onMoved
fun onMoved(event: DragAndDropEvent) = Unit
An item being dropped has moved within the bounds of this DragAndDropTarget.
onExited
fun onExited(event: DragAndDropEvent) = Unit
An item being dropped has moved outside the bounds of this DragAndDropTarget.
onChanged
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.
onEnded
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.