class

Tui::Button

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

Constructors

new(label : String = "", id : String | Nil = nil, style : Style = Style.new(fg: Color.white, bg: Color.blue), disabled : Bool = false)
Source

Instance methods

disabled
Source
disabled=(value : Bool) : Bool
Source
disabled_style
Source
disabled_style=(disabled_style : Style)
Source
focus_style
Source
focus_style=(focus_style : Style)
Source
label
Source
label=(value : String) : String
Source
on_event(event : Event) : Bool

Override to handle events for this widget (target/bubble phase) Called after children have had a chance to handle the event

Source
on_press

Set press handler

Source
press

Trigger button press

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

Override to render widget content

Source
style
Source
style=(style : Style)
Source
watch_disabled(value : Bool)

Override this to react to changes

Source
watch_label(value : String)

Override this to react to changes

Source