A node in the tree hierarchy. More...
#include <tree_view.hpp>
Public Member Functions | |
| TreeNode & | add_child (std::string child_label) |
| Add a child node and return a reference to it. | |
| bool | has_children () const |
| Check if this node has children. | |
| void | toggle () |
| Toggle expanded state. | |
Public Attributes | |
| std::string | label |
| std::string | icon |
| Optional icon name. | |
| bool | expanded = false |
| Whether children are visible. | |
| bool | selectable = true |
| void * | user_data = nullptr |
| Arbitrary payload. | |
| std::vector< std::unique_ptr< TreeNode > > | children |
A node in the tree hierarchy.
|
inline |
Add a child node and return a reference to it.
|
inline |
Check if this node has children.
|
inline |
Toggle expanded state.
| std::vector<std::unique_ptr<TreeNode> > pulp::view::TreeNode::children |
| bool pulp::view::TreeNode::expanded = false |
Whether children are visible.
| std::string pulp::view::TreeNode::icon |
Optional icon name.
| std::string pulp::view::TreeNode::label |
| bool pulp::view::TreeNode::selectable = true |
| void* pulp::view::TreeNode::user_data = nullptr |
Arbitrary payload.