Table of Contents

Struct GutterRenderContext

Namespace
SharpConsoleUI.Controls
Assembly
SharpConsoleUI.dll

Provides rendering context for a single row of a gutter renderer. Passed by-ref to avoid heap allocation on every row/renderer combination.

public readonly struct GutterRenderContext
Inherited Members
Extension Methods

Properties

BackgroundColor

The control's current background color.

public Color BackgroundColor { get; init; }

Property Value

Color

Buffer

The character buffer to paint into.

public CharacterBuffer Buffer { get; init; }

Property Value

CharacterBuffer

ForegroundColor

The control's current foreground color.

public Color ForegroundColor { get; init; }

Property Value

Color

HasFocus

Whether the control currently has keyboard focus.

public bool HasFocus { get; init; }

Property Value

bool

IsCursorLine

Whether this row is on the line that contains the cursor.

public bool IsCursorLine { get; init; }

Property Value

bool

IsFirstWrappedSegment

Whether this row corresponds to the first wrapped segment of the source line. False for continuation rows produced by word/character wrapping.

public bool IsFirstWrappedSegment { get; init; }

Property Value

bool

SourceLineIndex

The zero-based source line index for this row, or -1 if the row is beyond content (e.g. empty rows at the bottom of the viewport).

public int SourceLineIndex { get; init; }

Property Value

int

TotalLineCount

The total number of source lines in the document.

public int TotalLineCount { get; init; }

Property Value

int

X

The X coordinate where this renderer's columns start.

public int X { get; init; }

Property Value

int

Y

The Y coordinate of the current row.

public int Y { get; init; }

Property Value

int