class

Cresium::App

Inherits Tui::App < Tui::Widget < Tui::Reactive < Reference < Object

Cresium TUI application: a stopwatch screen and a timer screen (each supporting multiple entries), toggled with [tab], plus a help overlay. Routes input to whichever screen's controller is active; owns nothing screen-specific itself.

Constants

MIN_HEIGHT = LayoutConfig::MIN_HEIGHT
MIN_WIDTH = LayoutConfig::MIN_WIDTH

Constructors

new(show_millis : Bool = true, show_message : Bool = true)

show_millis and show_message mirror the --no-ms and --no-message CLI flags (inverted — see cli.cr).

Source

Instance methods

active_stopwatch
Source
active_timer
Source
compose

Builds the widget tree: both screens (stacked, one hidden), the help overlay, and the too-small message, all on top of each other via z-index.

Source
on_capture(event : Tui::Event) : Bool

App-wide keys that must win over whichever screen is active: ? and [escape] for the help overlay, [tab] to switch screens. Everything else falls through to the base class (which handles [q]/quit).

Source
on_event(event : Tui::Event) : Bool

Routes the key to whichever screen's controller is currently active.

Source
stopwatches

Exposed for spec/key_dispatch_spec.cr and external callers; the state itself belongs to the controllers.

Source
timer_buffer
Source
timer_editing?
Source
timers
Source