diff options
Diffstat (limited to 'common.go')
| -rw-r--r-- | common.go | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -115,6 +115,16 @@ func (n *Node) Int() int { return widget.GetInt(n.value) } +func (n *Node) SetBool(b bool) { + switch n.WidgetType { + case widget.Checkbox: + n.checked = b + n.value = b + default: + log.Warn("WidgetType not bool", n.WidgetType, n.id) + } +} + func (n *Node) String() string { if !n.Ready() { return "" @@ -321,6 +331,12 @@ func (n *Node) Ready() bool { return true } +// returns the root of the binary tree +// change the names to 'Tree' as I think the name is better +func TreeRoot() *Node { + return me.rootNode +} + // // // DEPRECATE / REDO / SORT OUT THIS STUFF |
