# drafter v0.2.10 - Table of Contents An Elixir Terminal User Interface framework ## Pages - [Drafter](readme.md) - [Changelog](changelog.md) - [Remote TUI](remote_tui.md) - [Writing Widgets & Libraries](writing_widgets.md) ## Modules - [Drafter.ActionHandler](Drafter.ActionHandler.md): Behaviour for handling application action return values. - [Drafter.ActionRegistry](Drafter.ActionRegistry.md): Per-session registry for `Drafter.ActionHandler` modules. - [Drafter.AppRegistry](Drafter.AppRegistry.md): Session-scoped registration for the active app loop process. - [Drafter.CharacterWidth](Drafter.CharacterWidth.md): Unicode character display width calculation for terminal rendering. - [Drafter.Draw.BoxDrawing](Drafter.Draw.BoxDrawing.md): Unicode box drawing characters and logical combination. - [Drafter.EventResult](Drafter.EventResult.md): Normalises the tagged-tuple return values from widget event handlers into a consistent three-element result used by the event routing pipeline. - [Drafter.Examples.Breakpoints](Drafter.Examples.Breakpoints.md): A demonstration of responsive design with breakpoints. - [Drafter.Examples.Clock](Drafter.Examples.Clock.md): A clock application showing the current time in large digits. - [Drafter.Examples.Counter](Drafter.Examples.Counter.md): A simple counter application demonstrating Drafter basics. - [Drafter.Examples.NewWidgetsDemo](Drafter.Examples.NewWidgetsDemo.md): Demo showcasing the new widgets: LoadingIndicator, Link, Log, RichLog, Pretty, MaskedInput, Sparkline, DirectoryTree. - [Drafter.Examples.SimpleDemo](Drafter.Examples.SimpleDemo.md): A simple demonstration of the new declarative TUI API. - [Drafter.Format](Drafter.Format.md): Number formatting utilities that produce strings suitable for the `digits` widget. - [Drafter.LayerCompositor](Drafter.LayerCompositor.md): Layered composition system for TUI rendering. - [Drafter.Layout](Drafter.Layout.md): Pure layout calculation for the component tree. - [Drafter.Runtime.AppLoop](Drafter.Runtime.AppLoop.md): Application event loop for Drafter. - [Drafter.Runtime.Renderer](Drafter.Runtime.Renderer.md): Rendering pipeline for Drafter applications. - [Drafter.ScrollMath](Drafter.ScrollMath.md): Scroll offset and viewport calculations for list-like widgets. - [Drafter.Style](Drafter.Style.md): Color and style utilities for widget rendering. - [Drafter.Syntax.TSFeatures](Drafter.Syntax.TSFeatures.md): Parses Tree-sitter-style captures into structured highlight, fold, symbol, and textobject data. - [Drafter.Text](Drafter.Text.md): Unicode-aware text layout utilities for terminal rendering. - [Drafter.TreeDiff](Drafter.TreeDiff.md): Component tree fingerprinting and diffing for render optimization. - [Drafter.Validation](Drafter.Validation.md): Input validation framework for TUI widgets. - [Drafter.Visualization](Drafter.Visualization.md): Numeric helpers shared across Drafter widgets for data visualization. - [Drafter.Visualization.BinarySearch](Drafter.Visualization.BinarySearch.md): Binary search utilities for sorted numeric data. - [Drafter.Visualization.LTTB](Drafter.Visualization.LTTB.md): Largest Triangle Three Buckets downsampling algorithm. - [Drafter.Widget.Box](Drafter.Widget.Box.md): A container widget that draws a titled border around its children. - [Drafter.Widget.Callback](Drafter.Widget.Callback.md): Wraps atom event names or functions into closures for widget callback wiring. - [Drafter.Widget.DirtyTracker](Drafter.Widget.DirtyTracker.md): Tracks widget state changes to skip unnecessary re-renders. - [Drafter.Widget.FilePicker](Drafter.Widget.FilePicker.md): A modal file picker screen for selecting files or directories. - [Drafter.Widget.Gauge](Drafter.Widget.Gauge.md): A semi-circular gauge chart rendered using Unicode braille characters. - [Drafter.Widget.Trait](Drafter.Widget.Trait.md): Behaviour for composable widget traits. - [Drafter.Widget.Trait.Animatable](Drafter.Widget.Trait.Animatable.md): Trait that provides render timestamp for animation frames. - [Drafter.Widget.Trait.Collapsible](Drafter.Widget.Trait.Collapsible.md): Trait that adds expand/collapse capability. - [Drafter.Widget.Trait.Draggable](Drafter.Widget.Trait.Draggable.md): Trait that adds drag-and-drop capability. - [Drafter.Widget.Trait.Dsl](Drafter.Widget.Trait.Dsl.md): Spark DSL definition for the widget traits system. - [Drafter.Widget.Trait.Editable](Drafter.Widget.Trait.Editable.md): Trait that adds text editing capability. - [Drafter.Widget.Trait.Focusable](Drafter.Widget.Trait.Focusable.md): Trait that makes a widget focusable. - [Drafter.Widget.Trait.Pipeline](Drafter.Widget.Trait.Pipeline.md): Runs the trait event pipeline for a widget. - [Drafter.Widget.Trait.Resizable](Drafter.Widget.Trait.Resizable.md): Trait that adds resize capability via drag handles. - [Drafter.Widget.Trait.Scrollable](Drafter.Widget.Trait.Scrollable.md): Trait that adds scrolling capability to a widget. - [Drafter.Widget.Trait.Selectable](Drafter.Widget.Trait.Selectable.md): Trait that adds item selection capability. - Remote Servers - [Drafter.Server](Drafter.Server.md): Start SSH and Telnet servers for hosting TUI applications over the network. - Core - [Drafter](Drafter.md): An Elixir Terminal User Interface framework. - [Drafter.App](Drafter.App.md): Simplified declarative API for building TUI applications. - [Drafter.Screen](Drafter.Screen.md): Behaviour and data structure for screens in a TUI application. - [Drafter.Widget](Drafter.Widget.md): Widget behavior for TUI components. - [Drafter.WidgetLibrary](Drafter.WidgetLibrary.md): Macro for packaging and registering collections of Drafter widgets. - Events - [Drafter.Event](Drafter.Event.md): Event system for TUI applications. - [Drafter.Event.Delegation](Drafter.Event.Delegation.md): Utilities for routing events across the widget hierarchy. - [Drafter.Event.Object](Drafter.Event.Object.md): Rich event struct with DOM-like three-phase dispatch and propagation control. - Theming - [Drafter.CharacterSet](Drafter.CharacterSet.md): Named character lookup for TUI rendering. - [Drafter.Color](Drafter.Color.md): Color representation and parsing for terminal styling. - [Drafter.SkinManager](Drafter.SkinManager.md): Per-session GenServer that holds the active rendering skin and notifies the running application on change. - [Drafter.Theme](Drafter.Theme.md): Theme definition and built-in theme library for TUI applications. - [Drafter.ThemeManager](Drafter.ThemeManager.md): GenServer that holds the active theme and notifies the running application on change. - Drawing - [Drafter.Draw.Canvas](Drafter.Draw.Canvas.md): Coordinate-based drawing surface for terminal primitives. - [Drafter.Draw.Segment](Drafter.Draw.Segment.md): The fundamental rendering unit: a string of text with a single style applied. - [Drafter.Draw.Strip](Drafter.Draw.Strip.md): A horizontal line of `Drafter.Draw.Segment` structs representing one terminal row. - Display Widgets - [Drafter.Widget.CodeView](Drafter.Widget.CodeView.md): Renders a scrollable, syntax-highlighted code viewer with keyboard and drag navigation. - [Drafter.Widget.Digits](Drafter.Widget.Digits.md): Renders numbers and symbols as large ASCII art using box-drawing characters. - [Drafter.Widget.Label](Drafter.Widget.Label.md): Renders a single line or multi-line string of styled text. - [Drafter.Widget.LoadingIndicator](Drafter.Widget.LoadingIndicator.md): Renders an animated spinner with an optional label. - [Drafter.Widget.Log](Drafter.Widget.Log.md): Renders a scrollable plain-text log panel that accepts streamed line output. - [Drafter.Widget.Markdown](Drafter.Widget.Markdown.md): Renders a subset of Markdown to the terminal with themed styling. - [Drafter.Widget.Placeholder](Drafter.Widget.Placeholder.md): Renders a coloured placeholder block useful during development and layout design. - [Drafter.Widget.Pretty](Drafter.Widget.Pretty.md): Renders any Elixir term with syntax-highlighted pretty-printing. - [Drafter.Widget.ProgressBar](Drafter.Widget.ProgressBar.md): Renders a horizontal progress bar with optional percentage, value, and ETA display. - [Drafter.Widget.RichLog](Drafter.Widget.RichLog.md): Renders a scrollable log panel where each line can carry per-line style metadata. - [Drafter.Widget.Rule](Drafter.Widget.Rule.md): Renders a horizontal or vertical divider line, optionally with an embedded title. - [Drafter.Widget.Sparkline](Drafter.Widget.Sparkline.md): Renders a compact sparkline chart using Unicode block characters. - Input Widgets - [Drafter.Widget.Button](Drafter.Widget.Button.md): A clickable button widget that triggers a callback when pressed or activated via keyboard. - [Drafter.Widget.Checkbox](Drafter.Widget.Checkbox.md): A boolean toggle widget that renders an `X` mark inside a box next to an optional label. - [Drafter.Widget.Link](Drafter.Widget.Link.md): An inline hyperlink widget that opens a URL in the system browser when activated. - [Drafter.Widget.MaskedInput](Drafter.Widget.MaskedInput.md): A single-line text input that enforces a character-by-character format mask. - [Drafter.Widget.OptionList](Drafter.Widget.OptionList.md): A scrollable, single-selection list widget with keyboard, mouse, and scroll wheel navigation. - [Drafter.Widget.RadioSet](Drafter.Widget.RadioSet.md): A mutually exclusive radio button group where exactly one option can be selected at a time. - [Drafter.Widget.SelectionList](Drafter.Widget.SelectionList.md): A scrollable list widget that supports single or multiple item selection with checkbox-style indicators. - [Drafter.Widget.Switch](Drafter.Widget.Switch.md): An animated toggle switch widget with on/off states. - [Drafter.Widget.TextArea](Drafter.Widget.TextArea.md): A multi-line text editor widget with cursor navigation, scrolling, and optional syntax highlighting. - [Drafter.Widget.TextInput](Drafter.Widget.TextInput.md): A single-line text input widget with cursor navigation, text selection, and clipboard support. - Data Widgets - [Drafter.Widget.Chart](Drafter.Widget.Chart.md): Renders time-series and financial data as interactive charts with multiple styles. - [Drafter.Widget.DataTable](Drafter.Widget.DataTable.md): A full-featured tabular data widget with column headers, sorting, row selection, and scrolling. - [Drafter.Widget.DirectoryTree](Drafter.Widget.DirectoryTree.md): A live file-system tree widget that reads directories lazily as nodes are expanded. - [Drafter.Widget.Tree](Drafter.Widget.Tree.md): A hierarchical tree widget that renders nested nodes with expand/collapse controls. - Layout Widgets - [Drafter.Widget.Card](Drafter.Widget.Card.md): Renders a bordered panel with an optional title and text content lines. - [Drafter.Widget.Collapsible](Drafter.Widget.Collapsible.md): Renders an expandable section with a title row and collapsible content. - [Drafter.Widget.Container](Drafter.Widget.Container.md): Holds and arranges child widgets using vertical, horizontal, or stack layouts. - [Drafter.Widget.Footer](Drafter.Widget.Footer.md): Renders a single-row key-binding bar, typically anchored to the bottom of a screen. - [Drafter.Widget.Grid](Drafter.Widget.Grid.md): Arranges child widgets in a uniform column grid, wrapping into multiple rows. - [Drafter.Widget.Header](Drafter.Widget.Header.md): Renders a single-row application header bar with a centred title and optional live clock. - [Drafter.Widget.ScrollableContainer](Drafter.Widget.ScrollableContainer.md): Renders a scrollbar track and thumb that represent a viewport into larger content. - [Drafter.Widget.SplitPaneDivider](Drafter.Widget.SplitPaneDivider.md): Renders a resizable divider between two panes in a split layout. - [Drafter.Widget.TabbedContent](Drafter.Widget.TabbedContent.md): Renders a bordered tabbed panel where each tab displays independent content. - Testing - [Drafter.Test](Drafter.Test.md): Primary API for headless testing of TUI applications with ExUnit. - [Drafter.Test.Harness](Drafter.Test.Harness.md): Manages the lifecycle of a headless TUI app instance for testing. - Animation - [Drafter.Animation](Drafter.Animation.md): GenServer that manages timed property animations for widgets.