wheel

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 4 Imported by: ? 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 wheel works out how far a step of the mouse wheel scrolls a view: the rows of one step the settings give, a step that follows close on the one before scrolling further, a mechanical wheel told by its bounce scrolling by larger steps until it rests, a terminal built on xterm.js, whose steps come at another pace, by a speed that decays, and a step with a modifier held one row a frame

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetSpeed

func SetSpeed(rows float64)

Sets the rows of one step of every wheel from its next step on, one for a number not above zero

func Speed

func Speed() float64

Rows of one step before any speeding up

func Xterm

func Xterm()

Takes that the terminal is built on xterm.js, as its answer to the query of its version says, for every wheel from its next step on

Types

type Wheel

type Wheel struct {
	// contains filtered or unexported fields
}

How the steps of the wheel over one view have come so far

func New

func New() *Wheel

A wheel at rest for the terminal the process runs in: one built on xterm.js where TERM_PROGRAM names Visual Studio Code, or the terminal said so of itself

func (*Wheel) Step

func (w *Wheel) Step(dir int, modifier bool, now time.Time) int

Rows a step scrolls in its direction, down for a positive dir, now; with a modifier held one row a frame. Zero while a turn of direction waits to be told from a bounce

Jump to

Keyboard shortcuts

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