Scoop API

scoop:scoop.ui.component:0.1.0

TreeDrag

class TreeDrag

source · line 21
public
public class TreeDrag<T> public constructor(
    public val onDrop: (TreeDrop<T>) -> Boolean,
    public val allowDrop: (TreeDrop<T>) -> Boolean = { _ -> true },
    public val enabled: Boolean = true,
    public val expandDelay: Duration = Duration.milliseconds(650L),
    public val content: (TreeNode<T>) -> DragContent = { node -> DragContent.Text(node.label) },
    public val onStart: (TreeNode<T>, DragSourceStart) -> Unit = { _, _ -> },
    public val onEnter: (TreeDrop<T>) -> Unit = { _ -> },
    public val onOver: (TreeDrop<T>) -> Unit = { _ -> },
    public val onLeave: (TreeDrop<T>) -> Unit = { _ -> },
    public val onEnd: (TreeNode<T>, DragResult) -> Unit = { _, _ -> }
)

Tree resolves moves; the application commits data or performs its own IO in onDrop.

constructor constructor

source · line 21
public
constructor(public val onDrop: (TreeDrop<T>) -> Boolean, public val allowDrop: (TreeDrop<T>) -> Boolean = { _ -> true }, public val enabled: Boolean = true, public val expandDelay: Duration = Duration.milliseconds(650L), public val content: (TreeNode<T>) -> DragContent = { node -> DragContent.Text(node.label) }, public val onStart: (TreeNode<T>, DragSourceStart) -> Unit = { _, _ -> }, public val onEnter: (TreeDrop<T>) -> Unit = { _ -> }, public val onOver: (TreeDrop<T>) -> Unit = { _ -> }, public val onLeave: (TreeDrop<T>) -> Unit = { _ -> }, public val onEnd: (TreeNode<T>, DragResult) -> Unit = { _, _ -> })