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. Under a render root the call
may be skipped (see ChildPod::layout_child), so the result must
depend only on bc, the context’s globals and state changed through a
pod-dirtying channel: a LAYOUT rebuild, request_layout, an unpaced
frame request, or a handled / redraw-requesting event.Source§fn paint(&mut self, ctx: &mut PaintCtx<'_>, scene: &mut dyn PaintScene)
fn paint(&mut self, ctx: &mut PaintCtx<'_>, scene: &mut dyn PaintScene)
scene. Paint may advance animation state; it
must then call PaintCtx::request_frame until the animation rests.Source§fn event(&mut self, ctx: &mut EventCtx<'_>, event: &InputEvent) -> EventResult
fn event(&mut self, ctx: &mut EventCtx<'_>, event: &InputEvent) -> EventResult
EventResult::Ignored. Containers forward via ChildPod::event_child.Source§fn semantics(&self, ctx: &mut SemanticsCtx)
fn semantics(&self, ctx: &mut SemanticsCtx)
ChildPod::semantics_child.Source§fn visit_children(&self, visitor: &mut dyn FnMut(&ChildPod))
fn visit_children(&self, visitor: &mut dyn FnMut(&ChildPod))
ChildPods in paint order, for read-only
tooling; defaults to none and must not mutate pass state.Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
docs/LIMITATIONS.md
focus-wrapper-erasure-swap-blind); override only in a transparent wrapper.Source§fn is_focusable(&self) -> bool
fn is_focusable(&self) -> bool
Source§fn visit_focus_children(&self, visitor: &mut dyn FnMut(&ChildPod))
fn visit_focus_children(&self, visitor: &mut dyn FnMut(&ChildPod))
Widget::visit_children. A container showing only some children narrows it.Source§fn as_sliver(&mut self) -> Option<&mut (dyn SliverWidget + 'static)>
fn as_sliver(&mut self) -> Option<&mut (dyn SliverWidget + 'static)>
crate::sliver), if it speaks that protocol.
Defaults to None; transparent wrappers forward it.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.