diff options
Diffstat (limited to 'node.go')
| -rw-r--r-- | node.go | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -1,5 +1,7 @@ package gui +// import "git.wit.org/wit/gui/toolkit" + /* generic function to create a new node on the binary tree */ @@ -16,11 +18,16 @@ func (n *Node) New(title string) *Node { /* raw create function for a new node struct */ -func addNode(title string, w int, h int) *Node { +func addNode(title string, width int, height int) *Node { var n Node + n.Name = title - n.Width = w - n.Height = h + n.Width = width + n.Height = height + + n.Widget.Name = title + n.Widget.Width = width + n.Widget.Height = height // no longer a string // id := Config.prefix + strconv.Itoa(Config.counter) |
