Table of Contents

Struct ScrollbarMetrics

Namespace
SharpConsoleUI.Helpers.Scrollbar
Assembly
SharpConsoleUI.dll

Everything the scrollbar maths needs, on one axis. Axis-agnostic: "length" and "extent" are rows for a vertical bar and columns for a horizontal one.

public readonly record struct ScrollbarMetrics : IEquatable<ScrollbarMetrics>
Implements
Inherited Members
Extension Methods

Constructors

ScrollbarMetrics(int, int, int, int, int)

Everything the scrollbar maths needs, on one axis. Axis-agnostic: "length" and "extent" are rows for a vertical bar and columns for a horizontal one.

public ScrollbarMetrics(int TrackLength, int ContentExtent, int ViewportExtent, int Offset, int MinThumbLength = 1)

Parameters

TrackLength int

Cells available to the whole bar, arrows included.

ContentExtent int

Total length of the content being scrolled.

ViewportExtent int

Length of the visible window onto that content.

Offset int

Current scroll offset.

MinThumbLength int

Smallest thumb the bar may draw (at least 1).

Properties

ContentExtent

Total length of the content being scrolled.

public int ContentExtent { get; init; }

Property Value

int

MinThumbLength

Smallest thumb the bar may draw (at least 1).

public int MinThumbLength { get; init; }

Property Value

int

Offset

Current scroll offset.

public int Offset { get; init; }

Property Value

int

TrackLength

Cells available to the whole bar, arrows included.

public int TrackLength { get; init; }

Property Value

int

ViewportExtent

Length of the visible window onto that content.

public int ViewportExtent { get; init; }

Property Value

int