Skip to content

Hex1b

Assembly: Hex1b.dll

Classes

AlignExtensions

Extension methods for creating .

csharp
public static class AlignExtensions

AnimationExtensions

Extension methods for animation and timed redraws.

csharp
public static class AnimationExtensions

AsciinemaFileWorkloadAdapter

A workload adapter that plays back an asciinema (.cast) recording file.

csharp
public sealed class AsciinemaFileWorkloadAdapter : IHex1bTerminalWorkloadAdapter, IAsyncDisposable

AsciinemaMarker

Represents a chapter marker in an asciinema recording.

csharp
public sealed record AsciinemaMarker : IEquatable<AsciinemaMarker>

AsciinemaRecorder

Records terminal sessions in asciicast v2 format (Asciinema).

csharp
public sealed class AsciinemaRecorder : IHex1bTerminalWorkloadFilter, IAsyncDisposable, IDisposable

AsciinemaRecorderOptions

Options for configuring the Asciinema recorder.

csharp
public sealed class AsciinemaRecorderOptions

AsciinemaRecording

Provides playback control for an asciinema (.cast) recording file.

csharp
public sealed class AsciinemaRecording

AsciinemaTheme

Terminal color theme for Asciinema recordings.

csharp
public sealed class AsciinemaTheme

BackdropExtensions

Extension methods for creating .

csharp
public static class BackdropExtensions

BorderExtensions

Extension methods for building BorderWidget.

csharp
public static class BorderExtensions

ButtonExtensions

Extension methods for creating ButtonWidget.

csharp
public static class ButtonExtensions

ButtonNode

csharp
public sealed class ButtonNode : Hex1bNode

CheckboxExtensions

Extension methods for creating CheckboxWidget.

csharp
public static class CheckboxExtensions

CheckboxNode

Render node for CheckboxWidget.

csharp
public sealed class CheckboxNode : Hex1bNode

ConsolePresentationAdapter

Console presentation adapter using platform-specific raw mode for proper input handling.

csharp
public sealed class ConsolePresentationAdapter : IHex1bTerminalPresentationAdapter, IAsyncDisposable

DiagnosticShellBuilderExtensions

Extension methods for adding diagnostic shell to .

csharp
public static class DiagnosticShellBuilderExtensions

DiagnosticShellWorkloadAdapter

A diagnostic shell workload that simulates a shell environment without PTY infrastructure. Useful for testing terminal control codes and debugging terminal behavior.

csharp
public sealed class DiagnosticShellWorkloadAdapter : IHex1bTerminalWorkloadAdapter, IAsyncDisposable

DisplayWidth

Provides methods to calculate the terminal display width of Unicode text.

In terminal emulators, most characters occupy 1 cell, but some characters (like CJK ideographs, emojis, and certain other symbols) occupy 2 cells. Combining characters (accents, etc.) occupy 0 cells as they combine with the previous character.

This is based on the Unicode East Asian Width property and wcwidth behavior.

csharp
public static class DisplayWidth

DrawerExtensions

Extension methods for creating DrawerWidget.

csharp
public static class DrawerExtensions

GraphemeHelper

Helper methods for working with grapheme clusters (user-perceived characters).

A grapheme cluster is what users perceive as a single "character" but may be composed of multiple Unicode code points (and thus multiple C# chars).

This class provides methods to navigate text by grapheme cluster boundaries, ensuring operations like delete, cursor movement, and selection work correctly with emojis, combining characters, and other complex Unicode sequences.

csharp
public static class GraphemeHelper

HeadlessPresentationAdapter

A presentation adapter that discards output and provides no input. Use this for headless/testing scenarios where no actual terminal I/O is needed.

csharp
public sealed class HeadlessPresentationAdapter : IHex1bTerminalPresentationAdapter, IAsyncDisposable, IDisposable

Hex1bApp

The main entry point for building terminal UI applications.

csharp
public class Hex1bApp : IDisposable, IAsyncDisposable

Hex1bAppOptions

Options for configuring a Hex1bApp.

csharp
public class Hex1bAppOptions

Hex1bAppWorkloadAdapter

Workload adapter for Hex1bApp TUI applications. Bridges the raw byte interface of with the higher-level APIs that Hex1bApp needs.

csharp
public sealed class Hex1bAppWorkloadAdapter : IHex1bAppTerminalWorkloadAdapter, IHex1bTerminalWorkloadAdapter, IAsyncDisposable, IDisposable

Hex1bNode

csharp
public abstract class Hex1bNode

Hex1bRenderContext

csharp
public class Hex1bRenderContext

Hex1bTerminal

A virtual terminal that bridges workload and presentation layers, with optional screen buffer capture for testing and debugging.

csharp
public sealed class Hex1bTerminal : IDisposable, IAsyncDisposable

Hex1bTerminalBuilder

A builder for creating and configuring instances.

csharp
public sealed class Hex1bTerminalBuilder

Hex1bTerminalChildProcess

Represents a child process attached to a pseudo-terminal (PTY). The process's stdin/stdout/stderr are connected to the PTY, making it believe it's running in an interactive terminal.

csharp
public sealed class Hex1bTerminalChildProcess : IHex1bTerminalWorkloadAdapter, IAsyncDisposable

Hex1bTerminalOptions

Options for configuring a .

csharp
public sealed class Hex1bTerminalOptions

Hex1bTerminalProcessOptions

Options for configuring a child process workload.

csharp
public sealed class Hex1bTerminalProcessOptions

HStackExtensions

Extension methods for building HStack widgets.

csharp
public static class HStackExtensions

HStackNode

csharp
public sealed class HStackNode : Hex1bNode, ILayoutProvider

HyperlinkData

Immutable data containing OSC 8 hyperlink information.

csharp
public sealed class HyperlinkData

HyperlinkExtensions

Extension methods for creating and configuring instances using the fluent API.

csharp
public static class HyperlinkExtensions

HyperlinkNode

Node that renders a hyperlink using OSC 8 escape sequences. In terminals that support OSC 8, the text becomes clickable.

csharp
public sealed class HyperlinkNode : Hex1bNode

IconExtensions

Extension methods for creating IconWidget.

csharp
public static class IconExtensions

IconNode

Render node for displaying icons with optional click handling.

csharp
public sealed class IconNode : Hex1bNode

InfoBarExtensions

Extension methods for building InfoBar widgets.

csharp
public static class InfoBarExtensions

InputBindingExtensions

Extension methods for adding input bindings to widgets.

csharp
public static class InputBindingExtensions

LayoutExtensions

Extension methods for building LayoutWidget.

csharp
public static class LayoutExtensions

ListExtensions

Extension methods for building ListWidget.

csharp
public static class ListExtensions

ListNode

csharp
public sealed class ListNode : Hex1bNode

Render node for MenuBarWidget. Horizontal container for top-level menu triggers.

csharp
public sealed class MenuBarNode : Hex1bNode, ILayoutProvider

Extension methods for creating menu widgets.

csharp
public static class MenuExtensions

Render node for MenuItemWidget. Focusable item that triggers an action when activated.

csharp
public sealed class MenuItemNode : Hex1bNode

Render node for MenuWidget. Context-aware rendering: renders as a trigger in MenuBar, or as a submenu item in a parent Menu. When opened, pushes its content to the PopupStack.

csharp
public sealed class MenuNode : Hex1bNode, ILayoutProvider

Render node for menu popup content. Displays the menu items in a bordered box.

csharp
public sealed class MenuPopupNode : Hex1bNode, ILayoutProvider

Render node for MenuSeparatorWidget. Normally non-focusable visual divider, but can accept focus as a fallback when there are no other focusable items in the menu (to allow navigation out).

csharp
public sealed class MenuSeparatorNode : Hex1bNode

Extension methods for building NavigatorWidget.

csharp
[Experimental("HEX1B001")]
public static class NavigatorExtensions

Notification

Represents a notification that can be displayed to the user. Notifications are mutable state objects - modify properties directly and the UI will update.

csharp
public sealed class Notification

NotificationAction

Represents an action button on a notification.

csharp
public sealed record NotificationAction : IEquatable<NotificationAction>

NotificationActionContext

Context passed to notification action button handlers.

csharp
public class NotificationActionContext : NotificationEventContext

NotificationEventContext

Context passed to notification lifecycle event handlers (dismiss, timeout).

csharp
public class NotificationEventContext

NotificationIconExtensions

Extension methods for creating notification icon widgets in widget contexts.

csharp
public static class NotificationIconExtensions

NotificationPanelExtensions

Extension methods for creating notification panel widgets in widget contexts.

csharp
public static class NotificationPanelExtensions

NotificationStack

Manages a collection of notifications with floating/docked state tracking and timeout handling.

csharp
public sealed class NotificationStack

PickerExtensions

Extension methods for creating Picker widgets.

csharp
public static class PickerExtensions

PickerNode

Render node for PickerWidget. Manages the picker's selection state and popup display.

csharp
public sealed class PickerNode : CompositeNode

PopupEntry

Represents a popup entry with optional anchor information and barrier flag.

csharp
public sealed class PopupEntry

PopupEntryExtensions

Extension methods for fluent configuration.

csharp
public static class PopupEntryExtensions

PopupStack

Manages a stack of popups for menu-like overlay behavior. Each popup has a transparent backdrop - clicking the backdrop pops that layer.

csharp
public sealed class PopupStack

ProgressExtensions

Extension methods for creating Progress widgets.

csharp
public static class ProgressExtensions

ProgressNode

Render node for displaying progress bars. Created by reconciling a .

csharp
public sealed class ProgressNode : Hex1bNode

QrCodeExtensions

Extension methods for creating and configuring instances using the fluent API.

csharp
public static class QrCodeExtensions

QrCodeNode

Render node for displaying QR codes in the terminal. Created by reconciling a .

csharp
public sealed class QrCodeNode : Hex1bNode

RescueContext

A widget context for building rescue fallback UI. Provides access to error information and the ability to reset the rescue state.

csharp
public sealed class RescueContext : WidgetContext<VStackWidget>

RescueExtensions

Extension methods for building RescueWidget.

csharp
public static class RescueExtensions

ResponsiveExtensions

Extension methods for building Responsive widgets. The Responsive widget displays the first child whose condition evaluates to true based on the available space from parent constraints.

csharp
public static class ResponsiveExtensions

RootContext

Root context for starting widget tree construction.

csharp
public class RootContext : WidgetContext<RootWidget>

RootWidget

Marker record for the root context (no parent widget constraint). This widget should never be reconciled - it's purely a type marker.

csharp
public sealed record RootWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<RootWidget>

ScrollExtensions

Extension methods for building ScrollWidget.

csharp
public static class ScrollExtensions

SeparatorExtensions

Extension methods for creating instances using the fluent API.

csharp
public static class SeparatorExtensions

SixelData

Immutable data containing Sixel graphics information.

csharp
public sealed class SixelData

SixelExtensions

Extension methods for creating SixelWidget.

csharp
[Experimental("HEX1B_SIXEL", UrlFormat = "https://github.com/hex1b/hex1b/blob/main/docs/experimental/sixel.md")]
public static class SixelExtensions

SizeHintExtensions

Extension methods for setting size hints on widgets. These enable a fluent API: ctx.Text("Hello").Height(SizeHint.Fill)

csharp
public static class SizeHintExtensions

SliderExtensions

Extension methods for creating Slider widgets.

csharp
public static class SliderExtensions

SliderNode

Render node for the Slider widget. Manages state, handles input, and renders the slider.

csharp
public sealed class SliderNode : Hex1bNode

SpinnerExtensions

Extension methods for creating Spinner widgets.

csharp
public static class SpinnerExtensions

SpinnerNode

Render node for displaying animated spinners. Created by reconciling a .

csharp
public sealed class SpinnerNode : Hex1bNode

SplitButtonExtensions

Extension methods for creating split button widgets in widget contexts.

csharp
public static class SplitButtonExtensions

SplitButtonNode

Render node for . Displays a primary action button with an optional dropdown for secondary actions.

csharp
public sealed class SplitButtonNode : Hex1bNode

SplitterExtensions

Extension methods for building SplitterWidget.

csharp
public static class SplitterExtensions

SplitterNode

csharp
public sealed class SplitterNode : Hex1bNode, IChildLayoutProvider

StandardProcessWorkloadAdapter

A workload adapter that wraps a standard .NET with redirected I/O.

csharp
public sealed class StandardProcessWorkloadAdapter : IHex1bTerminalWorkloadAdapter, IAsyncDisposable

StreamWorkloadAdapter

A simple workload adapter that wraps input and output streams. Useful for testing or connecting to arbitrary byte streams.

csharp
public sealed class StreamWorkloadAdapter : IHex1bTerminalWorkloadAdapter, IAsyncDisposable

SurfaceExtensions

Extension methods for creating instances using the fluent API.

csharp
public static class SurfaceExtensions

TableExtensions

Extension methods for creating TableWidget instances.

csharp
public static class TableExtensions

TerminalCapabilities

Capabilities that inform how Hex1bTerminal optimizes output and what features are available.

csharp
public record TerminalCapabilities : IEquatable<TerminalCapabilities>

TerminalExtensions

Extension methods for creating TerminalWidget.

csharp
public static class TerminalExtensions

TerminalWidgetHandle

A handle that connects a Hex1bTerminal to a TerminalWidget for embedding child terminal sessions within a TUI application.

csharp
public sealed class TerminalWidgetHandle : ICellImpactAwarePresentationAdapter, ITerminalLifecycleAwarePresentationAdapter, IHex1bTerminalPresentationAdapter, IAsyncDisposable

TextBlockNode

Render node for displaying text content. Created by reconciling a .

csharp
public sealed class TextBlockNode : Hex1bNode

TextBoxExtensions

Extension methods for building TextBoxWidget.

csharp
public static class TextBoxExtensions

TextBoxNode

csharp
public sealed class TextBoxNode : Hex1bNode

TextExtensions

Extension methods for creating and configuring instances using the fluent API.

csharp
public static class TextExtensions

ThemePanelExtensions

Extension methods for building ThemePanelWidget.

csharp
public static class ThemePanelExtensions

ToggleSwitchExtensions

Extension methods for creating ToggleSwitchWidget.

csharp
public static class ToggleSwitchExtensions

ToggleSwitchNode

A horizontal toggle switch node that renders options side-by-side and allows selection via left/right arrow keys. Selection state is owned by this node and preserved across reconciliation.

csharp
public sealed class ToggleSwitchNode : Hex1bNode

TrackedObject<T>

A reference-counted wrapper for objects tracked by terminal cells.

csharp
public sealed class TrackedObject<T> where T : class

TreeExtensions

Extension methods for creating Tree widgets.

csharp
public static class TreeExtensions

TreeItemNode

Render node for a single tree item. Managed by the parent TreeNode which handles tree structure and navigation.

csharp
public sealed class TreeItemNode : Hex1bNode

TreeNode

Container node that manages tree layout, scrolling, and guide rendering.

csharp
public sealed class TreeNode : Hex1bNode

VStackExtensions

Extension methods for building VStack widgets. The callback returns Hex1bWidget[] using collection expressions. Covariance on Hex1bWidget allows mixing different widget types.

csharp
public static class VStackExtensions

VStackNode

csharp
public sealed class VStackNode : Hex1bNode, ILayoutProvider

WebSocketPresentationAdapter

WebSocket presentation adapter for browser-based terminal connections.

csharp
public sealed class WebSocketPresentationAdapter : IHex1bTerminalPresentationAdapter, IAsyncDisposable

WidgetContext<TParentWidget>

A context for building widgets within a parent container. The TParentWidget type constrains which child widgets can be created. Extension methods return widgets directly; covariance allows collection expressions.

csharp
public class WidgetContext<TParentWidget> where TParentWidget : Hex1bWidget

WorkloadLoggingFilter

A workload filter that logs all data flowing through the workload pipeline to a file.

csharp
public sealed class WorkloadLoggingFilter : IHex1bTerminalWorkloadFilter, IAsyncDisposable, IDisposable

ZStackExtensions

Extension methods for creating .

csharp
public static class ZStackExtensions

ZStackNode

Render node for . Stacks children on the Z-axis, with later children rendering on top of earlier ones.

csharp
public sealed class ZStackNode : Hex1bNode, ILayoutProvider, IPopupHost, INotificationHost

Structs

TerminalCell

Represents a single cell in the virtual terminal screen buffer.

csharp
public readonly record struct TerminalCell : IEquatable<TerminalCell>

Interfaces

ICellImpactAwarePresentationAdapter

Extended presentation adapter interface that receives cell impact information instead of raw ANSI bytes.

csharp
public interface ICellImpactAwarePresentationAdapter : IHex1bTerminalPresentationAdapter, IAsyncDisposable

IHex1bAppTerminalWorkloadAdapter

App-side interface: Adds the higher-level APIs that Hex1bApp needs. Extends the terminal-side interface so the same adapter serves both.

csharp
public interface IHex1bAppTerminalWorkloadAdapter : IHex1bTerminalWorkloadAdapter, IAsyncDisposable

IHex1bTerminalPresentationAdapter

Presentation-side interface: Where rendered output goes TO and user input comes FROM. This is the "user side" of the virtual terminal - the actual display device.

csharp
public interface IHex1bTerminalPresentationAdapter : IAsyncDisposable

IHex1bTerminalPresentationFilter

A filter that observes data flowing between the terminal and presentation layer.

csharp
public interface IHex1bTerminalPresentationFilter

IHex1bTerminalWorkloadAdapter

Terminal-side interface: What Hex1bTerminal needs from any workload. Raw byte streams for maximum flexibility.

csharp
public interface IHex1bTerminalWorkloadAdapter : IAsyncDisposable

IHex1bTerminalWorkloadFilter

A filter that observes data flowing between the terminal and workload.

csharp
public interface IHex1bTerminalWorkloadFilter

INotificationHost

Interface for nodes that can host notifications. Implemented by NotificationPanelNode to allow notification discovery from anywhere in the tree.

csharp
public interface INotificationHost

IPopupHost

Interface for nodes that can host popup content. Implemented by ZStackNode to allow popup discovery from anywhere in the tree.

csharp
public interface IPopupHost

ITerminalAwarePresentationFilter

Presentation filter that requires a reference to the terminal.

csharp
public interface ITerminalAwarePresentationFilter : IHex1bTerminalPresentationFilter

ITerminalLifecycleAwarePresentationAdapter

Extended presentation adapter interface that receives terminal lifecycle notifications.

csharp
public interface ITerminalLifecycleAwarePresentationAdapter : IHex1bTerminalPresentationAdapter, IAsyncDisposable

Enums

AsciinemaPlaybackState

Represents the playback state of an asciinema recording.

csharp
public enum AsciinemaPlaybackState

CellAttributes

Text styling attributes that can be applied to terminal cells. These correspond to SGR (Select Graphic Rendition) parameters. Multiple attributes can be combined using bitwise OR.

csharp
[Flags]
public enum CellAttributes : ushort

CursorShape

Specifies the shape of the terminal cursor.

csharp
public enum CursorShape

TerminalState

Represents the lifecycle state of a terminal session.

csharp
public enum TerminalState

Released under the MIT License.