summaryrefslogtreecommitdiff
path: root/common.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-20 19:32:30 -0600
committerJeff Carr <[email protected]>2024-01-20 19:32:30 -0600
commitdfb7a47e8cccd82080de3d6ba97855eeb2be6593 (patch)
treee2a8f4696984ec21eacd4ceba146618a35c456c7 /common.go
parent7012aff2aebdc74d950d921262e0ddfa677761e4 (diff)
log settings works againv0.12.19
still dreaming of protobuf here go mod update show panic for now finally drop sending stuff for non-visable windows Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'common.go')
-rw-r--r--common.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/common.go b/common.go
index a46ecb5..7b9c162 100644
--- a/common.go
+++ b/common.go
@@ -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