Hex1bTerminalSnapshot
Namespace: Hex1b.Automation
Assembly: Hex1b.dll
An immutable snapshot of terminal state at a point in time. Used for assertions and wait conditions in test sequences.
public sealed class Hex1bTerminalSnapshot : IHex1bTerminalRegion, IDisposableInheritance
Object → Hex1bTerminalSnapshot
Implements
Properties
ApplicationCursorKeysEnabled
Whether application-cursor-keys mode (DECCKM, DEC mode 1) was enabled at snapshot time.
Returns: Boolean
public bool ApplicationCursorKeysEnabled { get; }ApplicationKeypadEnabled
Whether application-keypad mode (DECKPAM, ESC =) was enabled at snapshot time.
Returns: Boolean
public bool ApplicationKeypadEnabled { get; }BracketedPasteEnabled
Whether bracketed-paste mode (DEC mode 2004) was enabled at snapshot time.
Returns: Boolean
public bool BracketedPasteEnabled { get; }CellPixelHeight
Height of a terminal character cell in pixels.
Returns: Int32
public int CellPixelHeight { get; }CellPixelWidth
Width of a terminal character cell in pixels.
Returns: Int32
public int CellPixelWidth { get; }CursorShape
DECSCUSR cursor shape value at snapshot time. 0 means "default"; values 1–6 follow the standard CSI Ps SP q mapping.
Returns: Int32
public int CursorShape { get; }CursorVisible
Whether the cursor was visible (DECTCEM, DEC mode 25) at snapshot time.
Returns: Boolean
public bool CursorVisible { get; }CursorX
Cursor X position at snapshot time.
Returns: Int32
public int CursorX { get; }CursorY
Cursor Y position at snapshot time.
Returns: Int32
public int CursorY { get; }FocusEventsEnabled
Whether focus-in/focus-out reporting (DEC mode 1004) was enabled at snapshot time.
Returns: Boolean
public bool FocusEventsEnabled { get; }Height
Terminal height at snapshot time.
Returns: Int32
public int Height { get; }InAlternateScreen
Whether the terminal was in alternate screen mode at snapshot time.
Returns: Boolean
public bool InAlternateScreen { get; }KgpImages
KGP image data referenced by placements, keyed by image ID.
Returns: IReadOnlyDictionary<UInt32, KgpImageData>
public IReadOnlyDictionary<uint, KgpImageData> KgpImages { get; }KgpPlacements
KGP image placements active at snapshot time.
Returns: IReadOnlyList<KgpPlacement>
public IReadOnlyList<KgpPlacement> KgpPlacements { get; }MouseEncodingSgrEnabled
Whether SGR mouse encoding (DEC mode 1006) was enabled at snapshot time.
Returns: Boolean
public bool MouseEncodingSgrEnabled { get; }MouseEncodingUrxvtEnabled
Whether urxvt mouse encoding (DEC mode 1015) was enabled at snapshot time.
Returns: Boolean
public bool MouseEncodingUrxvtEnabled { get; }MouseEncodingUtf8Enabled
Whether UTF-8 mouse encoding (DEC mode 1005) was enabled at snapshot time.
Returns: Boolean
public bool MouseEncodingUtf8Enabled { get; }MouseProtocolAnyEnabled
Whether any-event mouse tracking (DEC mode 1003) was enabled at snapshot time.
Returns: Boolean
public bool MouseProtocolAnyEnabled { get; }MouseProtocolButtonEnabled
Whether button-event mouse tracking (DEC mode 1002) was enabled at snapshot time.
Returns: Boolean
public bool MouseProtocolButtonEnabled { get; }MouseProtocolHighlightEnabled
Whether highlight mouse tracking (DEC mode 1001) was enabled at snapshot time.
Returns: Boolean
public bool MouseProtocolHighlightEnabled { get; }MouseProtocolNormalEnabled
Whether X11 normal mouse tracking (DEC mode 1000) was enabled at snapshot time.
Returns: Boolean
public bool MouseProtocolNormalEnabled { get; }MouseProtocolX10Enabled
Whether X10-compatibility mouse tracking (DEC mode 9) was enabled at snapshot time.
Returns: Boolean
public bool MouseProtocolX10Enabled { get; }ScrollbackLineCount
Number of scrollback lines included in this snapshot (prepended above visible content).
Returns: Int32
public int ScrollbackLineCount { get; }Terminal
Reference to the live terminal (for advanced scenarios).
Returns: Hex1bTerminal
public Hex1bTerminal Terminal { get; }Timestamp
When the snapshot was taken.
Returns: DateTimeOffset
public DateTimeOffset Timestamp { get; }Width
Terminal width at snapshot time.
Returns: Int32
public int Width { get; }Methods
ContainsSixelData()
Checks if any cell in the snapshot contains Sixel data.
Returns: Boolean
public bool ContainsSixelData()Dispose()
Releases tracked object references held by this snapshot.
public void Dispose()GetCell(int, int)
Gets the cell at the specified position within this region.
Parameters:
Returns: TerminalCell
The terminal cell, or if out of bounds.
public TerminalCell GetCell(int x, int y)GetRegion(Rect)
Gets a sub-region with localized coordinates.
Parameters:
bounds(Rect): The bounds of the region to extract, relative to this region.
Returns: Hex1bTerminalSnapshotRegion
A region view that translates local coordinates.
public Hex1bTerminalSnapshotRegion GetRegion(Rect bounds)GetScreenText()
Gets the full screen text with all lines separated by newlines.
Returns: String
public string GetScreenText()