Class CodeViewportSnapshot
- Namespace
- CodeEdit.Maui
- Assembly
- CodeEdit.Maui.dll
A value-only observation of the first visible source caret and its offset from the text viewport.
public sealed record CodeViewportSnapshot : IEquatable<CodeViewportSnapshot>
- Inheritance
-
CodeViewportSnapshot
- Implements
- Inherited Members
Constructors
CodeViewportSnapshot(DocumentRevision, int, CaretAffinity, Point, Rect)
A value-only observation of the first visible source caret and its offset from the text viewport.
public CodeViewportSnapshot(DocumentRevision Revision, int Position, CaretAffinity Affinity, Point Offset, Rect TextViewport)
Parameters
RevisionDocumentRevisionPositionintAffinityCaretAffinityOffsetPointTextViewportRect
Properties
Affinity
public CaretAffinity Affinity { get; init; }
Property Value
Offset
public Point Offset { get; init; }
Property Value
Position
public int Position { get; init; }
Property Value
Revision
public DocumentRevision Revision { get; init; }
Property Value
TextViewport
public Rect TextViewport { get; init; }
Property Value
Methods
Deconstruct(out DocumentRevision, out int, out CaretAffinity, out Point, out Rect)
public void Deconstruct(out DocumentRevision Revision, out int Position, out CaretAffinity Affinity, out Point Offset, out Rect TextViewport)
Parameters
RevisionDocumentRevisionPositionintAffinityCaretAffinityOffsetPointTextViewportRect
Equals(CodeViewportSnapshot?)
public bool Equals(CodeViewportSnapshot? other)
Parameters
otherCodeViewportSnapshot
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(CodeViewportSnapshot?, CodeViewportSnapshot?)
public static bool operator ==(CodeViewportSnapshot? left, CodeViewportSnapshot? right)
Parameters
leftCodeViewportSnapshotrightCodeViewportSnapshot
Returns
operator !=(CodeViewportSnapshot?, CodeViewportSnapshot?)
public static bool operator !=(CodeViewportSnapshot? left, CodeViewportSnapshot? right)
Parameters
leftCodeViewportSnapshotrightCodeViewportSnapshot