summaryrefslogtreecommitdiff
path: root/andlabs/grid.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-17 21:31:49 -0600
committerJeff Carr <[email protected]>2024-01-17 21:31:49 -0600
commit841e6252c95244f0ee7faf2c01d33f69a8ab483a (patch)
treeef400228622b87611168db2227269ba7fd56625d /andlabs/grid.go
parentba95c13799740b5f55541fc5e8ab9f1d34f7e421 (diff)
common tree package for toolkitsv0.12.4
This update provides *lots* of toolkit updates. This will allow the next step of debugging the gocui toolkit to make it work again. There are new common routines for handling the plugin channel communication Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'andlabs/grid.go')
-rw-r--r--andlabs/grid.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/andlabs/grid.go b/andlabs/grid.go
index 2561648..bbb2c8b 100644
--- a/andlabs/grid.go
+++ b/andlabs/grid.go
@@ -1,6 +1,8 @@
package main
import (
+ "go.wit.com/gui/toolkits/tree"
+
"go.wit.com/dev/andlabs/ui"
_ "go.wit.com/dev/andlabs/ui/winmanifest"
)
@@ -10,9 +12,9 @@ import (
// -- (1,1) -- (2,1) -- (3,1) --
// -- (1,2) -- (2,1) -- (3,1) --
// -----------------------------
-func (p *node) newGrid(n *node) {
+func newGrid(n *tree.Node) {
+ if notNew(n) { return }
var newt *guiWidget
-
newt = new(guiWidget)
c := ui.NewGrid()
@@ -20,6 +22,6 @@ func (p *node) newGrid(n *node) {
newt.uiControl = c
c.SetPadded(true)
- n.tk = newt
- p.place(n)
+ n.TK = newt
+ place(n.Parent, n)
}