From db0986fa06245a1173aa3a3b654e7df25117acdc Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 12 Feb 2025 15:43:58 -0600 Subject: updates for a standard plugin code file --- structs.go | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) (limited to 'structs.go') diff --git a/structs.go b/structs.go index eb76f39..c4792b7 100644 --- a/structs.go +++ b/structs.go @@ -17,27 +17,20 @@ import ( var treeRoot *Node type TreeInfo struct { - PluginName string - config *ToolkitConfigs - - // this is the channel we send user events like - // mouse clicks or keyboard events back to the program - callback chan widget.Action - - // this is the channel we get requests to make widgets - pluginChan chan widget.Action - - // NodeI interface{} - - // ActionFromChannel func(widget.Action) - NodeAction func(*Node, widget.ActionType) - Add func(*Node) - AddText func(*Node, string) - SetText func(*Node, string) - SetTitle func(*Node, string) - SetLabel func(*Node, string) - SetChecked func(*Node, bool) - ToolkitClose func() + PluginName string // used to identify the plugin + config *ToolkitConfigs // protobuf of plugin settings + callback chan widget.Action // mouse clicks or keyboard events back to the program + pluginChan chan widget.Action // this is the channel we get requests to make widgets + NodeAction func(*Node, widget.ActionType) // deprecate + Add func(*Node) // add a new widget + AddText func(*Node, string) // add a string to a dropdown widget + SetText func(*Node, string) // set the text of a widget + SetTitle func(*Node, string) // update the title of a window or tab + SetLabel func(*Node, string) // update the "label" (aka "Name") for a widget + SetChecked func(*Node, bool) // set the state of a checkbox + ToolkitClose func() // shutdown and unload the plugin + ShowTable func(*Node) // attempt at sending a whole table + // NodeI interface{} // is an interface useful here? } type Node struct { -- cgit v1.2.3