diff options
Diffstat (limited to 'node.go')
| -rw-r--r-- | node.go | 22 |
1 files changed, 3 insertions, 19 deletions
@@ -12,7 +12,7 @@ func (n *Node) newNode(title string, t toolkit.WidgetType, custom func()) *Node newN.WidgetType = t newN.Custom = custom - n.Append(newN) + n.children = append(n.children, newN) newN.parent = n return newN } @@ -35,30 +35,14 @@ func (n *Node) Parent() *Node { return n.parent } -/* -func (n *Node) Window() *Node { - return n.parent -} -*/ - -func (n *Node) Append(child *Node) { - n.children = append(n.children, child) - if (debugNode) { - log(debugNode, "child node:") - child.Dump(debugDump) - log(debugNode, "parent node:") - n.Dump(debugDump) - } -} - func (n *Node) Delete(d *Node) { for i, child := range n.children { - log(debugNode, "\t", i, child.id, child.Width, child.Height, child.Name) + log(debugNode, "\t", i, child.id, child.Name) if (child.id == d.id) { log(debugNode, "\t\t Deleting this") n.children = append(n.children[:i], n.children[i+1:]...) return } } - log(debugError, "did not find node to delete", d.id, d.Width, d.Height, d.Name) + log(debugError, "did not find node to delete", d.id, d.Name) } |
