Tree Nodes
TreeNode functions return true when the node is open, in which case you need to also callTreePop() when you are finished displaying the tree node contents.
TreeNode
const char*
Node label (also used as ID)
bool
True when node is open
TreeNode (with format)
const char*
String identifier (not displayed)
const void*
Pointer identifier (not displayed)
const char*
Format string (printf-style)
bool
True when node is open
TreeNodeEx
const char*
Node label
ImGuiTreeNodeFlags
default:"0"
Tree node flags (see ImGuiTreeNodeFlags_)
bool
True when node is open
TreePush / TreePop
TreePush() = Indent() + PushID(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
const char*
String identifier
const void*
Pointer identifier
GetTreeNodeToLabelSpacing
TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode.
float
Spacing in pixels
Collapsing Headers
CollapsingHeader
TreePop().
const char*
Header label
ImGuiTreeNodeFlags
default:"0"
Tree node flags
bool
True when header is open
CollapsingHeader (with close button)
p_visible != NULL: if *p_visible==true display an additional small close button on upper right of the header which will set the bool to false when clicked. If *p_visible==false don’t display the header.
const char*
Header label
bool*
Pointer to visibility boolean
ImGuiTreeNodeFlags
default:"0"
Tree node flags
bool
True when header is open
Tree Control
SetNextItemOpen
bool
Open state
ImGuiCond
default:"0"
Condition for setting (see ImGuiCond_)
SetNextItemStorageID
ImGuiID
Storage identifier
TreeNodeGetOpen
ImGuiID
Storage identifier
bool
True if node is open
Tree Node Flags
ImGuiTreeNodeFlags_
Flags forTreeNodeEx(), CollapsingHeader().