summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/image.go
diff options
context:
space:
mode:
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") {