From 8f937c19eeaeb116c53c74d07d71f245a0a68280 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 5 Feb 2024 09:05:09 -0600 Subject: compiles. kinda works Signed-off-by: Jeff Carr --- structs.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'structs.go') diff --git a/structs.go b/structs.go index 4ff96c7..1ae9682 100644 --- a/structs.go +++ b/structs.go @@ -1,24 +1,18 @@ package tree /* - These code should be common to all gui plugins - There are some helper functions that are probably going to be the same everywhere. Mostly due to handling the binary tree structure and the channel communication - - For now, it's just a symlink to the 'master' version in - ./toolkit/nocui/common.go */ import ( - // "go.wit.com/log" "go.wit.com/widget" ) -// var me *TreeInfo - type TreeInfo struct { + PluginName string + // this is the channel we send user events like // mouse clicks or keyboard events back to the program callback chan widget.Action @@ -27,9 +21,15 @@ type TreeInfo struct { pluginChan chan widget.Action treeRoot *Node - NodeI interface{} + // NodeI interface{} + ActionFromChannel func(widget.Action) - PluginName string + NodeAction func(*Node, widget.ActionType) + Add func(*Node) + AddText func(*Node, string) + SetText func(*Node, string) + SetTitle func(*Node, string) + SetLabel func(*Node, string) } type Node struct { -- cgit v1.2.3