edwood: github.com/rjkroege/edwood/internal/draw/drawutil Index | Files

package drawutil

import "github.com/rjkroege/edwood/internal/draw/drawutil"

Package drawutil contains draw related utility functions.


Package Files


func MouseScrollSize Uses

func MouseScrollSize(maxlines int) int

MouseScrollSize computes the number of lines of text that should be scrolled in response to a mouse scroll wheel click. Maxlines is the number of lines visible in the text window.

The default scroll increment is one line. This default can be overridden by setting the $mousescrollsize environment variable to an integer, which specifies a constant number of lines, or to a real number followed by a percent character, indicating that the scroll increment should be a percentage of the total number of lines in the window. For example, setting $mousescrollsize to 50% causes a half-window scroll increment.

Package drawutil imports 3 packages (graph) and is imported by 1 packages. Updated 2019-03-06. Refresh now. Tools for package owners.