pub struct DropRegionSpec { /* private fields */ }Expand description
Per-region configuration for a multi-zone DropTarget: an optional hint
plus a reactive enabled flag. Kept as a struct so more per-zone knobs can
land without a signature churn.
Implementations§
Source§impl DropRegionSpec
impl DropRegionSpec
Sourcepub fn hint(self, widget: impl Widget + 'static) -> Self
pub fn hint(self, widget: impl Widget + 'static) -> Self
Widget shown (centered in this region’s rect, inside a popup card) while a drag with an accepted payload hovers this region.
Sourcepub fn hint_id(self, id: WidgetId) -> Self
pub fn hint_id(self, id: WidgetId) -> Self
This region’s hint content by pre-registered WidgetId.
Sourcepub fn enabled(self, enabled: impl Into<Prop<bool>>) -> Self
pub fn enabled(self, enabled: impl Into<Prop<bool>>) -> Self
Whether this zone is active — static or signal-bound (default true). A
bound Signal<bool> enables/disables the zone live, without a rebuild:
while disabled the zone stops hit-testing (its area falls through to the
next-priority enabled zone, or Center, or rejects), never highlights,
and never shows its hint. The enabled state is resolved on every drag
tick, so a .set(false) mid-drag takes effect on the next hover.
Trait Implementations§
Source§impl Debug for DropRegionSpec
impl Debug for DropRegionSpec
Auto Trait Implementations§
impl !RefUnwindSafe for DropRegionSpec
impl !Send for DropRegionSpec
impl !Sync for DropRegionSpec
impl !UnwindSafe for DropRegionSpec
impl Freeze for DropRegionSpec
impl Unpin for DropRegionSpec
impl UnsafeUnpin for DropRegionSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more