class TUI::Picker(W)

Overview

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.

Defined in:

tui/nav/picker.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]

Instance Method Detail

def handle_key(ev : KeyEvent) : Bool #

[View source]