pub struct WindowInsets {
pub view_padding: EdgeInsets,
pub view_insets: EdgeInsets,
pub corner_insets: CornerInsets,
}Expand description
The inset vocabulary LayoutCtx::window_insets/PaintCtx::window_insets
return — lifted because a widget that lays itself out around the status
bar, notch, or on-screen keyboard cannot otherwise name the value those
accessors hand it. A bar laying out around the iPadOS window control
names the corner value, CornerInsets.
The window’s inset state, mirroring Flutter’s ViewportMetrics; Default is
no occlusion.
Fields§
§view_padding: EdgeInsetsSystem-UI-occluded edges (status/navigation bars, cutout); never the IME.
view_insets: EdgeInsetsFully obscured edges: in practice the on-screen keyboard.
corner_insets: CornerInsetsImplementations§
Source§impl WindowInsets
impl WindowInsets
Sourcepub fn new(view_padding: EdgeInsets, view_insets: EdgeInsets) -> WindowInsets
pub fn new(view_padding: EdgeInsets, view_insets: EdgeInsets) -> WindowInsets
From the two per-edge sets, with CornerInsets::ZERO.
pub fn with_corner_insets(self, corner_insets: CornerInsets) -> WindowInsets
Sourcepub fn padding(&self) -> EdgeInsets
pub fn padding(&self) -> EdgeInsets
The safe-area padding a SafeArea insets by: view_padding - view_insets
per edge, saturating at zero (Flutter’s formula). Never transported.
Trait Implementations§
Source§impl Clone for WindowInsets
impl Clone for WindowInsets
Source§fn clone(&self) -> WindowInsets
fn clone(&self) -> WindowInsets
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WindowInsets
Source§impl Debug for WindowInsets
impl Debug for WindowInsets
Source§impl Default for WindowInsets
impl Default for WindowInsets
Source§fn default() -> WindowInsets
fn default() -> WindowInsets
Returns the “default value” for a type. Read more
Source§impl PartialEq for WindowInsets
impl PartialEq for WindowInsets
impl StructuralPartialEq for WindowInsets
Auto Trait Implementations§
impl Freeze for WindowInsets
impl RefUnwindSafe for WindowInsets
impl Send for WindowInsets
impl Sync for WindowInsets
impl Unpin for WindowInsets
impl UnsafeUnpin for WindowInsets
impl UnwindSafe for WindowInsets
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
Mutably borrows from an owned value. Read more
impl<T> Brush for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.