Struct imgui::TreeNode[][src]

#[must_use]pub struct TreeNode<'a> { /* fields omitted */ }

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(mut self: Self, label: &'a ImStr) -> Self[src]

Sets the tree node label

pub fn opened(mut self: 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(mut self: Self, flags: TreeNodeFlags) -> Self[src]

Replaces all current settings with the given flags.

pub fn selected(mut self: Self, value: bool) -> Self[src]

Enables/disables drawing the tree node in selected state.

Disabled by default.

pub fn framed(mut self: Self, value: bool) -> Self[src]

Enables/disables full-colored frame.

Disabled by default.

pub fn allow_item_overlap(mut self: Self, value: bool) -> Self[src]

Enables/disables allowing the tree node to overlap subsequent widgets.

Disabled by default.

pub fn tree_push_on_open(mut self: 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(mut self: 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(mut self: 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(mut self: Self, value: bool) -> Self[src]

Only open when the tree node is double-clicked.

Disabled by default.

pub fn open_on_arrow(mut self: Self, value: bool) -> Self[src]

Only open when clicking the arrow part of the tree node.

Disabled by default.

pub fn leaf(mut self: Self, value: bool) -> Self[src]

Enable/disables leaf mode (no collapsing, no arrow).

Disabled by default.

pub fn bullet(mut self: Self, value: bool) -> Self[src]

Display a bullet instead of arrow.

Disabled by default.

pub fn frame_padding(mut self: 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(mut self: 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>[src]

impl<'a> !Send for TreeNode<'a>[src]

impl<'a> !Sync for TreeNode<'a>[src]

impl<'a> Unpin for TreeNode<'a>[src]

impl<'a> UnwindSafe for TreeNode<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.