pub struct TreeNode<'a, T, L = &'static str> { /* private fields */ }Expand description
Builder for a tree node widget
Implementations§
Source§impl<'a, T: AsRef<str>, L: AsRef<str>> TreeNode<'a, T, L>
impl<'a, T: AsRef<str>, L: AsRef<str>> TreeNode<'a, T, L>
Sourcepub fn framed(self, framed: bool) -> Self
pub fn framed(self, framed: bool) -> Self
Draw frame with background (e.g. for CollapsingHeader)
Sourcepub fn allow_item_overlap(self, allow: bool) -> Self
pub fn allow_item_overlap(self, allow: bool) -> Self
Hit testing to allow subsequent widgets to overlap this one
Sourcepub fn no_tree_push_on_open(self, no_push: bool) -> Self
pub fn no_tree_push_on_open(self, no_push: bool) -> Self
Don’t do a TreePush() when open (e.g. for CollapsingHeader)
Sourcepub fn no_auto_open_on_log(self, no_auto: bool) -> Self
pub fn no_auto_open_on_log(self, no_auto: bool) -> Self
Don’t automatically and temporarily open node when Logging is active
Sourcepub fn default_open(self, default_open: bool) -> Self
pub fn default_open(self, default_open: bool) -> Self
Default node to be open
Sourcepub fn open_on_double_click(self, double_click: bool) -> Self
pub fn open_on_double_click(self, double_click: bool) -> Self
Need double-click to open node
Sourcepub fn open_on_arrow(self, arrow_only: bool) -> Self
pub fn open_on_arrow(self, arrow_only: bool) -> Self
Only open when clicking on the arrow part
Sourcepub fn leaf(self, leaf: bool) -> Self
pub fn leaf(self, leaf: bool) -> Self
No collapsing, no arrow (use as a convenience for leaf nodes)
Sourcepub fn frame_padding(self, frame_padding: bool) -> Self
pub fn frame_padding(self, frame_padding: bool) -> Self
Use FramePadding to vertically align text baseline to regular widget height
Sourcepub fn span_avail_width(self, span: bool) -> Self
pub fn span_avail_width(self, span: bool) -> Self
Extend hit box to the right-most edge
Sourcepub fn span_full_width(self, span: bool) -> Self
pub fn span_full_width(self, span: bool) -> Self
Extend hit box to the left-most and right-most edges
Left direction may move to this tree node from any of its child
Sourcepub fn push(self) -> Option<TreeNodeToken<'a>>
pub fn push(self) -> Option<TreeNodeToken<'a>>
Pushes a tree node and starts appending to it.
Returns Some(TreeNodeToken) if the tree node is open. After content has been
rendered, the token can be popped by calling .pop().
Returns None if the tree node is not open and no content should be rendered.