FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    BaseTreeViewDropHandler

    trait · ferroui-xaml-interactions-draganddrop · v0.5.0

    trait BaseTreeViewDropHandler
    

    Provides base drag-and-drop visuals and validation helpers for TreeView scenarios: while an item is dragged over a tree view, the item under the pointer gets the class DraggingUp or DraggingDown (the half of the item the pointer is over), or TargetHighlight when the dragged item would move to another parent (the styles document of the crate styles these classes).

    Deviation (DEVIATIONS.md, Behaviors): the abstract class of the reference is a trait, and every type that implements it is a DropHandlerBase with the validation, execution and cancellation of the class; the abstract overload Validate(TreeView, ..) of the reference is validate_tree_view.

    View source

    Members

    validate_tree_view

    fn validate_tree_view(self: &Self, tree_view: &Ref<TreeView>, e: &DragEventArgs, source_context: Option<&BoxedValue>, target_context: Option<&BoxedValue>, execute: bool) -> (bool, bool)
    

    Validates a pending tree-view drag operation and optionally executes it (when execute).

    Returns whether the operation is valid, and whether the source item will be moved to a different parent.

    Source

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.