summaryrefslogtreecommitdiff
path: root/box.go
diff options
context:
space:
mode:
Diffstat (limited to 'box.go')
-rw-r--r--box.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/box.go b/box.go
new file mode 100644
index 0000000..4b067af
--- /dev/null
+++ b/box.go
@@ -0,0 +1,19 @@
+package gui
+
+import (
+ "git.wit.org/wit/gui/toolkit"
+)
+
+func (n *Node) NewBox(name string, b bool) *Node {
+ newNode := n.newNode(name, toolkit.Box, nil)
+ newNode.B = b
+
+ var a toolkit.Action
+ a.ActionType = toolkit.Add
+ a.Name = name
+ a.Text = name
+ a.B = b
+ newaction(&a, newNode, n)
+
+ return newNode
+}