EditorWidget
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
Widget for multi-line document editing. Supports shared documents and synced cursors.
public sealed record EditorWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<EditorWidget>Inheritance
Object → Hex1bWidget → EditorWidget
Implements
Constructors
EditorWidget(EditorState)
Widget for multi-line document editing. Supports shared documents and synced cursors.
Parameters:
State(EditorState):
public EditorWidget(EditorState State)Properties
State
Returns: EditorState
public EditorState State { get; init; }Methods
Decorations(ITextDecorationProvider)
Adds a text decoration provider to the editor. Providers supply per-character styling such as syntax highlighting, diagnostic underlines, and other visual decorations. Multiple providers can be added; their decorations are resolved by priority.
Parameters:
provider(ITextDecorationProvider):
Returns: EditorWidget
public EditorWidget Decorations(ITextDecorationProvider provider)Features(LspFeatureSet)
Overrides the enabled LSP feature set. When specified, this takes precedence over the extension's . Use to selectively enable or disable features without creating a custom extension.
Parameters:
features(LspFeatureSet):
Returns: EditorWidget
public EditorWidget Features(LspFeatureSet features)Gutter(IGutterProvider)
Adds a gutter provider to the editor's left margin. Multiple providers are rendered left-to-right in registration order.
Parameters:
provider(IGutterProvider):
Returns: EditorWidget
public EditorWidget Gutter(IGutterProvider provider)LineNumbers(bool)
Enables or disables line numbers in a gutter on the left side of the editor. This is a convenience method that adds a .
Parameters:
show(Boolean):
Returns: EditorWidget
public EditorWidget LineNumbers(bool show = true)OnTextChanged(Action<EditorTextChangedEventArgs>)
Sets a synchronous handler called when the document text changes.
Parameters:
handler(Action<EditorTextChangedEventArgs>):
Returns: EditorWidget
public EditorWidget OnTextChanged(Action<EditorTextChangedEventArgs> handler)OnTextChanged(Func<EditorTextChangedEventArgs, Task>)
Sets an asynchronous handler called when the document text changes.
Parameters:
handler(Func<EditorTextChangedEventArgs, Task>):
Returns: EditorWidget
public EditorWidget OnTextChanged(Func<EditorTextChangedEventArgs, Task> handler)WithViewRenderer(IEditorViewRenderer)
Sets the view renderer for this editor. Use for text or for hex dump views.
Parameters:
renderer(IEditorViewRenderer):
Returns: EditorWidget
public EditorWidget WithViewRenderer(IEditorViewRenderer renderer)WordWrap(bool)
Enables or disables soft line wrapping. When enabled, lines that exceed the viewport width are visually wrapped to the next display line.
Parameters:
enabled(Boolean):
Returns: EditorWidget
public EditorWidget WordWrap(bool enabled = true)Fields
AddCursorAtNextMatch
Rebindable action: Add cursor at next match.
Returns: ActionId
public static readonly ActionId AddCursorAtNextMatchClick
Rebindable action: Click to position cursor.
Returns: ActionId
public static readonly ActionId ClickCtrlClick
Rebindable action: Ctrl+Click to add/remove cursor.
Returns: ActionId
public static readonly ActionId CtrlClickDeleteBackward
Rebindable action: Delete backward.
Returns: ActionId
public static readonly ActionId DeleteBackwardDeleteForward
Rebindable action: Delete forward.
Returns: ActionId
public static readonly ActionId DeleteForwardDeleteLine
Rebindable action: Delete line.
Returns: ActionId
public static readonly ActionId DeleteLineDeleteWordBackward
Rebindable action: Delete previous word.
Returns: ActionId
public static readonly ActionId DeleteWordBackwardDeleteWordForward
Rebindable action: Delete next word.
Returns: ActionId
public static readonly ActionId DeleteWordForwardDoubleClick
Rebindable action: Double-click to select word.
Returns: ActionId
public static readonly ActionId DoubleClickInsertNewline
Rebindable action: Insert newline.
Returns: ActionId
public static readonly ActionId InsertNewlineInsertTab
Rebindable action: Insert tab.
Returns: ActionId
public static readonly ActionId InsertTabMoveDown
Rebindable action: Move cursor down.
Returns: ActionId
public static readonly ActionId MoveDownMoveLeft
Rebindable action: Move cursor left.
Returns: ActionId
public static readonly ActionId MoveLeftMoveRight
Rebindable action: Move cursor right.
Returns: ActionId
public static readonly ActionId MoveRightMoveToDocumentEnd
Rebindable action: Move to document end.
Returns: ActionId
public static readonly ActionId MoveToDocumentEndMoveToDocumentStart
Rebindable action: Move to document start.
Returns: ActionId
public static readonly ActionId MoveToDocumentStartMoveToLineEnd
Rebindable action: Move to line end.
Returns: ActionId
public static readonly ActionId MoveToLineEndMoveToLineStart
Rebindable action: Move to line start.
Returns: ActionId
public static readonly ActionId MoveToLineStartMoveUp
Rebindable action: Move cursor up.
Returns: ActionId
public static readonly ActionId MoveUpMoveWordLeft
Rebindable action: Move to previous word.
Returns: ActionId
public static readonly ActionId MoveWordLeftMoveWordRight
Rebindable action: Move to next word.
Returns: ActionId
public static readonly ActionId MoveWordRightPageDown
Rebindable action: Page down.
Returns: ActionId
public static readonly ActionId PageDownPageUp
Rebindable action: Page up.
Returns: ActionId
public static readonly ActionId PageUpRedo
Rebindable action: Redo last undone edit.
Returns: ActionId
public static readonly ActionId RedoScrollDown
Rebindable action: Scroll down.
Returns: ActionId
public static readonly ActionId ScrollDownScrollLeft
Rebindable action: Scroll left.
Returns: ActionId
public static readonly ActionId ScrollLeftScrollRight
Rebindable action: Scroll right.
Returns: ActionId
public static readonly ActionId ScrollRightScrollUp
Rebindable action: Scroll up.
Returns: ActionId
public static readonly ActionId ScrollUpSelectAll
Rebindable action: Select all text.
Returns: ActionId
public static readonly ActionId SelectAllSelectDown
Rebindable action: Extend selection down.
Returns: ActionId
public static readonly ActionId SelectDownSelectLeft
Rebindable action: Extend selection left.
Returns: ActionId
public static readonly ActionId SelectLeftSelectPageDown
Rebindable action: Select page down.
Returns: ActionId
public static readonly ActionId SelectPageDownSelectPageUp
Rebindable action: Select page up.
Returns: ActionId
public static readonly ActionId SelectPageUpSelectRight
Rebindable action: Extend selection right.
Returns: ActionId
public static readonly ActionId SelectRightSelectToDocumentEnd
Rebindable action: Select to document end.
Returns: ActionId
public static readonly ActionId SelectToDocumentEndSelectToDocumentStart
Rebindable action: Select to document start.
Returns: ActionId
public static readonly ActionId SelectToDocumentStartSelectToLineEnd
Rebindable action: Select to line end.
Returns: ActionId
public static readonly ActionId SelectToLineEndSelectToLineStart
Rebindable action: Select to line start.
Returns: ActionId
public static readonly ActionId SelectToLineStartSelectUp
Rebindable action: Extend selection up.
Returns: ActionId
public static readonly ActionId SelectUpSelectWordLeft
Rebindable action: Select to previous word.
Returns: ActionId
public static readonly ActionId SelectWordLeftSelectWordRight
Rebindable action: Select to next word.
Returns: ActionId
public static readonly ActionId SelectWordRightToggleFold
Rebindable action: Toggle fold at cursor line.
Returns: ActionId
public static readonly ActionId ToggleFoldTripleClick
Rebindable action: Triple-click to select line.
Returns: ActionId
public static readonly ActionId TripleClickUndo
Rebindable action: Undo last edit.
Returns: ActionId
public static readonly ActionId Undo