pub struct EngineCx<'a, B: Toolkit> { /* private fields */ }Trait Implementations§
Source§impl<B: Toolkit> LayoutOps for EngineCx<'_, B>
impl<B: Toolkit> LayoutOps for EngineCx<'_, B>
fn measure_child(&mut self, child: RNode, p: Proposal) -> Size
fn place_child(&mut self, child: RNode, rect: Rect)
Source§fn place_child_native(&mut self, child: RNode, rect: Rect)
fn place_child_native(&mut self, child: RNode, rect: Rect)
Place a child whose on-screen frame is native-owned (nav pages in splitter panes /
nav-controller views): never direction-mirrored, because the toolkit positions it.
fn flex_of(&self, child: RNode) -> Flex
fn children_of(&self, node: RNode) -> Vec<RNode>
Source§fn measure_leaf(&mut self, p: Proposal) -> Size
fn measure_leaf(&mut self, p: Proposal) -> Size
Native intrinsic measurement of the current node (leaves).
Source§fn baseline_of(&mut self, child: RNode, size: Size) -> Option<f64>
fn baseline_of(&mut self, child: RNode, size: Size) -> Option<f64>
A child’s first text baseline at
size, from the top of its box (docs/baseline.md):
the toolkit answers for a native leaf, the child’s own Layout::baseline for a
container. None ⇒ no baseline to align to.Source§fn set_scroll_content(&mut self, content: Size)
fn set_scroll_content(&mut self, content: Size)
Report scroll content size for the current node (§7.6).
Source§fn scroll_bar_inset(&mut self, vertical: bool) -> f64
fn scroll_bar_inset(&mut self, vertical: bool) -> f64
The room the current scroll node’s scroll bar takes from its content area while the
content overflows (
Toolkit::scroll_bar_inset); 0 where bars overlay the content.Source§fn report_overflow(&mut self, needed: f64, available: f64)
fn report_overflow(&mut self, needed: f64, available: f64)
Report that the current node’s children outgrew the bounds its
place() was given
(needed vs available main-axis points). A diagnostic hook, not a layout input:
the engine logs it once per node in debug builds and ignores it in release, and
placement proceeds unchanged either way. Scroll containers never report, since
content larger than the viewport is their normal state.Auto Trait Implementations§
impl<'a, B> !RefUnwindSafe for EngineCx<'a, B>
impl<'a, B> !Send for EngineCx<'a, B>
impl<'a, B> !Sync for EngineCx<'a, B>
impl<'a, B> !UnwindSafe for EngineCx<'a, B>
impl<'a, B> Freeze for EngineCx<'a, B>
impl<'a, B> Unpin for EngineCx<'a, B>
impl<'a, B> UnsafeUnpin for EngineCx<'a, B>
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> 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