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

Method NeedsRebuild

core/render.go:83–92  ·  view source on GitHub ↗

NeedsRebuild returns whether the [renderContext] indicates a full rebuild is needed. This is typically used to detect when the settings have been changed, such as when the color scheme or zoom is changed.

()

Source from the content-addressed store, hash-verified

81// when the settings have been changed, such as when the color
82// scheme or zoom is changed.
83func (wb *WidgetBase) NeedsRebuild() bool {
84 if wb.This == nil || wb.Scene == nil || wb.Scene.Stage == nil {
85 return false
86 }
87 rc := wb.Scene.renderContext()
88 if rc == nil {
89 return false
90 }
91 return rc.rebuild
92}
93
94// layoutScene does a layout of the scene: Size, Position
95func (sc *Scene) layoutScene() {

Callers 5

renderSVGMethod · 0.80
setUnitContextFunction · 0.80
SizeFromChildrenMethod · 0.80
InitMethod · 0.80
styleEditorMethod · 0.80

Calls 1

renderContextMethod · 0.45

Tested by

no test coverage detected