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

Method ScrollChanged

core/scroll.go:102–106  ·  view source on GitHub ↗

ScrollChanged is called in the OnInput event handler for updating, when the scrollbar value has changed, for given dimension. This is part of the Layouter interface.

(d math32.Dims, sb *Slider)

Source from the content-addressed store, hash-verified

100// when the scrollbar value has changed, for given dimension.
101// This is part of the Layouter interface.
102func (fr *Frame) ScrollChanged(d math32.Dims, sb *Slider) {
103 fr.Geom.Scroll.SetDim(d, -sb.Value)
104 fr.This.(Layouter).ApplyScenePos() // computes updated positions
105 fr.NeedsRender()
106}
107
108// ScrollUpdateFromGeom updates the scrollbar for given dimension
109// based on the current Geom.Scroll value for that dimension.

Callers

nothing calls this directly

Calls 3

NeedsRenderMethod · 0.80
ApplyScenePosMethod · 0.65
SetDimMethod · 0.45

Tested by

no test coverage detected