Skip to main content

TreeView Class

Package: GHIElectronics.Endpoint.UI
Namespace: GHIElectronics.Endpoint.UI

Hierarchical list. Nodes are added imperatively via TreeView.AddNode with a depth value: codegen walks the tree and emits one AddNode call per visible node.

class TreeView : public Widget {};

Constructors​

TreeView(Widget parent)​

TreeView(const Widget& parent);

Create a tree view inside parent.

ParameterTypeDescription
parentWidgetContaining widget.

Methods​

AddNode(int depth, bool isExpanded, bool hasChildren, string header)​

void AddNode(int32_t depth, bool isExpanded, bool hasChildren, const std::string& header);

Append a visible node at the given indent level.

ParameterTypeDescription
depthintIndent depth, 0-based (0 = root level).
isExpandedboolWhether this node currently shows its children (visual only; the caller feeds the children themselves).
hasChildrenboolWhether to draw an expand/collapse chevron.
headerstringRow text; null is treated as empty.

Clear()​

void Clear();

Remove every node.