package tree

import (
	"go.wit.com/gui/widget"
)

func (n *Node) GetProgName() string {
	return n.State.ProgName
}

func (n *Node) GetValue() any {
	return n.State.Value
}

func (n *Node) Bool() bool {
	return widget.GetBool(n.State.Value)
}

func (n *Node) String() string {
	return widget.GetString(n.State.Value)
}

/* avoid this function name as confusing
func (n *Node) GetText() string {
	return widget.GetString(n.State.Value)
}
*/

func (n *Node) SetValue(a any) {
	n.State.Value = a
}

func (n *Node) GetLabel() string {
	return n.State.Label
}
