struct
TUI::KeyMenu::Binding
- TUI::KeyMenu::Binding
- Struct
- Value
- Object
Overview
One registered binding: #trigger is the key/char #dispatch matches
against, #label is the exact text #hint shows for it, #when an
optional guard that must return true for the binding to be active
(nil means always active), #action the callback #dispatch invokes
on a match.
Defined in:
tui/widget/key_menu.crConstructors
Instance Method Summary
- #action : KeyEvent -> Nil
- #clone
- #copy_with(trigger _trigger = @trigger, label _label = @label, when _when = @when, action _action = @action)
- #label : -> String
- #trigger : Key | Char
- #when : -> Bool | Nil
Constructor Detail
def self.new(trigger : Key | Char, label : -> String, when : -> Bool | Nil, action : KeyEvent -> Nil)
#
Instance Method Detail
def copy_with(trigger _trigger = @trigger, label _label = @label, when _when = @when, action _action = @action)
#