module

TUI::DropdownPicker

Sizing/construction factory for a centered, content-sized Window hosting a searchable option list — the dropdown-picker counterpart to Popup.centered, except height tracks option count instead of a fixed single message line, and the "message" is an interactive list rather than static text. Push the returned Window via NavStack#push directly (same escape hatch Popup itself documents and uses), not Runtime#push, so it keeps this computed size instead of being forced full-screen.

Constants

DEFAULT_MAX_HEIGHT = 12

Default upper bound on the popup's height in rows, before the screen-size clamp in #build_window — keeps a picker with many options from growing to fill the whole screen. Override via .centered/.centered_multi's max_height for a taller popup.

Class methods

centered(screen : Screen, title : String, options : Array(FormEnumOption), initial_index : Int32 = 0, max_height : Int32 = DEFAULT_MAX_HEIGHT) : NamedTuple(window: Window, list: OptionListView)
Source
centered_multi(screen : Screen, title : String, options : Array(FormEnumOption), initial : Set(String), max_height : Int32 = DEFAULT_MAX_HEIGHT) : NamedTuple(window: Window, list: MultiOptionListView)
Source