pub struct OverlayModalWidget { /* private fields */ }Expand description
The retained widget for an OverlayModalView.
Implementations§
Source§impl OverlayModalWidget
impl OverlayModalWidget
Sourcepub fn panel_rect(&self) -> Rect
pub fn panel_rect(&self) -> Rect
The panel rect in the widget’s own coordinate space.
Sourcepub fn close_rect(&self) -> Option<Rect>
pub fn close_rect(&self) -> Option<Rect>
The close affordance’s hit box, when the config shows one.
Sourcepub fn handle_rect(&self) -> Option<Rect>
pub fn handle_rect(&self) -> Option<Rect>
The drag handle’s hit box, when the config shows one.
Sourcepub fn progress(&self) -> f64
pub fn progress(&self) -> f64
The ramp’s progress: 0.0 off-screen/transparent, 1.0 fully shown.
Sourcepub fn is_exiting(&self) -> bool
pub fn is_exiting(&self) -> bool
Whether an exit ramp is running (the panel is on its way out, and the barrier is still swallowing input).
Sourcepub fn open_progress(&self) -> f64
pub fn open_progress(&self) -> f64
The progress an open panel rests at: the first snap point, or fully open with none authored.
Floored above [PROGRESS_EPSILON]: a first point that normalizes to
0.0 (an explicit snap_points(&[0.0]), or a 0.0-fraction point on an
as-yet-unmeasured extent) is treated as absent rather than as “open
to closed” — the entrance ramp always has a nonzero target to animate
toward, matching Self::settle_drag’s own floor for a panel that
cannot dismiss. There is no fallible surface here
(OverlayModalView::snap_points is a plain builder call), so an
unreachable configuration silently falls back to fully open instead of
panicking.
Trait Implementations§
Source§impl Widget for OverlayModalWidget
impl Widget for OverlayModalWidget
Source§fn layout(&mut self, ctx: &mut LayoutCtx<'_>, bc: &BoxConstraints) -> Size
fn layout(&mut self, ctx: &mut LayoutCtx<'_>, bc: &BoxConstraints) -> Size
bc and return it. The chosen size must satisfy
bc (callers may additionally clamp via BoxConstraints::constrain).Source§fn paint(&mut self, ctx: &mut PaintCtx<'_>, scene: &mut dyn PaintScene)
fn paint(&mut self, ctx: &mut PaintCtx<'_>, scene: &mut dyn PaintScene)
scene. Read moreSource§fn event(&mut self, ctx: &mut EventCtx<'_>, event: &InputEvent) -> EventResult
fn event(&mut self, ctx: &mut EventCtx<'_>, event: &InputEvent) -> EventResult
ctx and reporting whether it was consumed. Read moreSource§fn semantics(&self, ctx: &mut SemanticsCtx)
fn semantics(&self, ctx: &mut SemanticsCtx)
ctx. Read moreSource§fn visit_children(&self, visitor: &mut dyn FnMut(&ChildPod))
fn visit_children(&self, visitor: &mut dyn FnMut(&ChildPod))
Auto Trait Implementations§
impl !Freeze for OverlayModalWidget
impl !RefUnwindSafe for OverlayModalWidget
impl !Send for OverlayModalWidget
impl !Sync for OverlayModalWidget
impl !UnwindSafe for OverlayModalWidget
impl Unpin for OverlayModalWidget
impl UnsafeUnpin for OverlayModalWidget
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.