From 5f358634a5c881091cd7696e295d935ac11f737a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 13 Feb 2025 20:11:18 -0600 Subject: stubbed in tables() --- table.go | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/table.go b/table.go index 3f7558d..6d9b145 100644 --- a/table.go +++ b/table.go @@ -5,6 +5,12 @@ package gui +import ( + "go.wit.com/lib/protobuf/guipb" + "go.wit.com/log" + "go.wit.com/widget" +) + // should this be a gadget or in here with the widget primatives? // a table is a group of widgets. Then again, Grid & Box 'widgets' are // really groups of widgets also @@ -45,3 +51,34 @@ func Show() { func RefreshTime(t *time.Duration) { } */ + +type NodeTable struct { + n *Node + pb *guipb.Table +} + +func (t *NodeTable) ShowTable() { + // make a new action and populate the current node state + a := getNewAction(t.n, widget.Show) + if t.pb == nil { + log.Info("error: TablePB == nil") + return + } + a.TablePB, err = t.pb.Marshal() + if err != nil { + log.Info("unmarshal error", err) + return + } + sendActionToPlugin(a) + + /* + newNode := parent.newNode(name, widget.Button) + newNode.Custom = custom + newNode.label = name + newNode.progname = name + + // inform the toolkits + sendAction(newNode, widget.Add) + */ + // return newNode +} -- cgit v1.2.3