2021-12-17 23:26:00 +00:00
|
|
|
version 1 .
|
|
|
|
|
|
|
|
; Data types
|
|
|
|
|
|
|
|
WidgetTree =
|
2021-12-22 01:07:20 +00:00
|
|
|
/ <node @type NodeType @attributes WidgetAttributes @children [WidgetTree ...]>
|
2021-12-17 23:26:00 +00:00
|
|
|
/ <leaf @type LeafType @attributes WidgetAttributes>
|
|
|
|
.
|
|
|
|
|
2021-12-22 01:07:20 +00:00
|
|
|
NodeType = =column / =row .
|
2021-12-17 23:26:00 +00:00
|
|
|
WidgetAttributes = { symbol: any ...:... } .
|
|
|
|
LeafType =
|
2021-12-23 09:37:10 +00:00
|
|
|
/ =blank
|
|
|
|
/ =text
|
|
|
|
/ =slider
|
2021-12-17 23:26:00 +00:00
|
|
|
.
|
|
|
|
|
|
|
|
WidgetSelector =
|
|
|
|
/ @attributeEquals <= @key symbol @value any>
|
|
|
|
/ <and @selectors [WidgetSelector ...]>
|
|
|
|
.
|
|
|
|
|
|
|
|
Fill = @fixed double / <fill @weight int @rank int> .
|
|
|
|
Sizing = <sizing @ideal double @stretch Fill @shrink Fill> .
|
|
|
|
BoxSize = <box-size @horizontal Sizing @vertical Sizing> .
|
|
|
|
|
|
|
|
; Commonly set under key `id` in WidgetAttributes.
|
|
|
|
WidgetId = any .
|
|
|
|
|
|
|
|
Color = <rgba @red double @green double @blue double @alpha double> .
|
|
|
|
|
|
|
|
WidgetClientProtocol = WidgetInstance .
|
|
|
|
|
|
|
|
; Assertion
|
|
|
|
ShowWidget = <show
|
|
|
|
@positions WidgetSelector
|
|
|
|
@widget WidgetTree
|
|
|
|
@order Ordering
|
|
|
|
@client #!WidgetClientProtocol > .
|
|
|
|
Ordering = @double double / @string string .
|
|
|
|
|
|
|
|
; Assertion
|
|
|
|
WidgetInstance = <widget-instance @server #!any> .
|
|
|
|
|
|
|
|
; Assertion
|
|
|
|
Touch = <touch @widget WidgetId @touchId any> .
|
|
|
|
|
|
|
|
; Message
|
|
|
|
Click = <click @widget WidgetId> .
|
|
|
|
|
|
|
|
; Assertion
|
|
|
|
State = <state @widget WidgetId @key any @value any> .
|