scroll

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package scroll contains the small, state-free rules shared by Sidecar's scrollable surfaces. Rendering and content ownership stay with each surface; this package only answers movement and boundary questions in rows from the top, where negative deltas move up and positive deltas move down.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bounds

type Bounds struct {
	Position int
	Maximum  int
}

Bounds describes a vertical viewport position and its inclusive maximum.

func (Bounds) AtBoundary

func (b Bounds) AtBoundary(delta int) bool

AtBoundary reports whether delta points out of the scrollable range.

func (Bounds) Move

func (b Bounds) Move(delta int) (position int, changed bool)

Move applies delta and clamps the result to the scrollable range. Changed is false at either boundary, which lets callers avoid downstream work.

Directories

Path Synopsis
Package scrolltest provides the shared inertial-wheel stress fixture used by boundary tests across sidecar.
Package scrolltest provides the shared inertial-wheel stress fixture used by boundary tests across sidecar.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL