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§
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>
Sourcefn measure_leaf(&mut self, p: Proposal) -> Size
fn measure_leaf(&mut self, p: Proposal) -> Size
Native intrinsic measurement of the CURRENT node (leaves).
Sourcefn 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).
Provided Methods§
Sourcefn 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 — the toolkit positions it.