Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::TreeNode Struct Reference

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

Detailed Description

A node in the tree hierarchy.

Member Function Documentation

◆ add_child()

TreeNode & pulp::view::TreeNode::add_child ( std::string child_label)
inline

Add a child node and return a reference to it.

◆ has_children()

bool pulp::view::TreeNode::has_children ( ) const
inline

Check if this node has children.

◆ toggle()

void pulp::view::TreeNode::toggle ( )
inline

Toggle expanded state.

Member Data Documentation

◆ children

std::vector<std::unique_ptr<TreeNode> > pulp::view::TreeNode::children

◆ expanded

bool pulp::view::TreeNode::expanded = false

Whether children are visible.

◆ icon

std::string pulp::view::TreeNode::icon

Optional icon name.

◆ label

std::string pulp::view::TreeNode::label

◆ selectable

bool pulp::view::TreeNode::selectable = true

◆ user_data

void* pulp::view::TreeNode::user_data = nullptr

Arbitrary payload.


The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/view/include/pulp/view/tree_view.hpp