From a0d0a93f7f7131f6ef50ebbe4bad9a57f2e1245d Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 27 Apr 2023 09:47:31 -0500 Subject: andlabs: more into the binary tree Signed-off-by: Jeff Carr --- toolkit/andlabs/box.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'toolkit/andlabs/box.go') diff --git a/toolkit/andlabs/box.go b/toolkit/andlabs/box.go index 527041d..72ff698 100644 --- a/toolkit/andlabs/box.go +++ b/toolkit/andlabs/box.go @@ -1,25 +1,23 @@ package main import ( - "git.wit.org/wit/gui/toolkit" - "github.com/andlabs/ui" _ "github.com/andlabs/ui/winmanifest" ) // make new Box here -func newBox(a *toolkit.Action) { - log(debugToolkit, "newBox()", a.Name) +func (p *node) newBox(n *node) { + log(debugToolkit, "newBox()", n.Name) - t := andlabs[a.ParentId] + t := p.tk if (t == nil) { - log(debugToolkit, "newBox() toolkit struct == nil. name=", a.Name) + log(debugToolkit, "newBox() toolkit struct == nil. name=", n.Name) listMap(debugToolkit) } - newt := t.rawBox(a.Text, a.B) + newt := t.rawBox(n.Text, n.B) newt.boxC = 0 - place(a, t, newt) - andlabs[a.WidgetId] = newt + n.tk = newt + p.place(n) } // make new Box using andlabs/ui -- cgit v1.2.3