package mosaic

  1. Overview
  2. Docs

Module Mosaic_uiSource

Terminal UI toolkit: widgets, rendering, and event dispatch.

Mosaic_ui re-exports the modules that make up the Mosaic UI layer. It provides:

Events and input

Sourcemodule Event : sig ... end

Keyboard, paste, and mouse UI events with propagation control.

Sourcemodule Selection : sig ... end

Text selections with anchor and focus points.

Core infrastructure

Sourcemodule Renderer : sig ... end

Layout, drawing, hit testing, and event dispatch pipeline.

Sourcemodule Renderable : sig ... end

Mutable UI tree nodes with layout integration.

Text primitives

Sourcemodule Text_buffer : sig ... end

Styled text storage with per-character styles and highlight overlays.

Sourcemodule Text_surface : sig ... end

Text rendering surface with wrapping, viewport, and selection.

Sourcemodule Edit_buffer : sig ... end

Grapheme-aware text editing buffer with cursor, selection, and undo.

Widget catalogue

module Box : sig ... end

Bordered container with background fill and optional title.

module Text : sig ... end

Styled text display with wrapping, truncation, and selection.

module Slider : sig ... end

Interactive horizontal or vertical slider.

module Text_input : sig ... end

Single-line text input with cursor, selection, and clipboard.

module Canvas : sig ... end

Low-level drawing surface for custom cell-level rendering.

module Select : sig ... end

Vertical list selector with optional descriptions.

module Tab_select : sig ... end

Horizontal tab navigation with optional underline and descriptions.

module Markdown : sig ... end

CommonMark renderer with headings, code blocks, lists, and tables.

module Spinner : sig ... end

Animated loading indicator with preset frame sets.

module Progress_bar : sig ... end

Progress bar with sub-cell precision via Unicode half-blocks.

module Textarea : sig ... end

Multi-line text editor with wrapping, scrolling, and selection.

module Scroll_bar : sig ... end

Scrollbar with proportional thumb sizing and arrow buttons.

module Scroll_box : sig ... end

Scrollable container with optional scrollbars and sticky scroll.

module Table : sig ... end

Data table with columns, rows, keyboard navigation, and selection.

module Tree : sig ... end

Hierarchical tree with expandable nodes, guide lines, and selection.

module Code : sig ... end

Code display with syntax highlighting, wrapping, and selection.

module Line_number : sig ... end

Line-number gutter with per-line colours, signs, and custom numbering.

Theming

Sourcemodule Syntax_theme : sig ... end

Syntax themes: maps capture-group names to terminal styles.

Declarative UI

Sourcemodule Vnode : sig ... end

Virtual node tree for declarative UI descriptions.