From a83ca26ac3380be410cd8aaceef7b6a2c7d2701a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 14 Feb 2025 18:11:19 -0600 Subject: switch to treeInit --- action.go | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) (limited to 'action.go') diff --git a/action.go b/action.go index a4e5ee6..0bf52c7 100644 --- a/action.go +++ b/action.go @@ -7,12 +7,13 @@ package main */ import ( + "go.wit.com/lib/protobuf/guipb" "go.wit.com/log" "go.wit.com/toolkits/tree" "go.wit.com/widget" ) -func Add(n *tree.Node) { +func newAdd(n *tree.Node) { log.Log(INFO, "Add() END =", n.WidgetType, n.String()) if n == nil { log.Warn("Tree Error: Add() sent n == nil") @@ -68,15 +69,15 @@ func newaction(n *tree.Node, atype widget.ActionType) { log.Log(INFO, "newaction() END", atype, n.String()) } -func SetTitle(n *tree.Node, s string) { - SetText(n, s) +func setTitle(n *tree.Node, s string) { + setText(n, s) } -func SetLabel(n *tree.Node, s string) { - SetText(n, s) +func setLabel(n *tree.Node, s string) { + setText(n, s) } -func SetText(n *tree.Node, s string) { +func setText(n *tree.Node, s string) { if n == nil { log.Warn("Tree Error: Add() sent n == nil") return @@ -90,7 +91,7 @@ func SetText(n *tree.Node, s string) { log.Info("SetText()", n.WidgetType, n.String()) } -func AddText(n *tree.Node, s string) { +func addText(n *tree.Node, s string) { if n == nil { log.Warn("Tree Error: Add() sent n == nil") return @@ -103,3 +104,23 @@ func AddText(n *tree.Node, s string) { // w := n.TK.(*guiWidget) // w.AddText(s) } + +func enableWidget(n *tree.Node) { + log.Info("do enable() here") +} + +func disableWidget(n *tree.Node) { + log.Info("do enable() here") +} + +func setChecked(n *tree.Node, b bool) { + log.Info("do enable() here") +} + +func showTable(n *guipb.Table) { + log.Info("do enable() here") +} + +func toolkitClose() { + log.Info("do enable() here") +} -- cgit v1.2.3