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

import "git.wit.org/wit/gui/toolkit"

func (n *Node) Checked() bool {
	return n.widget.B
}

func (n *Node) NewCheckbox(name string) *Node {
	newNode := n.New(name, toolkit.Checkbox, nil)

	var a toolkit.Action
	a.Type = toolkit.Add
	// a.Widget = &newNode.widget
	// a.Where = &n.widget
	// action(&a, newNode, n)
	newaction(&a, newNode, n)

	return newNode
}