TerminalViewportState

data class TerminalViewportState(val historySize: Int, val scrollbackOffset: Double, val renderOffset: Int, val visibleRows: Int, val requestedRows: Int, val visualScrollOffsetPixels: Double = scrollbackOffset, val visualScrollRangePixels: Int = historySize, val viewportHeightPixels: Int = visibleRows, val contentHeightPixels: Int = requestedRows, val cellHeightPixels: Int = 1)

Host-facing snapshot of the terminal viewport's scrollback position.

The reusable Swing component uses terminal-native scrollback coordinates: 0.0 means the live viewport, and larger values move farther back into scrollback history. Hosts that use top-origin scrollbars can invert this value in their adapter without changing terminal rendering policy.

Constructors

Link copied to clipboard
constructor(historySize: Int, scrollbackOffset: Double, renderOffset: Int, visibleRows: Int, requestedRows: Int, visualScrollOffsetPixels: Double = scrollbackOffset, visualScrollRangePixels: Int = historySize, viewportHeightPixels: Int = visibleRows, contentHeightPixels: Int = requestedRows, cellHeightPixels: Int = 1)

Properties

Link copied to clipboard

fixed terminal row height in pixels.

Link copied to clipboard

visual content height for the current render cache in pixels.

Link copied to clipboard

number of rows available above the live viewport.

Link copied to clipboard

Whether the viewport is following live terminal output.

Link copied to clipboard

whole-row offset requested from the render cache. This is the integer overscan anchor for scrollbackOffset.

Link copied to clipboard

number of rows requested from the render cache, including smooth-scroll overscan when required.

Link copied to clipboard

precise visual offset from the live viewport. Fractional values exist only during smooth animation between integer row destinations; completed viewports are row-aligned.

Link copied to clipboard

visual viewport height in pixels.

Link copied to clipboard

number of terminal rows that fit in the component.

Link copied to clipboard

precise pixel offset from the live bottom.

Link copied to clipboard

maximum row-native pixel offset from the live bottom.