pub struct TreeBuilder { /* private fields */ }Expand description
Builds a tree of one or more windows.
Implementations§
Source§impl TreeBuilder
impl TreeBuilder
Sourcepub fn and_window(self, title: &str) -> Self
pub fn and_window(self, title: &str) -> Self
Starts another window; later calls add to it.
Sourcepub fn size(self, width: f32, height: f32) -> Self
pub fn size(self, width: f32, height: f32) -> Self
The current window’s size, 800 by 600 unless its content needs more height.
Sourcepub fn overlay(
self,
depth: u16,
build: impl FnOnce(NodeBuilder<AnyRole>) -> NodeBuilder<AnyRole>,
) -> Self
pub fn overlay( self, depth: u16, build: impl FnOnce(NodeBuilder<AnyRole>) -> NodeBuilder<AnyRole>, ) -> Self
Adds an overlay layer at depth to the current window, holding the builder’s children.
Sourcepub fn child<R2: RoleType>(
self,
role: R2,
name: &str,
build: impl FnOnce(NodeBuilder<R2>) -> NodeBuilder<R2>,
) -> Self
pub fn child<R2: RoleType>( self, role: R2, name: &str, build: impl FnOnce(NodeBuilder<R2>) -> NodeBuilder<R2>, ) -> Self
Adds a child of a role, named unless name is empty.
Sourcepub fn generic(
self,
build: impl FnOnce(NodeBuilder<AnyRole>) -> NodeBuilder<AnyRole>,
) -> Self
pub fn generic( self, build: impl FnOnce(NodeBuilder<AnyRole>) -> NodeBuilder<AnyRole>, ) -> Self
Adds an annotated child with no role, which infers as a generic.
Sourcepub fn text_at(self, content: &str, bounds: Rect) -> Self
pub fn text_at(self, content: &str, bounds: Rect) -> Self
Adds an unannotated text call at fixed bounds.
Sourcepub fn build(&self) -> SemanticTree
pub fn build(&self) -> SemanticTree
The tree.
Trait Implementations§
Source§impl Clone for TreeBuilder
impl Clone for TreeBuilder
Auto Trait Implementations§
impl Forget for TreeBuilder
impl Freeze for TreeBuilder
impl Move for TreeBuilder
impl RefUnwindSafe for TreeBuilderwhere
String: RefUnwindSafe,
impl Send for TreeBuilder
impl Sync for TreeBuilder
impl Unpin for TreeBuilder
impl UnsafeUnpin for TreeBuilder
impl UnwindSafe for TreeBuilder
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