Skip to content

ScrollRegionToken ​

Namespace: Hex1b.Tokens

Assembly: Hex1b.dll

Represents a CSI Set Scrolling Region command (DECSTBM): ESC [ top ; bottom r

csharp
public sealed record ScrollRegionToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<ScrollRegionToken>

Inheritance ​

Object → AnsiToken → ScrollRegionToken

Implements ​

Constructors ​

ScrollRegionToken(int, int) ​

Represents a CSI Set Scrolling Region command (DECSTBM): ESC [ top ; bottom r

Parameters:

  • Top (Int32): 1-based top row of the scrolling region. Default is 1 (first row).
  • Bottom (Int32): 1-based bottom row of the scrolling region. Default is 0, meaning the last row of the screen.
csharp
public ScrollRegionToken(int Top = 1, int Bottom = 0)

Properties ​

Bottom ​

1-based bottom row of the scrolling region. Default is 0, meaning the last row of the screen.

Returns: Int32

csharp
public int Bottom { get; init; }

Top ​

1-based top row of the scrolling region. Default is 1 (first row).

Returns: Int32

csharp
public int Top { get; init; }

Fields ​

Reset ​

Reset scrolling region to the full screen.

Returns: ScrollRegionToken

csharp
public static readonly ScrollRegionToken Reset

Remarks ​

Defines a rectangular region of the screen that will scroll. Content outside this region remains fixed. This is commonly used for status bars and headers.

When serialized: ESC[r → Reset to full screen scrollingESC[5;20r → Scroll region from row 5 to row 20

Released under the MIT License.