Skip to content

TerminalExtensions

Namespace: Hex1b

Assembly: Hex1b.dll

Extension methods for creating TerminalWidget.

csharp
public static class TerminalExtensions

Inheritance

ObjectTerminalExtensions

Methods

CopyModeBindings(TerminalWidget, Action<CopyModeBindingsOptions>?)

Enables standard copy mode bindings with configurable key and mouse mappings. Provides vi-style keyboard navigation, character/line/block selection, and mouse drag-to-select with modifier keys.

Parameters:

Returns: TerminalWidget

The configured TerminalWidget.

csharp
public static TerminalWidget CopyModeBindings(this TerminalWidget widget, Action<CopyModeBindingsOptions>? configure = null)

Terminal<TParent>(WidgetContext<TParent>, TerminalWidgetHandle)

Creates a TerminalWidget that displays the content of the specified terminal handle.

Parameters:

  • ctx (WidgetContext<<TParent>>): The widget context.
  • handle (TerminalWidgetHandle): The terminal handle to display.

Returns: TerminalWidget

A new TerminalWidget bound to the handle.

csharp
public static TerminalWidget Terminal<TParent>(this WidgetContext<TParent> ctx, TerminalWidgetHandle handle) where TParent : Hex1bWidget

WhenNotRunning(TerminalWidget, Func<TerminalNotRunningArgs, Hex1bWidget>)

Specifies a fallback widget to display when the terminal is not running.

Parameters:

Returns: TerminalWidget

The configured TerminalWidget.

csharp
public static TerminalWidget WhenNotRunning(this TerminalWidget widget, Func<TerminalNotRunningArgs, Hex1bWidget> builder)

WithMouseWheelScrollAmount(TerminalWidget, int)

Sets the number of rows to scroll per mouse wheel tick.

Parameters:

  • widget (TerminalWidget): The TerminalWidget to configure.
  • rows (Int32): Number of rows per scroll tick. Defaults to 3.

Returns: TerminalWidget

The configured TerminalWidget.

csharp
public static TerminalWidget WithMouseWheelScrollAmount(this TerminalWidget widget, int rows)

Released under the MIT License.