module
Obsctl::TUI::WhichKeyLayout
Overview
The which-key menu that opens while a key sequence is half typed. It floats above the palette, is as tall as the pending sequence needs, and never grows past the space it has.
Extended Modules
Defined in:
obsctl/tui/layout.crConstant Summary
-
MIN_WIDTH =
22
Instance Method Summary
- #compute(area : CryTUI::Rect, entries : Array(Keymap::Entry), anchor : CryTUI::Rect) : CryTUI::Rect
-
#entry_text(entry : Keymap::Entry) : String
One menu row.
-
#visible(entries : Array(Keymap::Entry), rect : CryTUI::Rect) : Array(Keymap::Entry)
The entries that fit inside the panel once its borders are taken.
Instance Method Detail
def compute(area : CryTUI::Rect, entries : Array(Keymap::Entry), anchor : CryTUI::Rect) : CryTUI::Rect
#
def entry_text(entry : Keymap::Entry) : String
#
One menu row. The widget splits this into styled spans that concatenate back to exactly this string, so the measured width stays honest.
The entries that fit inside the panel once its borders are taken.