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

Method NodeWalkDown

core/widget.go:409–414  ·  view source on GitHub ↗

NodeWalkDown extends [tree.Node.WalkDown] to [WidgetBase.Parts], which is key for getting full tree traversal to work when updating, configuring, and styling. This implements [tree.Node.NodeWalkDown].

(fun func(tree.Node) bool)

Source from the content-addressed store, hash-verified

407// which is key for getting full tree traversal to work when updating,
408// configuring, and styling. This implements [tree.Node.NodeWalkDown].
409func (wb *WidgetBase) NodeWalkDown(fun func(tree.Node) bool) {
410 if wb.Parts == nil {
411 return
412 }
413 wb.Parts.WalkDown(fun)
414}
415
416// ForWidgetChildren iterates through the children as widgets, calling the given function.
417// Return [tree.Continue] (true) to continue, and [tree.Break] (false) to terminate.

Callers

nothing calls this directly

Calls 1

WalkDownMethod · 0.80

Tested by

no test coverage detected