module

Obsctl::TUI::PaletteLayout

Where the palette draws its completion chips. Kept out of the widget so the hit test measures the same columns that were painted.

Constants

COMPLETION_LINE = 2

Completions are the third line of the panel, under the result and the prompt.

GAP = 1
INDENT = 2

The indent before the first chip and the gap between chips, matching the spans Widgets::CommandPalette emits.

MAX_VISIBLE_COMPLETIONS = 8

Instance methods

chips(completions : Array(String), area : CryTUI::Rect) : Array(Tuple(Int32, Int32))

First and last column of each visible chip, in draw order.

Source
completion_row(area : CryTUI::Rect) : Int32
Source
label(completion : String) : String
Source
visible(completions : Array(String)) : Array(String)
Source