summaryrefslogtreecommitdiff
path: root/box.go
diff options
context:
space:
mode:
Diffstat (limited to 'box.go')
-rw-r--r--box.go13
1 files changed, 4 insertions, 9 deletions
diff --git a/box.go b/box.go
index 4b067af..9148d83 100644
--- a/box.go
+++ b/box.go
@@ -4,16 +4,11 @@ import (
"git.wit.org/wit/gui/toolkit"
)
-func (n *Node) NewBox(name string, b bool) *Node {
- newNode := n.newNode(name, toolkit.Box, nil)
+func (parent *Node) NewBox(name string, b bool) *Node {
+ newNode := parent.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)
-
+ a := newAction(newNode, toolkit.Add)
+ sendAction(a, newNode, parent)
return newNode
}