[−][src]Struct imgui::TreeNode
Builder for a tree node widget
Implementations
impl<'a> TreeNode<'a>
[src]
pub fn new<I: Into<TreeNodeId<'a>>>(id: I) -> TreeNode<'a>
[src]
Constructs a new tree node builder
pub fn label(self, label: &'a ImStr) -> Self
[src]
Sets the tree node label
pub fn opened(self, opened: bool, cond: Condition) -> Self
[src]
Sets the opened state of the tree node, which is applied based on the given condition value
pub fn flags(self, flags: TreeNodeFlags) -> Self
[src]
Replaces all current settings with the given flags.
pub fn selected(self, value: bool) -> Self
[src]
Enables/disables drawing the tree node in selected state.
Disabled by default.
pub fn framed(self, value: bool) -> Self
[src]
Enables/disables full-colored frame.
Disabled by default.
pub fn allow_item_overlap(self, value: bool) -> Self
[src]
Enables/disables allowing the tree node to overlap subsequent widgets.
Disabled by default.
pub fn tree_push_on_open(self, value: bool) -> Self
[src]
Enables/disables automatic tree push when the tree node is open (= adds extra indentation and pushes to the ID stack).
Enabled by default.
pub fn auto_open_on_log(self, value: bool) -> Self
[src]
Enables/disables automatic opening of the tree node when logging is active.
By default, logging will automatically open all tree nodes.
Enabled by default.
pub fn default_open(self, value: bool) -> Self
[src]
Sets the default open state for the tree node.
Tree nodes are closed by default.
pub fn open_on_double_click(self, value: bool) -> Self
[src]
Only open when the tree node is double-clicked.
Disabled by default.
pub fn open_on_arrow(self, value: bool) -> Self
[src]
Only open when clicking the arrow part of the tree node.
Disabled by default.
pub fn leaf(self, value: bool) -> Self
[src]
Enable/disables leaf mode (no collapsing, no arrow).
Disabled by default.
pub fn bullet(self, value: bool) -> Self
[src]
Display a bullet instead of arrow.
Disabled by default.
pub fn frame_padding(self, value: bool) -> Self
[src]
Use frame_padding
to vertically align text baseline to regular widget height.
Disabled by default.
pub fn nav_left_jumps_back_here(self, value: bool) -> Self
[src]
Left direction may move to this tree node from any of its child.
Disabled by default.
#[must_use]pub fn push(self, ui: &Ui<'_>) -> Option<TreeNodeToken>
[src]
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 must be popped by calling .pop()
.
Returns None
if the tree node is not open and no content should be rendered.
pub fn build<F: FnOnce()>(self, ui: &Ui<'_>, f: F)
[src]
Creates a tree node and runs a closure to construct the contents.
Note: the closure is not called if the tree node is not open.
Trait Implementations
impl<'a> Clone for TreeNode<'a>
[src]
impl<'a> Copy for TreeNode<'a>
[src]
impl<'a> Debug for TreeNode<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for TreeNode<'a>
impl<'a> !Send for TreeNode<'a>
impl<'a> !Sync for TreeNode<'a>
impl<'a> Unpin for TreeNode<'a>
impl<'a> UnwindSafe for TreeNode<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,