From 253dcb012f6d4fc861e6fc9a66fd2c7260ead442 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 27 Apr 2023 12:41:42 -0500 Subject: andlabs: deprecate old code Signed-off-by: Jeff Carr --- toolkit/andlabs/box.go | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'toolkit/andlabs/box.go') diff --git a/toolkit/andlabs/box.go b/toolkit/andlabs/box.go index 72ff698..0a6b7e4 100644 --- a/toolkit/andlabs/box.go +++ b/toolkit/andlabs/box.go @@ -9,26 +9,12 @@ import ( func (p *node) newBox(n *node) { log(debugToolkit, "newBox()", n.Name) - t := p.tk - if (t == nil) { - log(debugToolkit, "newBox() toolkit struct == nil. name=", n.Name) - listMap(debugToolkit) - } - newt := t.rawBox(n.Text, n.B) - newt.boxC = 0 - n.tk = newt - p.place(n) -} - -// make new Box using andlabs/ui -func (t *andlabsT) rawBox(title string, b bool) *andlabsT { - var newt andlabsT + newt := new(andlabsT) var box *ui.Box - newt.Name = title log(debugToolkit, "rawBox() create", newt.Name) - if (b) { + if (n.B) { box = ui.NewHorizontalBox() } else { box = ui.NewVerticalBox() @@ -37,6 +23,7 @@ func (t *andlabsT) rawBox(title string, b bool) *andlabsT { newt.uiBox = box newt.uiControl = box - - return &newt + newt.boxC = 0 + n.tk = newt + p.place(n) } -- cgit v1.2.3