Skip to main content

Module hooks

Module hooks 

Source
Expand description

Hooks for providing and consuming the drag context.

Structs§

BridgeGeometry
A plain, component-owned fan-out for one bridge element’s geometry.
BridgeWorld
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 their Ts again.

Functions§

client_point
Client (viewport) coordinates of a native drag event as a Point. In-app drags don’t produce DragEvents; 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. See client_point for when these apply.
use_bridge_world
Register zone_id as a drop target in T’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 the crate::core::components::DndProvider component).
use_rect_refresh
The provider tree’s RectRefresh channel: ping refresh_all() after you move layout under a live drag (scrolling a custom container, collapsing a panel) so hit-testing and data-over track the new geometry. crate::autoscroll::AutoScroll pings it for you.
use_zone_id
A stable, auto-generated ZoneId for this component instance.
use_zone_registry
Grab the zone registry (mounted drop zones, in order). Provided alongside the context by use_dnd_provider.