ProgramOptions class

Options for configuring the TUI program.

Constructors

ProgramOptions({bool altScreen = true, bool mouse = false, MouseMode mouseMode = MouseMode.none, int fps = 60, bool frameTick = true, bool hideCursor = true, bool bracketedPaste = false, Duration inputTimeout = const Duration(milliseconds: 50), bool catchPanics = true, int maxStackFrames = 10, MessageFilter? filter, bool signalHandlers = true, bool sendInterrupt = true, String? startupTitle, Stream<List<int>>? input, void output(String)?, bool disableRenderer = false, bool ansiCompress = false, bool useUltravioletRenderer = true, bool useUltravioletInputDecoder = true, Future<void>? cancelSignal, List<String>? environment, bool inputTTY = false, ({bool useBackspace, bool useTabs})? movementCapsOverride, bool shutdownSharedStdinOnExit = true, Duration metricsInterval = const Duration(seconds: 1)})
const

Properties

altScreen bool
Whether to use the alternate screen buffer (fullscreen mode).
final
ansiCompress bool
Enable simple ANSI compression to remove redundant sequences.
final
bracketedPaste bool
Whether to enable bracketed paste mode.
final
cancelSignal Future<void>?
Optional cancellation signal. When this completes, the program exits with cancellation.
final
catchPanics bool
Whether to catch panics (exceptions) and restore terminal state.
final
disableRenderer bool
Disable all rendering (nil renderer). Output is written once without diffing.
final
environment List<String>?
Optional environment variables to use for terminal setup.
final
filter MessageFilter?
Optional message filter function.
final
fps int
Maximum frames per second for rendering.
final
frameTick bool
Whether to automatically send FrameTickMsg at the configured fps.
final
hashCode int
The hash code for this object.
no setterinherited
hideCursor bool
Whether to hide the cursor during program execution.
final
input Stream<List<int>>?
Optional custom input stream.
final
inputTimeout Duration
Timeout for waiting on incomplete escape sequences.
final
inputTTY bool
Whether to prefer the controlling TTY (/dev/tty) for interactive input.
final
maxStackFrames int
Maximum number of stack frames to display on panic.
final
metricsInterval Duration
final
mouse bool
Whether to enable mouse tracking.
final
mouseMode MouseMode
Mouse tracking mode (none, cell motion, all motion).
final
movementCapsOverride → ({bool useBackspace, bool useTabs})?
Optional override for terminal movement optimization capabilities.
final
output → void Function(String)?
Optional custom output function.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendInterrupt bool
Whether to send InterruptMsg on SIGINT instead of a Ctrl+C KeyMsg.
final
shutdownSharedStdinOnExit bool
Whether to shut down the shared stdin broadcast stream on exit.
final
signalHandlers bool
Whether to install signal handlers (SIGINT, SIGWINCH).
final
startupTitle String?
Optional title to set on program startup.
final
useUltravioletInputDecoder bool
Use the Ultraviolet-style event decoder for terminal input.
final
useUltravioletRenderer bool
Use the Ultraviolet-inspired buffer + diff renderer.
final

Methods

copyWith({bool? altScreen, bool? mouse, MouseMode? mouseMode, int? fps, bool? frameTick, bool? hideCursor, bool? bracketedPaste, Duration? inputTimeout, bool? catchPanics, int? maxStackFrames, MessageFilter? filter, bool? signalHandlers, bool? sendInterrupt, String? startupTitle, Stream<List<int>>? input, void output(String)?, bool? disableRenderer, bool? ansiCompress, bool? useUltravioletRenderer, bool? useUltravioletInputDecoder, Future<void>? cancelSignal, List<String>? environment, bool? inputTTY, ({bool useBackspace, bool useTabs})? movementCapsOverride, bool? shutdownSharedStdinOnExit}) ProgramOptions
Creates a copy with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
withFilter(MessageFilter filter) ProgramOptions
Creates options with the given message filter.
withInput(Stream<List<int>> input) ProgramOptions
Creates options with custom input stream.
withMouseAllMotion() ProgramOptions
Creates options that enable mouse all motion tracking.
withMouseCellMotion() ProgramOptions
Creates options that enable mouse cell motion tracking.
withoutCatchPanics() ProgramOptions
Creates options with panic catching disabled.
withoutFilter() ProgramOptions
Creates options with no message filter.
withoutFrameTick() ProgramOptions
Creates options that disable automatic frame ticks.
withoutInterruptMsg() ProgramOptions
Creates options that send Ctrl+C KeyMsg instead of InterruptMsg on SIGINT.
withOutput(void output(String)) ProgramOptions
Creates options with custom output function.
withoutRenderer() ProgramOptions
Creates options that disable rendering (nil renderer).
withoutSignalHandlers() ProgramOptions
Creates options with signal handlers disabled.
withStartupTitle(String title) ProgramOptions
Creates options with the given startup title.

Operators

operator ==(Object other) bool
The equality operator.
inherited