class

Cresium::StopwatchView

Inherits Cresium::StackLayout < Reference < Object

Composite widget for the stopwatch screen: a scrollable stack of DigitDisplays (one per stopwatch, the active one centered), a lap grid above it, and a status line below.

Constructors

new(show_message : Bool)

Creates the widgets, unattached to a Screen until build is called.

Source

Instance methods

build

Wires the initial widgets into screen; called once from App#compose.

Source
layout(rect : Tui::Rect, stopwatches : Array(Stopwatch), active_index : Int32) : Nil

Positions the display stack, lap grid, and status line within rect.

Source
refresh(stopwatches : Array(Stopwatch), active : Stopwatch, rect : Tui::Rect, show_millis_flag : Bool) : Nil

Updates the displayed text/styles/laps/scroll arrows from the current state; called every frame by StopwatchController#tick.

Source
screen
Source
status
Source
visible=(value : Bool) : Nil

Shows or hides the whole screen (used when switching to/from the timer screen, or hiding both when the terminal is too small).

Source