Skip to main content

EngineCx

Struct EngineCx 

Source
pub struct EngineCx<'a, B: Toolkit> { /* private fields */ }

Trait Implementations§

Source§

impl<B: Toolkit> LayoutOps for EngineCx<'_, B>

Source§

fn measure_child(&mut self, child: RNode, p: Proposal) -> Size

Source§

fn place_child(&mut self, child: RNode, rect: Rect)

Source§

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.
Source§

fn flex_of(&self, child: RNode) -> Flex

Source§

fn children_of(&self, node: RNode) -> Vec<RNode>

Source§

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>

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)

Report scroll content size for the current node (§7.6).
Source§

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)

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Day API ↩ Guides· daybrite.dev