MCPcopy Index your code
hub / github.com/g3n/engine / InsertNodeAt

Method InsertNodeAt

gui/tree.go:90–97  ·  view source on GitHub ↗

InsertNodeAt inserts at the specified position a new tree node with the specified text at the end of this tree and returns pointer to the new node.

(pos int, text string)

Source from the content-addressed store, hash-verified

88// with the specified text at the end of this tree
89// and returns pointer to the new node.
90func (t *Tree) InsertNodeAt(pos int, text string) *TreeNode {
91
92 n := newTreeNode(text, t, nil)
93 n.update()
94 n.recalc()
95 n.litem = t.List.InsertAt(pos, n)
96 return n
97}
98
99// AddNode adds a new tree node with the specified text
100// at the end of this tree and returns a pointer to the new node.

Callers

nothing calls this directly

Calls 4

newTreeNodeFunction · 0.85
updateMethod · 0.45
recalcMethod · 0.45
InsertAtMethod · 0.45

Tested by

no test coverage detected