PromptPlus

PromptPlus

PromptPlus

PromptPlusLibrary

ITreeNode<T> Interface

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>

Type parameters

T

The user item type held by the node.

Derived
ITreeMultiSelectNode<T>

Properties

ITreeNode<T>.Disabled Property

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; }

Property Value

System.Boolean

ITreeNode<T>.Parent Property

The parent node, or null when this node is the root of the tree.

PromptPlusLibrary.ITreeNode<T>? Parent { get; }

Property Value

PromptPlusLibrary.ITreeNode<T>

ITreeNode<T>.Value Property

The user value associated with this node.

T Value { get; }

Property Value

T

Methods

ITreeNode<T>.AddFirst(T, bool) Method

Inserts a child at the beginning of this node’s children collection.

PromptPlusLibrary.ITreeNode<T> AddFirst(T value, bool disable=false);

Parameters

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.

Returns

PromptPlusLibrary.ITreeNode<T>
The newly created child node.

ITreeNode<T>.AddLast(T, bool) Method

Appends a child at the end of this node’s children collection.

PromptPlusLibrary.ITreeNode<T> AddLast(T value, bool disable=false);

Parameters

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.

Returns

PromptPlusLibrary.ITreeNode<T>
The newly created child node.