MCPcopy
hub / github.com/g3n/engine / traverseINode

Function traverseINode

gui/manager.go:264–273  ·  view source on GitHub ↗

traverseINode traverses the descendants of the specified INode, executing the specified function for each IPanel.

(inode core.INode, f func(ipan IPanel))

Source from the content-addressed store, hash-verified

262// traverseINode traverses the descendants of the specified INode,
263// executing the specified function for each IPanel.
264func traverseINode(inode core.INode, f func(ipan IPanel)) {
265
266 if ipan, ok := inode.(IPanel); ok {
267 traverseIPanel(ipan, f)
268 } else {
269 for _, child := range inode.Children() {
270 traverseINode(child, f)
271 }
272 }
273}
274
275// forEachIPanel executes the specified function for each enabled and visible IPanel in gm.scene.
276func (gm *manager) forEachIPanel(f func(ipan IPanel)) {

Callers 1

forEachIPanelMethod · 0.85

Calls 2

traverseIPanelFunction · 0.85
ChildrenMethod · 0.65

Tested by

no test coverage detected