ScrollView
class in package klyn.gui.terminal

    public class ScrollView extends Widget:

Object
└ Widget
└ ScrollView

Basic text scroll view.

Fields

Modifier and Type | Member | Description
--- | --- | ---
public | scrollOffset `scrollOffset as Int = 0` | No summary.

Attributes inherited from Widget: lastRenderAnsi, lastRenderHeight, lastRenderPlain, lastRenderWidth, layout, visible
Properties

Modifier and Type | Member | Description
--- | --- | ---
public property | text `text as String:` | No summary.

Properties inherited from Widget: focusable, focused, lastRenderFrame, position, size
Properties inherited from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | ScrollView `ScrollView():` | No summary.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | appendLine `appendLine(line as String) as Void:` | No summary.
public | clampScrollOffsetFor `clampScrollOffsetFor(totalLines as Int, viewHeight as Int, topInset as Int = 0, bottomInset as Int = 0) as Void:` | Clamps the current scroll offset to the valid range.
public | clear `clear() as Void:` | No summary.
public | contentWidth `contentWidth(viewWidth as Int, totalLines as Int, viewHeight as Int, topInset as Int = 0, bottomInset as Int = 0, rightInset as Int = 0) as Int:` | Returns the content width when the scrollbar reserves one column.
public | handleVerticalScrollbarMouse `handleVerticalScrollbarMouse(mouse as MouseEvent, localX as Int, localY as Int, viewWidth as Int, viewHeight as Int, totalLines as Int, topInset as Int = 0, bottomInset as Int = 0, rightInset as Int = 0) as Boolean:` | Handles mouse interaction with the vertical scrollbar.
public | hasVerticalScrollbar `hasVerticalScrollbar(totalLines as Int, viewWidth as Int, viewHeight as Int, topInset as Int = 0, bottomInset as Int = 0) as Boolean:` | Returns true when a vertical scrollbar is needed.
public | maxScrollOffsetFor `maxScrollOffsetFor(totalLines as Int, viewHeight as Int, topInset as Int = 0, bottomInset as Int = 0) as Int:` | Computes the maximal vertical scroll offset for the given content size.
public override | paintToFrame `paintToFrame(frame as TerminalFrame, row as Int, col as Int, width as Int, height as Int) as Boolean:` | No summary.
public | scrollByAmount `scrollByAmount(delta as Int, totalLines as Int, viewHeight as Int, topInset as Int = 0, bottomInset as Int = 0) as Boolean:` | Scrolls vertically by the requested delta.
public | scrollToTrackRow `scrollToTrackRow(trackRow as Int, totalLines as Int, viewHeight as Int, topInset as Int = 0, bottomInset as Int = 0) as Boolean:` | Scrolls to the absolute track row targeted by the mouse.
public | scrollbarColumn `scrollbarColumn(viewWidth as Int, rightInset as Int = 0) as Int:` | Returns the track column for the vertical scrollbar.
public | scrollbarThumbSize `scrollbarThumbSize(totalLines as Int, viewHeight as Int, topInset as Int = 0, bottomInset as Int = 0) as Int:` | Returns the scrollbar thumb size in rows.
public | scrollbarThumbTop `scrollbarThumbTop(totalLines as Int, viewHeight as Int, topInset as Int = 0, bottomInset as Int = 0) as Int:` | Returns the scrollbar thumb top row relative to the viewport.
public override | terminalPromptVisible `terminalPromptVisible() as Boolean:` | No summary.
public override | toString `toString() as String:` | Returns full textual content of the view.
public | visibleRowCount `visibleRowCount(viewHeight as Int, topInset as Int = 0, bottomInset as Int = 0) as Int:` | Returns the number of visible rows available for scrollable content.

Methods inherited from Widget: add, baseAnsiStyle, captureRenderFrame, children, clearChildren, configureCursor, focusNext, handleEvent, handleMouseEvent, hasActiveTextInput, idle, paint, paintToFrame, performLayout, refresh, renderAnsiSnapshot, renderPlainSnapshot, scrollbarThumbGlyph, scrollbarTrackGlyph, terminalPromptVisible
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml