synit/protocols/schemas/ui.prs

48 lines
1.1 KiB
Plaintext
Raw Normal View History

2021-12-17 23:26:00 +00:00
version 1 .
2021-12-24 03:01:09 +00:00
; Assertion. Creates a space for Widget/Parent/Attribute assertions etc.
Window = <window @title string @space #!any> .
; Assertions, within the space created as part of a Window assertion.
Widget = <widget @id WidgetId @type WidgetType> .
Parent = <parent @id WidgetId @parentId WidgetId @order SortKey> .
Root = <root @id WidgetId @order SortKey> .
Attribute = <attribute @id WidgetId @key symbol @value any> .
; Assertion
WidgetInstance = <widget-instance @id WidgetId @instance #!any> .
; Assertion
Touch = <touch @widget WidgetId @touchId any> .
; Message
Click = <click @widget WidgetId> .
; Assertion
State = <state @widget WidgetId @key any @value any> .
2021-12-17 23:26:00 +00:00
; Data types
2021-12-24 03:01:09 +00:00
WidgetId = any .
SortKey = @double double / @string string .
WidgetType = NodeType / LeafType .
NodeType =
/ =column
/ =row
2021-12-17 23:26:00 +00:00
.
LeafType =
/ =blank
/ =text
/ =slider
2021-12-17 23:26:00 +00:00
.
2021-12-24 03:01:09 +00:00
Color = <rgba @red double @green double @blue double @alpha double> .
2021-12-17 23:26:00 +00:00
2021-12-24 03:01:09 +00:00
; Box-and-glue layout
2021-12-17 23:26:00 +00:00
Fill = @fixed double / <fill @weight int @rank int> .
Sizing = <sizing @ideal double @stretch Fill @shrink Fill> .
BoxSize = <box-size @horizontal Sizing @vertical Sizing> .