summaryrefslogtreecommitdiff
path: root/checkbox.go
blob: db3eb192060abfc029395231c42c79a1fb0312a3 (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)

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