DragOperation

interface DragOperation

Represents the characteristics of data that is transferred from a source to a target during a drag-drop sequence.

Types

Link copied to clipboard

The set of possible drop modes for the data in bundle

Properties

Link copied to clipboard

The set of allowed drop actions

Link copied to clipboard
abstract val bundle: DataBundle

The data to be dropped

Link copied to clipboard
open val visual: Renderable?

The bundle's visual representation

Link copied to clipboard

The offset (relative to the pointer) where the visual should be rendered

Functions

Link copied to clipboard
open fun canceled()

Called when the drag operation was not completed for some reason (i.e. the user canceled, or the Action requested was not supported by this operation or the target where the drop was attempted.

Link copied to clipboard
abstract fun completed(action: DragOperation.Action)

Called when the drag operation was successfully completed. Implementations must properly handle the Action to ensure that data dropped on the target is correctly copied, moved, or linked.

Link copied to clipboard
open fun started()

Indicates that the operation is started. This will be called once the user begins dragging the pointer.