summaryrefslogtreecommitdiff
path: root/checkbox.go
blob: 502acb4b850022ec8c1c56284a6616736df8803f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package gui

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

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

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

	a := newAction(newNode, toolkit.Add)
	sendAction(a)
	return newNode
}