summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/image.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-27 10:24:52 -0500
committerJeff Carr <[email protected]>2023-04-27 10:24:52 -0500
commite3dbd4b2074c80cc089e54495ff2df3f94afabab (patch)
treecf5a4ce117ad2861041df8df579027ab0d1d578e /toolkit/andlabs/image.go
parentd5d11d9ca9c69e01715d191eb63ead18d8d7ff05 (diff)
andlabs: more things in the binary tree
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/image.go')
-rw-r--r--toolkit/andlabs/image.go24
1 files changed, 5 insertions, 19 deletions
diff --git a/toolkit/andlabs/image.go b/toolkit/andlabs/image.go
index cb1565c..0b1f785 100644
--- a/toolkit/andlabs/image.go
+++ b/toolkit/andlabs/image.go
@@ -1,30 +1,15 @@
package main
import (
- "git.wit.org/wit/gui/toolkit"
-
"github.com/andlabs/ui"
_ "github.com/andlabs/ui/winmanifest"
)
-// make new Image here
-func newImage(a *toolkit.Action) {
- log(debugToolkit, "newImage()", a.Name)
-
- t := andlabs[a.ParentId]
- if (t == nil) {
- log(debugToolkit, "newImage() toolkit struct == nil. name=", a.Name)
- listMap(debugToolkit)
- }
- newt := t.rawImage(a.Name)
- place(a, t, newt)
-}
-
// make new Image using andlabs/ui
-func (t *andlabsT) rawImage(title string) *andlabsT {
- var newt andlabsT
+func (p *node) newImage(n *node) {
+ newt := new(andlabsT)
var img *ui.Image
- newt.Name = title
+ newt.Name = n.Name
log(debugToolkit, "rawImage() create", newt.Name)
@@ -33,7 +18,8 @@ func (t *andlabsT) rawImage(title string) *andlabsT {
newt.uiImage = img
// newt.uiControl = img
- return &newt
+ n.tk = newt
+ p.place(n)
}
/*
if (a.Name == "image") {