class
UI::Widget
- UI::Widget
- Reference
- Object
Overview
A single widget declaration.
The model is extension-oriented rather than visual. It captures the widget's identity, a short summary, and the surfaces where the widget is expected to appear.
Defined in:
ui/widgets.crConstructors
Instance Method Summary
- #add_placement(surface : String, families : Array(String) | Nil = nil, timeline_intent : String = "snapshot", refresh_policy : String | Nil = nil, notes : String | Nil = nil, &block : WidgetPlacement -> Nil) : WidgetPlacement
- #add_placement(surface : String, families : Array(String) | Nil = nil, timeline_intent : String = "snapshot", refresh_policy : String | Nil = nil, notes : String | Nil = nil) : WidgetPlacement
- #add_placement(placement : WidgetPlacement) : WidgetPlacement
- #export_widgetkit_scaffold(indent : String = " ") : String
- #identifier : String
- #identifier=(identifier : String)
- #is_enabled : Bool
- #is_enabled=(is_enabled : Bool)
- #placements : Array(WidgetPlacement)
- #placements=(placements : Array(WidgetPlacement))
- #summary : String | Nil
- #summary=(summary : String | Nil)
- #title : String
- #title=(title : String)
- #to_payload(json : JSON::Builder) : Nil
- #widgetkit_entry_name : String
- #widgetkit_provider_name : String
- #widgetkit_struct_name : String
- #widgetkit_supported_families : Array(String)
- #widgetkit_view_name : String
Constructor Detail
def self.new(title : String, identifier : String | Nil = nil, summary : String | Nil = nil, placements : Array(WidgetPlacement) | Nil = nil, is_enabled : Bool = true)
#
Instance Method Detail
def add_placement(surface : String, families : Array(String) | Nil = nil, timeline_intent : String = "snapshot", refresh_policy : String | Nil = nil, notes : String | Nil = nil, &block : WidgetPlacement -> Nil) : WidgetPlacement
#
def add_placement(surface : String, families : Array(String) | Nil = nil, timeline_intent : String = "snapshot", refresh_policy : String | Nil = nil, notes : String | Nil = nil) : WidgetPlacement
#