scroll
Shared scrolling and internal scrollbar rendering for all Containers.
Methods
scroll.disable(self)
Resets all scroll state when scrolling is disabled.
- self (
Container) Scrollable container
scroll.setup(self)
Initializes per-instance state and input handlers.
- self (
Container) Scrollable container
scroll.update(self)
Recomputes content bounds and visible scrollbar state after layout.
- self (
Container) Scrollable container
scroll.geometry(self)
Returns viewport and scrollbar geometry for a container.
self (
Container) Scrollable containerreturns geometry (
ContainerScrollbarGeometry)
scroll.draw(self, buf)
Draws the scrollbar(s) into the buffer.
- self (
Container) Scrollable container - buf (
Render) Render buffer
scroll.set(self, x, y, emit)
Applies clamped scroll offsets.
self (
Container) Scrollable containerx (
number) Horizontal offsety (
number) Vertical offsetemit (
boolean, optional) Emit the scroll event unless falsereturns changed (
boolean)
scroll.wheel(self, direction)
Handles a vertical mouse-wheel movement.
self (
Container) Scrollable containerdirection (
number) Wheel directionreturns handled (
boolean)
scroll.isBarPoint(self, x, y)
Hit-tests a point against the visible scrollbars.
self (
Container) Scrollable containerx (
number) Local x coordinatey (
number) Local y coordinatereturns axis (
'x'|'y'|'corner'|false)returns geometry (
ContainerScrollbarGeometry|nil)
scroll.pointerDown(self, x, y)
Starts a thumb drag or performs a scrollbar page step.
self (
Container) Scrollable containerx (
number) Local x coordinatey (
number) Local y coordinatereturns handled (
boolean)
scroll.drag(self, x, y)
Updates an active scrollbar thumb drag.
self (
Container) Scrollable containerx (
number) Local x coordinatey (
number) Local y coordinatereturns handled (
boolean)