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

Method RenderWidget

core/tree.go:627–645  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

625}
626
627func (tr *Tree) RenderWidget() {
628 if tr.PushBounds() {
629 tr.Render()
630 if tr.Parts != nil {
631 // we must copy from actual values in parent
632 tr.Parts.Styles.StateLayer = tr.actStateLayer
633 if tr.StateIs(states.Selected) {
634 tr.Parts.Styles.Background = colors.Scheme.Select.Container
635 }
636 tr.renderParts()
637 }
638 tr.PopBounds()
639 }
640 // we always have to render our kids b/c
641 // we could be out of scope but they could be in!
642 if !tr.Closed {
643 tr.renderChildren()
644 }
645}
646
647//////////////////////////////////////////////////////////////////////////////
648// Selection

Callers

nothing calls this directly

Calls 6

RenderMethod · 0.95
StateIsMethod · 0.80
renderPartsMethod · 0.80
renderChildrenMethod · 0.80
PushBoundsMethod · 0.45
PopBoundsMethod · 0.45

Tested by

no test coverage detected