summaryrefslogtreecommitdiff
path: root/spinner.go
blob: 393388fbc85100ab7b68d5a95d150996dee1fc91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package gui

import (
	"go.wit.com/log"
	"go.wit.com/widget"
)

func (parent *Node) NewSpinner(progname string, x int, y int) *Node {
	newNode := parent.newNode(progname, widget.Spinner)
	newNode.progname = progname

	newNode.Custom = func() {
		log.Log(NOW, "default NewSpinner() change", progname)
	}

	newNode.X = x
	newNode.Y = y

	// inform the toolkits
	sendAction(newNode, widget.Add)
	return newNode
}