diff options
| author | Jeff Carr <[email protected]> | 2025-02-21 15:38:00 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-21 15:38:00 -0600 |
| commit | 669594dbb381f8c05fdae596a6daa9a7f5f9e81e (patch) | |
| tree | 5034a553e78083fb14a3093137cdad1ce400623f | |
| parent | 1cb395d4e29239a6d0c50ff37e16c143844dac75 (diff) | |
attempt just make a grid for the tablev0.22.30
| -rw-r--r-- | table.go | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -107,6 +107,28 @@ func ShowTable(pb *guipb.Table) { } +func (parent *Node) ShowTable(pb *guipb.Table) { + // make a new action and populate the current node state + a := getNewAction(me.rootNode, widget.Show) + + pb.Parent = new(guipb.Widget) + pb.Parent.Id = int64(parent.id) + pb.Parent.Name = pb.Title + + makeTableGrid(pb) + + nt := guipb.NewTables() + nt.Append(pb) + a.TablePB, err = nt.Marshal() + if err != nil { + log.Info("unmarshal error", err) + return + } + log.Info("send action to plugin", "pb len =", len(a.TablePB)) + sendActionToPlugin(a) + +} + func makeTableWidgets(pb *guipb.Table) { if pb == nil { log.Info("pb was nil") @@ -121,6 +143,10 @@ func makeTableWidgets(pb *guipb.Table) { pb.Window.Id = int64(win.id) pb.Window.Name = pb.Title + makeTableGrid(pb) +} + +func makeTableGrid(pb *guipb.Table) { grid := addNode() pb.Grid = new(guipb.Widget) pb.Grid.Id = int64(grid.id) |
