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

Method OnAdd

core/tree.go:476–490  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

474}
475
476func (tr *Tree) OnAdd() {
477 tr.WidgetBase.OnAdd()
478 tr.Text = tr.Name
479 if ptv := AsTree(tr.Parent); ptv != nil {
480 tr.root = ptv.root
481 tr.IconOpen = ptv.IconOpen
482 tr.IconClosed = ptv.IconClosed
483 tr.IconLeaf = ptv.IconLeaf
484 } else {
485 tr.root = tr
486 }
487 if tr.root.TreeInit != nil {
488 tr.root.TreeInit(tr)
489 }
490}
491
492// rootIsReadOnly returns the ReadOnly status of the root node,
493// which is what controls the functional inactivity of the tree

Callers

nothing calls this directly

Calls 2

AsTreeFunction · 0.85
OnAddMethod · 0.65

Tested by

no test coverage detected