MCPcopy
hub / github.com/g3n/engine / NewScroller

Function NewScroller

gui/scroller.go:90–95  ·  view source on GitHub ↗

NewScroller creates and returns a pointer to a new Scroller with the specified target IPanel and ScrollMode.

(width, height float32, mode ScrollMode, target IPanel)

Source from the content-addressed store, hash-verified

88// NewScroller creates and returns a pointer to a new Scroller with the specified
89// target IPanel and ScrollMode.
90func NewScroller(width, height float32, mode ScrollMode, target IPanel) *Scroller {
91
92 s := new(Scroller)
93 s.initialize(width, height, mode, target)
94 return s
95}
96
97// initialize initializes this scroller and can be called by other types which embed a scroller
98func (s *Scroller) initialize(width, height float32, mode ScrollMode, target IPanel) {

Callers

nothing calls this directly

Calls 1

initializeMethod · 0.45

Tested by

no test coverage detected