Expand description
Hooks for providing and consuming the drag context.
Structs§
- Bridge
Geometry - A plain, component-owned fan-out for one bridge element’s geometry.
- Bridge
World - Live, type-erased view of one payload world at a bridge zone, as returned
by
use_bridge_world- so callers can OR any number of worlds together without naming theirTs again.
Functions§
- client_
point - Client (viewport) coordinates of a native drag event as a
Point. In-app drags don’t produceDragEvents; this serves the boundary modules (crate::files,crate::external) and custom native zones. - element_
point - Element-relative coordinates of a native drag event as a
Point. Seeclient_pointfor when these apply. - use_
bridge_ world - Register
zone_idas a drop target inT’s payload world and report that world’s live state this render. - use_dnd
- Grab the nearest
DndContext<T>from context. - use_
dnd_ provider - Provide a
DndContext<T>(and its zone registry) to this component’s subtree. Call once, high up (or use thecrate::core::components::DndProvidercomponent). - use_
rect_ refresh - The provider tree’s
RectRefreshchannel: pingrefresh_all()after you move layout under a live drag (scrolling a custom container, collapsing a panel) so hit-testing anddata-overtrack the new geometry.crate::autoscroll::AutoScrollpings it for you. - use_
zone_ id - A stable, auto-generated
ZoneIdfor this component instance. - use_
zone_ registry - Grab the zone registry (mounted drop zones, in order). Provided alongside
the context by
use_dnd_provider.