class

Opal::UI::CommandPalette

Inherits Opal::UI::Control < Opal::UI::InputHookable < Opal::UI::Element < Opal::UI::Themable < Reference < Object

Spotlight / Quick Launcher overlay modal for searchable actions and hotkeys.

Constructors

new(actions : Array(CommandAction) = [] of CommandAction)
Source

Instance methods

actions
Source
add(id : String, title : String, category : String = "General", shortcut : String | Nil = nil) : CommandAction
Source
add(action : CommandAction) : Nil
Source
add(id : String, title : String, category : String = "General", shortcut : String | Nil = nil, &block : -> Nil) : CommandAction
Source
append_char(ch : Char) : Nil
Source
backspace
Source
cursor
Source
cursor=(cursor : Int32)
Source
cursor_down
Source
cursor_up
Source
execute_selected
Source
handle_key(event : Terminal::KeyEvent) : Bool

Default key event handler. Override in subclasses if not using @default_input_proc.

Source
handle_mouse(event : Terminal::MouseEvent) : Bool

Default mouse event handler. Override in subclasses if not using @default_input_proc.

Source
matches
Source
preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
Source
query
Source
query=(query : String)
Source
render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
Source
selected_action
Source
selected_item

Alias

Source
visible=(visible : Bool)
Source
visible?
Source