Skip to main content

LayoutOps

Trait LayoutOps 

Source
pub trait LayoutOps {
    // Required methods
    fn measure_child(&mut self, child: RNode, p: Proposal) -> Size;
    fn place_child(&mut self, child: RNode, rect: Rect);
    fn flex_of(&self, child: RNode) -> Flex;
    fn children_of(&self, node: RNode) -> Vec<RNode>;
    fn measure_leaf(&mut self, p: Proposal) -> Size;
    fn set_scroll_content(&mut self, content: Size);

    // Provided method
    fn place_child_native(&mut self, child: RNode, rect: Rect) { ... }
}
Expand description

The engine surface visible to Layout implementations.

Required Methods§

Source

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

Source

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

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 set_scroll_content(&mut self, content: Size)

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

Provided Methods§

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 — the toolkit positions it.

Implementors§

Source§

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

Day API ↩ Guides· daybrite.dev