diff options
| author | Jeff Carr <[email protected]> | 2023-04-27 10:24:52 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-27 10:24:52 -0500 |
| commit | e3dbd4b2074c80cc089e54495ff2df3f94afabab (patch) | |
| tree | cf5a4ce117ad2861041df8df579027ab0d1d578e /toolkit/andlabs/spinner.go | |
| parent | d5d11d9ca9c69e01715d191eb63ead18d8d7ff05 (diff) | |
andlabs: more things in the binary tree
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/spinner.go')
| -rw-r--r-- | toolkit/andlabs/spinner.go | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/toolkit/andlabs/spinner.go b/toolkit/andlabs/spinner.go index fe2ac15..e52579c 100644 --- a/toolkit/andlabs/spinner.go +++ b/toolkit/andlabs/spinner.go @@ -1,37 +1,22 @@ package main import ( - "git.wit.org/wit/gui/toolkit" - "github.com/andlabs/ui" _ "github.com/andlabs/ui/winmanifest" ) -func (t *andlabsT) newSpinner(a *toolkit.Action) *andlabsT { - var newt andlabsT +func (p *node) newSpinner(n *node) { + newt := new(andlabsT) - s := ui.NewSpinbox(a.X, a.Y) + s := ui.NewSpinbox(n.X, n.Y) newt.uiSpinbox = s newt.uiControl = s - newt.wId = a.WidgetId - newt.WidgetType = toolkit.Spinner s.OnChanged(func(s *ui.Spinbox) { newt.i = newt.uiSpinbox.Value() newt.doUserEvent() }) - return &newt -} - -func newSpinner(a *toolkit.Action) { - var newt *andlabsT - - t := andlabs[a.ParentId] - if (t == nil) { - log(debugError, "NewSpinner() toolkit struct == nil. name=", a.Name) - return - } - newt = t.newSpinner(a) - place(a, t, newt) + n.tk = newt + p.place(n) } |
