summaryrefslogtreecommitdiff
path: root/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-05 09:05:09 -0600
committerJeff Carr <[email protected]>2024-02-05 09:05:09 -0600
commit8f937c19eeaeb116c53c74d07d71f245a0a68280 (patch)
treefdd83ccb3d6607b5e13b5b9b643db2b436bf8f31 /structs.go
parent6291ddc13db10fe5ff18958763193d52de1b44c6 (diff)
compiles. kinda works
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go20
1 files changed, 10 insertions, 10 deletions
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 {