MCPcopy Create free account
hub / github.com/cogentcore/core / Child

Method Child

tree/nodebase.go:201–206  ·  view source on GitHub ↗

Child returns the child of this node at the given index and returns nil if the index is out of range.

(i int)

Source from the content-addressed store, hash-verified

199// Child returns the child of this node at the given index and returns nil if
200// the index is out of range.
201func (n *NodeBase) Child(i int) Node {
202 if i >= len(n.Children) || i < 0 {
203 return nil
204 }
205 return n.Children[i]
206}
207
208// ChildByName returns the first child that has the given name, and nil
209// if no such element is found. startIndex arg allows for optimized

Callers 15

ChildByNameMethod · 0.95
DeleteChildAtMethod · 0.95
AddExternalFileMethod · 0.80
externalNodeByPathMethod · 0.80
CheckScopeFunction · 0.80
setAllColumnsMethod · 0.80
setColumnsByNameMethod · 0.80
TestInlineContainerFunction · 0.80
TestNoInlineContainerFunction · 0.80
SliceHeaderMethod · 0.80
SortSliceActionMethod · 0.80
RowFirstVisWidgetMethod · 0.80

Calls

no outgoing calls

Tested by 12

TestInlineContainerFunction · 0.64
TestNoInlineContainerFunction · 0.64
TestKeyedListChangeFunction · 0.64
TestKeyedListChangeKeyFunction · 0.64
TestTabsClickFunction · 0.64
TestFormChangeFunction · 0.64
TestSwitchesItemsFunction · 0.64
TestSwitchesMutexFunction · 0.64
TestSwitchesChangeFunction · 0.64