class UI::AppShortcut

Overview

A single shortcut declaration.

This is intentionally a metadata object, not a rendered view. It packages the user-facing title, phrases, and parameters that a host app can later export into AppIntents or a similar integration layer.

Defined in:

ui/app_shortcuts.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(title : String, identifier : String | Nil = nil, subtitle : String | Nil = nil, summary : String | Nil = nil, icon : String | Nil = nil, phrases : Array(String) | Nil = nil, parameters : Array(AppShortcutParameter) | Nil = nil, is_enabled : Bool = true, is_discoverable : Bool = true) #

[View source]

Instance Method Detail

def add_parameter(name : String, prompt : String | Nil = nil, type : String | Nil = nil, default_value : String | Nil = nil, is_required : Bool = true) : AppShortcutParameter #

[View source]
def add_phrase(phrase : String) : String #

[View source]
def app_intent_description : String | Nil #

[View source]
def app_intent_display_name : String #

[View source]
def app_intent_struct_name : String #

[View source]
def app_shortcut_spec_name : String #

[View source]
def export_app_intents_scaffold(indent : String = " ") : String #

[View source]
def export_app_shortcut_spec(indent : String = " ") : String #

[View source]
def icon : String | Nil #

[View source]
def icon=(icon : String | Nil) #

[View source]
def identifier : String #

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

[View source]
def is_discoverable : Bool #

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

[View source]
def is_enabled : Bool #

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

[View source]
def parameters : Array(AppShortcutParameter) #

[View source]
def parameters=(parameters : Array(AppShortcutParameter)) #

[View source]
def phrases : Array(String) #

[View source]
def phrases=(phrases : Array(String)) #

[View source]
def subtitle : String | Nil #

[View source]
def subtitle=(subtitle : String | Nil) #

[View source]
def summary : String | Nil #

[View source]
def summary=(summary : String | Nil) #

[View source]
def title : String #

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

[View source]
def to_payload(json : JSON::Builder) : Nil #

[View source]