Struct arcdps_imgui::TreeNode
source · pub struct TreeNode<T, L = &'static str> { /* private fields */ }
Expand description
Builder for a tree node widget
Implementations§
source§impl<T: AsRef<str>, L: AsRef<str>> TreeNode<T, L>
impl<T: AsRef<str>, L: AsRef<str>> TreeNode<T, L>
sourcepub fn label<I: Into<TreeNodeId<L2>>, L2: AsRef<str>>(
self,
label: L2,
) -> TreeNode<T, L2>
pub fn label<I: Into<TreeNodeId<L2>>, L2: AsRef<str>>( self, label: L2, ) -> TreeNode<T, L2>
Sets the tree node label
sourcepub fn opened(self, opened: bool, cond: Condition) -> Self
pub fn opened(self, opened: bool, cond: Condition) -> Self
Sets the opened state of the tree node, which is applied based on the given condition value
sourcepub fn flags(self, flags: TreeNodeFlags) -> Self
pub fn flags(self, flags: TreeNodeFlags) -> Self
Replaces all current settings with the given flags.
sourcepub fn selected(self, value: bool) -> Self
pub fn selected(self, value: bool) -> Self
Enables/disables drawing the tree node in selected state.
Disabled by default.
sourcepub fn framed(self, value: bool) -> Self
pub fn framed(self, value: bool) -> Self
Enables/disables full-colored frame.
Disabled by default.
sourcepub fn allow_item_overlap(self, value: bool) -> Self
pub fn allow_item_overlap(self, value: bool) -> Self
Enables/disables allowing the tree node to overlap subsequent widgets.
Disabled by default.
sourcepub fn tree_push_on_open(self, value: bool) -> Self
pub fn tree_push_on_open(self, value: bool) -> Self
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) -> Self
pub fn auto_open_on_log(self, value: bool) -> Self
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) -> Self
pub fn default_open(self, value: bool) -> Self
Sets the default open state for the tree node.
Tree nodes are closed by default.
sourcepub fn open_on_double_click(self, value: bool) -> Self
pub fn open_on_double_click(self, value: bool) -> Self
Only open when the tree node is double-clicked.
Disabled by default.
sourcepub fn open_on_arrow(self, value: bool) -> Self
pub fn open_on_arrow(self, value: bool) -> Self
Only open when clicking the arrow part of the tree node.
Disabled by default.
sourcepub fn leaf(self, value: bool) -> Self
pub fn leaf(self, value: bool) -> Self
Enable/disables leaf mode (no collapsing, no arrow).
Disabled by default.
sourcepub fn bullet(self, value: bool) -> Self
pub fn bullet(self, value: bool) -> Self
Display a bullet instead of arrow.
Disabled by default.
sourcepub fn frame_padding(self, value: bool) -> Self
pub fn frame_padding(self, value: bool) -> Self
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<'ui>(self, ui: &Ui<'ui>) -> Option<TreeNodeToken<'ui>>
pub fn push<'ui>(self, ui: &Ui<'ui>) -> Option<TreeNodeToken<'ui>>
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<T: Copy, L: Copy> Copy for TreeNode<T, L>
Auto Trait Implementations§
impl<T, L> Freeze for TreeNode<T, L>
impl<T, L> RefUnwindSafe for TreeNode<T, L>where
T: RefUnwindSafe,
L: RefUnwindSafe,
impl<T, L = &'static str> !Send for TreeNode<T, L>
impl<T, L = &'static str> !Sync for TreeNode<T, L>
impl<T, L> Unpin for TreeNode<T, L>
impl<T, L> UnwindSafe for TreeNode<T, L>where
T: UnwindSafe,
L: UnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)