Struct ScrollbackLine
A single line stored in the scrollback buffer.
Inherited Members
Namespace: Scylla.TextMode
Assembly: ScyllaTextMode.dll
Syntax
public readonly struct ScrollbackLine
Constructors
ScrollbackLine(string, Color32, ScrollbackAttributeRun[])
Creates a new ScrollbackLine.
Declaration
public ScrollbackLine(string text, Color32 color, ScrollbackAttributeRun[] runs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The plain text content. |
| Color32 | color | The foreground color. |
| ScrollbackAttributeRun[] | runs | The styled spans within the line, or |
Fields
Color
The foreground color for the line.
Declaration
public readonly Color32 Color
Field Value
| Type | Description |
|---|---|
| Color32 |
Runs
The styled spans within the line, ordered by Start
and never overlapping, or null when the whole line is unstyled.
Declaration
public readonly ScrollbackAttributeRun[] Runs
Field Value
| Type | Description |
|---|---|
| ScrollbackAttributeRun[] |
Remarks
Null is the ordinary case. Only a line that carried style markup allocates an array, so an unstyled console costs nothing beyond the field itself.
Text
The plain text content of the line.
Declaration
public readonly string Text
Field Value
| Type | Description |
|---|---|
| string |
Methods
GetAttributesAt(int, ref int)
Returns the attributes that apply at the given character position.
Declaration
public CellAttributes GetAttributesAt(int index, ref int searchFrom)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The character index within Text. |
| int | searchFrom | The run index to start searching from, updated to the run that was matched so a caller
walking the line left to right does not rescan from the beginning each time. Pass
|
Returns
| Type | Description |
|---|---|
| CellAttributes | The attributes covering |