BufferPosition
Namespace: Hex1b
Assembly: Hex1b.dll
Represents a position in the terminal's virtual buffer, which unifies scrollback rows (numbered 0..N-1, oldest to newest) and screen rows (numbered N..N+H-1).
public readonly record struct BufferPosition : IComparable<BufferPosition>, IEquatable<BufferPosition>Implements
Constructors
BufferPosition(int, int)
Represents a position in the terminal's virtual buffer, which unifies scrollback rows (numbered 0..N-1, oldest to newest) and screen rows (numbered N..N+H-1).
Parameters:
Row(Int32): The virtual row index (0-based, scrollback rows first, then screen rows).Column(Int32): The column index (0-based).
public BufferPosition(int Row, int Column)Properties
Column
The column index (0-based).
Returns: Int32
public int Column { get; init; }Row
The virtual row index (0-based, scrollback rows first, then screen rows).
Returns: Int32
public int Row { get; init; }Methods
CompareTo(BufferPosition)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Parameters:
other(BufferPosition): An object to compare with this instance.
Returns: Int32
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning Less than zero This instance precedes other in the sort order. Zero This instance occurs in the same position in the sort order as other. Greater than zero This instance follows other in the sort order.
public int CompareTo(BufferPosition other)IsAfter(BufferPosition)
Returns true if this position is after the other position.
Parameters:
other(BufferPosition):
Returns: Boolean
public bool IsAfter(BufferPosition other)IsBefore(BufferPosition)
Returns true if this position is before the other position.
Parameters:
other(BufferPosition):
Returns: Boolean
public bool IsBefore(BufferPosition other)Members
operator <(BufferPosition, BufferPosition)
Parameters:
left(BufferPosition):right(BufferPosition):
Returns: Boolean
public static bool operator <(BufferPosition left, BufferPosition right)operator <=(BufferPosition, BufferPosition)
Parameters:
left(BufferPosition):right(BufferPosition):
Returns: Boolean
public static bool operator <=(BufferPosition left, BufferPosition right)operator >(BufferPosition, BufferPosition)
Parameters:
left(BufferPosition):right(BufferPosition):
Returns: Boolean
public static bool operator >(BufferPosition left, BufferPosition right)operator >=(BufferPosition, BufferPosition)
Parameters:
left(BufferPosition):right(BufferPosition):
Returns: Boolean
public static bool operator >=(BufferPosition left, BufferPosition right)