Skip to content

EditorOverlay ​

Namespace: Hex1b.Widgets

Assembly: Hex1b.dll

Describes a floating UI element anchored to a document position in the editor. Pushed by decoration providers via .

csharp
public record EditorOverlay : IEquatable<EditorOverlay>

Inheritance ​

Object → EditorOverlay

Implements ​

Constructors ​

EditorOverlay(string, DocumentPosition, OverlayPlacement, IReadOnlyList<OverlayLine>, bool) ​

Describes a floating UI element anchored to a document position in the editor. Pushed by decoration providers via .

Parameters:

  • Id (String): Unique identifier for dismiss/update.
  • AnchorPosition (DocumentPosition): Document position to anchor the overlay to (1-based line/column).
  • Placement (OverlayPlacement): Where to place the overlay relative to the anchor.
  • Content (IReadOnlyList<OverlayLine>): Lines of content to display in the overlay.
  • DismissOnCursorMove (Boolean): Whether to dismiss this overlay when the cursor moves.
csharp
public EditorOverlay(string Id, DocumentPosition AnchorPosition, OverlayPlacement Placement, IReadOnlyList<OverlayLine> Content, bool DismissOnCursorMove = true)

Properties ​

AnchorPosition ​

Document position to anchor the overlay to (1-based line/column).

Returns: DocumentPosition

csharp
public DocumentPosition AnchorPosition { get; init; }

Content ​

Lines of content to display in the overlay.

Returns: IReadOnlyList<OverlayLine>

csharp
public IReadOnlyList<OverlayLine> Content { get; init; }

DismissOnCursorMove ​

Whether to dismiss this overlay when the cursor moves.

Returns: Boolean

csharp
public bool DismissOnCursorMove { get; init; }

Id ​

Unique identifier for dismiss/update.

Returns: String

csharp
public string Id { get; init; }

MaxHeight ​

Maximum height in rows. Null for auto-sizing.

Returns: Nullable<Int32>

csharp
public int? MaxHeight { get; init; }

MaxWidth ​

Maximum width in columns. Null for auto-sizing.

Returns: Nullable<Int32>

csharp
public int? MaxWidth { get; init; }

Placement ​

Where to place the overlay relative to the anchor.

Returns: OverlayPlacement

csharp
public OverlayPlacement Placement { get; init; }

Title ​

Optional title shown in the overlay border.

Returns: String

csharp
public string? Title { get; init; }

Released under the MIT License.