class

TUI::Picker(W)

Inherits Reference < Object

Wraps any Pickable widget as a modal value-picker. Does not modify the wrapped widget — filters its key input externally: Enter reports the selection, Esc cancels, listed chars are swallowed (e.g. to suppress mutating actions like delete/new while picking), everything else passes through to the wrapped widget unchanged.

Constructors

new(widget : W, on_pick : String -> Nil, on_cancel : -> Nil, suppress : Array(Char) = [] of Char)
Source

Instance methods

handle_key(ev : KeyEvent) : Bool
Source