new-gui/button.go

17 lines
321 B
Go
Raw Normal View History

package gui
import "git.wit.org/wit/gui/toolkit"
func (n *Node) NewButton(name string, custom func()) *Node {
newNode := n.New(name, toolkit.Button, custom)
var a toolkit.Action
a.Type = toolkit.Add
// a.Widget = &newNode.widget
// a.Where = &n.widget
// action(&a)
newaction(&a, newNode, n)
return newNode
}