summaryrefslogtreecommitdiff
path: root/box.go
blob: 4b067afa8c40fe5c189f7e19686e7b61a9f85516 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
}