pub struct TreeNode<'a, T, L = &'static str> { /* private fields */ }
Expand description
Builder for a tree node widget
Implementations§
Source§impl<'a, T, L> TreeNode<'a, T, L>
impl<'a, T, L> TreeNode<'a, T, L>
Sourcepub fn opened(self, opened: bool, cond: Condition) -> TreeNode<'a, T, L>
pub fn opened(self, opened: bool, cond: Condition) -> TreeNode<'a, T, L>
Sets the opened state of the tree node, which is applied based on the given condition value
Sourcepub fn flags(self, flags: TreeNodeFlags) -> TreeNode<'a, T, L>
pub fn flags(self, flags: TreeNodeFlags) -> TreeNode<'a, T, L>
Replaces all current settings with the given flags.
Sourcepub fn selected(self, value: bool) -> TreeNode<'a, T, L>
pub fn selected(self, value: bool) -> TreeNode<'a, T, L>
Enables/disables drawing the tree node in selected state.
Disabled by default.
Sourcepub fn framed(self, value: bool) -> TreeNode<'a, T, L>
pub fn framed(self, value: bool) -> TreeNode<'a, T, L>
Enables/disables full-colored frame.
Disabled by default.
Sourcepub fn allow_item_overlap(self, value: bool) -> TreeNode<'a, T, L>
pub fn allow_item_overlap(self, value: bool) -> TreeNode<'a, T, L>
Enables/disables allowing the tree node to overlap subsequent widgets.
Disabled by default.
Sourcepub fn tree_push_on_open(self, value: bool) -> TreeNode<'a, T, L>
pub fn tree_push_on_open(self, value: bool) -> TreeNode<'a, T, L>
Enables/disables automatic tree push when the tree node is open (= adds extra indentation and pushes to the ID stack).
Enabled by default.
Sourcepub fn auto_open_on_log(self, value: bool) -> TreeNode<'a, T, L>
pub fn auto_open_on_log(self, value: bool) -> TreeNode<'a, T, L>
Enables/disables automatic opening of the tree node when logging is active.
By default, logging will automatically open all tree nodes.
Enabled by default.
Sourcepub fn default_open(self, value: bool) -> TreeNode<'a, T, L>
pub fn default_open(self, value: bool) -> TreeNode<'a, T, L>
Sets the default open state for the tree node.
Tree nodes are closed by default.
Sourcepub fn open_on_double_click(self, value: bool) -> TreeNode<'a, T, L>
pub fn open_on_double_click(self, value: bool) -> TreeNode<'a, T, L>
Only open when the tree node is double-clicked.
Disabled by default.
Sourcepub fn open_on_arrow(self, value: bool) -> TreeNode<'a, T, L>
pub fn open_on_arrow(self, value: bool) -> TreeNode<'a, T, L>
Only open when clicking the arrow part of the tree node.
Disabled by default.
Sourcepub fn leaf(self, value: bool) -> TreeNode<'a, T, L>
pub fn leaf(self, value: bool) -> TreeNode<'a, T, L>
Enable/disables leaf mode (no collapsing, no arrow).
Disabled by default.
Sourcepub fn bullet(self, value: bool) -> TreeNode<'a, T, L>
pub fn bullet(self, value: bool) -> TreeNode<'a, T, L>
Display a bullet instead of arrow.
Disabled by default.
Sourcepub fn frame_padding(self, value: bool) -> TreeNode<'a, T, L>
pub fn frame_padding(self, value: bool) -> TreeNode<'a, T, L>
Use frame_padding
to vertically align text baseline to regular widget height.
Disabled by default.
Left direction may move to this tree node from any of its child.
Disabled by default.
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.
Trait Implementations§
impl<'a, T, L> Copy for TreeNode<'a, T, L>
Auto Trait Implementations§
impl<'a, T, L> Freeze for TreeNode<'a, T, L>
impl<'a, T, L = &'static str> !RefUnwindSafe for TreeNode<'a, T, L>
impl<'a, T, L = &'static str> !Send for TreeNode<'a, T, L>
impl<'a, T, L = &'static str> !Sync for TreeNode<'a, T, L>
impl<'a, T, L> Unpin for TreeNode<'a, T, L>
impl<'a, T, L = &'static str> !UnwindSafe for TreeNode<'a, T, L>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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