![]()
Represents a node of the tree exposed by the ITreeSelectControl<T> when it is being constructed. A node carries a user value and can have any number of children added lazily through AddLast(T, bool) and AddFirst(T, bool).
public interface ITreeNode<T>
T
The user item type held by the node.
Derived
↳ ITreeMultiSelectNode<T>
Whether this node can be confirmed. Disabled nodes are still shown and can
still be navigated to and expanded/collapsed; only confirming them (Enter) is
blocked, and view-only mode ignores this entirely, same as PredicateSelected.
bool Disabled { get; }
The parent node, or null when this node is the root of the tree.
PromptPlusLibrary.ITreeNode<T>? Parent { get; }
PromptPlusLibrary.ITreeNode<T>
The user value associated with this node.
T Value { get; }
Inserts a child at the beginning of this node’s children collection.
PromptPlusLibrary.ITreeNode<T> AddFirst(T value, bool disable=false);
value T
The value of the new child. Cannot be null.
disable System.Boolean
When true, the new child cannot be confirmed. Default is false.
PromptPlusLibrary.ITreeNode<T>
The newly created child node.
Appends a child at the end of this node’s children collection.
PromptPlusLibrary.ITreeNode<T> AddLast(T value, bool disable=false);
value T
The value of the new child. Cannot be null.
disable System.Boolean
When true, the new child cannot be confirmed. Default is false.
PromptPlusLibrary.ITreeNode<T>
The newly created child node.