pub struct LayoutState { /* private fields */ }Expand description
The measured size and placed position that a layout node kept from its latest layout pass.
Implementations§
Source§impl LayoutState
impl LayoutState
Sourcepub fn position(&self) -> Point
pub fn position(&self) -> Point
Returns the placed position relative to the parent, in logical pixels.
Sourcepub fn content_offset(&self) -> Point
pub fn content_offset(&self) -> Point
Offset of the content box relative to the node origin (e.g. due to padding).
Sourcepub fn at_origin(self) -> Self
pub fn at_origin(self) -> Self
The same state placed at the origin: what a window root’s own scene starts from, since the position its parent gave it belongs to the parent’s window.
Sourcepub fn z_index(&self) -> f32
pub fn z_index(&self) -> f32
The z index the node’s parent last placed it with. It adds to the
node’s Modifier::z_index to order the node among its siblings.
Sourcepub fn places_children_with_z_index(&self) -> bool
pub fn places_children_with_z_index(&self) -> bool
Whether the node’s last placement gave one of its children a z index other than 0: the scene then orders the children by z index.
Trait Implementations§
Auto Trait Implementations§
impl Forget for LayoutState
impl Freeze for LayoutState
impl Move for LayoutState
impl RefUnwindSafe for LayoutState
impl Send for LayoutState
impl Sync for LayoutState
impl Unpin for LayoutState
impl UnsafeUnpin for LayoutState
impl UnwindSafe for LayoutState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
Converts
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> ⓘ
Converts
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