class

Termify::ScrollRegion

Inherits Reference < Object

Confines output to a fixed-height region of the terminal, so that streaming text scrolls within it while the rest of the screen stays put.

Constructors

new(term : Termify::Terminal, height : Int32)

Height is clamped to the useful range; below three the region cannot show movement, and above ten it stops reading as a subordinate area.

Source

Instance methods

active?

Return true if the region is active (i.e. started, not yet stopped)

Source
lines
Source
start

Setup the scroll region and place the cursor at top row within it. All subsequent output will scroll within the region.

Source
stop(top = false)

Stop using the scroll region, undo the scroll constraint, and place the cursor at the top or after the bottom of the region based on top parameter which defaults to false for bottom.

Source
term
Source