diff options
| author | Jeff Carr <[email protected]> | 2025-02-13 20:11:18 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-13 20:11:18 -0600 |
| commit | 5f358634a5c881091cd7696e295d935ac11f737a (patch) | |
| tree | a0cbb0219e75247e86d02121b77bd0fcfb7dc802 | |
| parent | 46fea14452ef7b812ca2526a1f607ca83b13bdc7 (diff) | |
stubbed in tables()v0.22.26
| -rw-r--r-- | table.go | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -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 +} |
