class

Cresium::DigitDisplay

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

Renders a string (time or input) as ASCII art via Digits, centered in its rect, with an optional character highlighted (cursor_index).

Instance methods

cursor_index

Index (in text) of the character to render as a blinking cursor (reversed style), or nil to show no cursor.

Source
cursor_index=(value : Int32 | Nil) : Nil

Moves (or clears) the blinking cursor highlight; no-op if unchanged.

Source
large=(value : Bool) : Nil

Switches between the small and large glyph sets; no-op if unchanged.

Source
large?

Renders with Digits::LARGE_GLYPHS (7 lines) instead of the default small set (4 lines, block octants) when true.

Source
min_size

Natural size of the current text at the current glyph size.

Source
render(buffer : Tui::Buffer, clip : Tui::Rect) : Nil

Draws the ASCII-art glyphs for text, centered in the widget's rect.

Source
style
Source
style=(style : Tui::Style)
Source
text
Source
text=(value : String) : Nil

Updates the rendered text; no-op (no redraw) if unchanged.

Source