parent
e2958fe561
commit
25ed10c0ec
3
main.go
3
main.go
|
@ -22,7 +22,8 @@ func init() {
|
|||
me.prefix = "wit"
|
||||
|
||||
// Populates the top of the binary tree
|
||||
me.rootNode = addNode("guiBinaryTree")
|
||||
me.rootNode = addNode()
|
||||
me.rootNode.progname = "guiBinaryTree"
|
||||
me.rootNode.WidgetType = widget.Root
|
||||
me.rootNode.hidden = false // always send the rootNode to the toolkits
|
||||
|
||||
|
|
6
node.go
6
node.go
|
@ -11,7 +11,8 @@ import (
|
|||
func (n *Node) newNode(title string, t widget.WidgetType) *Node {
|
||||
var newN *Node
|
||||
|
||||
newN = addNode(title)
|
||||
newN = addNode()
|
||||
newN.value = title
|
||||
newN.WidgetType = t
|
||||
|
||||
if n.WidgetType == widget.Grid {
|
||||
|
@ -29,9 +30,8 @@ func (n *Node) newNode(title string, t widget.WidgetType) *Node {
|
|||
/*
|
||||
raw create function for a new node struct
|
||||
*/
|
||||
func addNode(title string) *Node {
|
||||
func addNode() *Node {
|
||||
n := new(Node)
|
||||
n.label = title
|
||||
n.id = me.counter
|
||||
log.Log(NODE, "addNode = widget setid =", n.id)
|
||||
|
||||
|
|
Loading…
Reference in New Issue