class Opal::UI::CommandPalette

Overview

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

Defined in:

opal/ui/components/command_palette.cr

Constructors

Instance Method Summary

Instance methods inherited from class Opal::UI::Element

preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32) preferred_size, render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil render

Constructor Detail

def self.new(actions : Array(CommandAction) = [] of CommandAction) #

[View source]

Instance Method Detail

def actions : Array(CommandAction) #

[View source]
def add(id : String, title : String, category : String = "General", shortcut : String | Nil = nil) : CommandAction #

[View source]
def add(action : CommandAction) : Nil #

[View source]
def add(id : String, title : String, category : String = "General", shortcut : String | Nil = nil, &block : -> Nil) : CommandAction #

[View source]
def append_char(ch : Char) : Nil #

[View source]
def backspace : Nil #

[View source]
def cursor : Int32 #

[View source]
def cursor=(cursor : Int32) #

[View source]
def cursor_down : Nil #

[View source]
def cursor_up : Nil #

[View source]
def execute_selected : CommandAction | Nil #

[View source]
def matches : Array(Input::FuzzyMatch(CommandAction)) #

[View source]
def preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32) #

[View source]
def query : String #

[View source]
def query=(query : String) #

[View source]
def render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil #

[View source]
def selected_action : CommandAction | Nil #

[View source]
def selected_item : CommandAction | Nil #

Alias


[View source]
def visible=(visible : Bool) #

[View source]
def visible? : Bool #

[View source]