Skip to main content

Module tree

Module tree 

Source
Expand description

Hierarchical drops - file explorers, nested menus, outliners.

The classic tree problem: a drop on a node can mean three different things. DropIntent captures that trichotomy, intent_from_offset derives it from where inside the row the pointer sits (top quarter = before, bottom quarter = after, middle = into), and would_create_cycle guards against dropping a node into its own subtree.

Re-exports§

pub use TreeNodeTarget_completions::Component::TreeNodeTarget;

Structs§

NodeId
Identifies a tree node.
TreeDropEvent
A completed tree drop.
TreeNodeTargetProps
Properties for the TreeNodeTarget component.

Enums§

DropIntent
Where, relative to the target node, the payload should land.

Functions§

TreeNodeTarget
A single tree row that acts as a drop target with intent detection.
intent_from_offset
Derive a DropIntent from the pointer’s Y offset within a row of the given height. Top 25% → Before, bottom 25% → After, middle → Into.
would_create_cycle
Would attaching dragged under target create a cycle? Walks target’s ancestry via the parent_of lookup you provide.