class

Tui::Toast

Inherits Tui::Widget / Tui::Reactive / Reference / Object

Constants

COLORS = {Level::Info => {fg: Color.white, bg: Color.blue, icon: 'ℹ'}, Level::Success => {fg: Color.white, bg: Color.green, icon: '✓'}, Level::Warning => {fg: Color.black, bg: Color.yellow, icon: '⚠'}, Level::Error => {fg: Color.white, bg: Color.red, icon: '✗'}}

Constructors

new(id : String | Nil = nil)
Source

Instance methods

clear
Source
error(text : String, duration : Time::Span = 3.seconds) : Nil
Source
info(text : String, duration : Time::Span = 3.seconds) : Nil
Source
max_visible
Source
max_visible=(max_visible : Int32)
Source
position
Source
position=(position : Symbol)
Source
render(buffer : Buffer, clip : Rect) : Nil

Override to render widget content

Source
render_rect

Override to render as overlay

Source
show(text : String, level : Level = Level::Info, duration : Time::Span = 3.seconds) : Nil

Show a toast message

Source
success(text : String, duration : Time::Span = 3.seconds) : Nil
Source
toast_width
Source
toast_width=(toast_width : Int32)
Source
warning(text : String, duration : Time::Span = 3.seconds) : Nil
Source

Nested types