pub struct DropTargetStyleConfig {
pub content_id: WidgetId,
pub drag_state: Signal<DropTargetDragState>,
pub active_region: Signal<Option<DropRegion>>,
pub regions: DropRegionSet,
pub region_hints: Vec<(DropRegion, WidgetId)>,
pub size_factor: f32,
pub variant: DropTargetVariant,
}Expand description
Inputs handed to a DropTargetStyle to build the wrapping chrome.
Fields§
§content_id: WidgetIdThe user’s child widget — fills the full bounds and is always visible.
drag_state: Signal<DropTargetDragState>Reactive overall interaction state (idle / accepting / rejecting) — bind overlay border colors and the reject tint to it.
active_region: Signal<Option<DropRegion>>Which region the pointer is currently over while an accepted payload
hovers (None when idle, rejecting, or over a disabled middle). Drives
the per-zone highlight and which hint is shown.
regions: DropRegionSetWhich regions this target exposes. Center-only is the classic
whole-bounds single-zone case.
region_hints: Vec<(DropRegion, WidgetId)>Pre-built per-region hint content (user slots), each centered inside a popup card within its region’s rect while that region is the active accepted-hover. Empty when no hints were set.
size_factor: f32Side-zone size factor (already clamped to 0.1..=1.0): the fraction of
the axis each edge zone occupies.
variant: DropTargetVariantVisual prominence requested by the caller.
Trait Implementations§
Source§impl Clone for DropTargetStyleConfig
impl Clone for DropTargetStyleConfig
Source§fn clone(&self) -> DropTargetStyleConfig
fn clone(&self) -> DropTargetStyleConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more