module Obsctl::TUI::PaletteLayout

Overview

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

Extended Modules

Defined in:

obsctl/tui/layout.cr

Constant Summary

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 Method Summary

Instance Method Detail

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

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


[View source]
def completion_row(area : CryTUI::Rect) : Int32 #

[View source]
def label(completion : String) : String #

[View source]
def visible(completions : Array(String)) : Array(String) #

[View source]