pub struct LayoutState { /* private fields */ }Implementations§
Source§impl LayoutState
impl LayoutState
pub fn size(&self) -> Size
pub fn position(&self) -> Point
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 set_content_offset(&mut self, offset: Point)
pub fn set_content_offset(&mut self, offset: Point)
Writes the content offset, reporting an actual change to the semantics tree.
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.
pub fn is_placed(&self) -> bool
Sourcepub fn set_size(&mut self, size: Size)
pub fn set_size(&mut self, size: Size)
Writes the measured size, self-reporting an actual change to the scene phase.
Sourcepub fn place(&mut self, position: Point)
pub fn place(&mut self, position: Point)
Writes the placed position and marks the node placed, self-reporting an actual move to the scene phase, and a placement of a node the scene does not draw: one the running pass did not find placed. A move is reported apart, so the scene can keep what it drew for the node.
Sourcepub fn clear_placed(&mut self)
pub fn clear_placed(&mut self)
Clears the placed flag at the start of a layout pass. Until its parent places it again the pass counts the node unplaced, and the pass names it to the scene phase if it ends that way.
Trait Implementations§
Source§impl Clone for LayoutState
impl Clone for LayoutState
Source§impl Debug for LayoutState
impl Debug for LayoutState
Auto Trait Implementations§
impl Freeze 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
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> ⓘ
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