class UI::Widgets

Overview

Extension-oriented metadata container for widgets.

The container is intentionally export-only. It gives build tooling a place to collect widget declarations and serialize them into a manifest for the eventual WidgetKit or system-extension integration layer.

Defined in:

ui/widgets.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(application_name : String, bundle_identifier : String | Nil = nil, widgets : Array(Widget) | Nil = nil) #

[View source]

Instance Method Detail

def add_widget(title : String, identifier : String | Nil = nil, summary : String | Nil = nil, placements : Array(WidgetPlacement) | Nil = nil, is_enabled : Bool = true, &block : Widget -> Nil) : Widget #

[View source]
def add_widget(title : String, identifier : String | Nil = nil, summary : String | Nil = nil, placements : Array(WidgetPlacement) | Nil = nil, is_enabled : Bool = true) : Widget #

[View source]
def add_widget(widget : Widget) : Widget #

[View source]
def application_name : String #

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

[View source]
def bundle_identifier : String | Nil #

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

[View source]
def clear : Nil #

[View source]
def export_widgetkit_scaffold : String #

[View source]
def find_widget(identifier : String) : Widget | Nil #

[View source]
def remove_widget(identifier : String) : Bool #

[View source]
def to_payload : String #

[View source]
def widgets : Array(Widget) #

[View source]
def widgets=(widgets : Array(Widget)) #

[View source]