2024-01-18 00:05:54 -06:00
|
|
|
package tree
|
|
|
|
|
|
|
|
import (
|
2024-01-18 04:08:11 -06:00
|
|
|
"go.wit.com/widget"
|
2024-01-18 00:05:54 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2024-02-05 07:20:57 -06:00
|
|
|
func (n *Node) Hidden() bool {
|
|
|
|
return n.State.Hidden
|
|
|
|
}
|
|
|
|
|
2024-01-18 00:05:54 -06:00
|
|
|
/* 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
|
|
|
|
}
|