-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.frog
More file actions
191 lines (191 loc) · 5.77 KB
/
main.frog
File metadata and controls
191 lines (191 loc) · 5.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
{
"spec_version": "0.1",
"metadata": {
"name": "07_string_value_roundtrip",
"summary": "Hello-world string control-to-indicator value roundtrip with .frog-owned String widget instances and Default String .wfrog realization assets.",
"description": "Reads the string value hello world from one .frog front-panel string control, exposes that value through the public input surface, copies it to one public output, and publishes it to one string indicator. The .frog source owns the String widget instances, layout, binding, text value, and per-instance appearance. The .wfrog package owns the published Default String widget realization, host requirements, and SVG asset references consumed by the runtimes.",
"author": "Graiphic",
"program_version": "0.1.0",
"tags": [
"example",
"ui",
"widget_value",
"string",
"hello_world",
"roundtrip",
"wfrog",
"widget_realization_package"
],
"is_example": true,
"license": "Apache-2.0"
},
"interface": {
"inputs": [
{
"id": "input_text",
"type": "string",
"binding_origin": "widget.str_input.value"
}
],
"outputs": [
{
"id": "result_text",
"type": "string"
}
]
},
"diagram": {
"nodes": [
{
"id": "str_input_value",
"kind": "widget_value",
"widget": "str_input"
},
{
"id": "str_result_value",
"kind": "widget_value",
"widget": "str_result"
},
{
"id": "output_result_text",
"kind": "interface_output",
"interface_port": "result_text"
}
],
"edges": [
{
"id": "e1",
"from": {
"node": "str_input_value",
"port": "value"
},
"to": {
"node": "str_result_value",
"port": "value"
}
},
{
"id": "e2",
"from": {
"node": "str_input_value",
"port": "value"
},
"to": {
"node": "output_result_text",
"port": "value"
}
}
]
},
"front_panel": {
"canvas": {
"width": 560,
"height": 170,
"coordinate_space": "panel_pixels"
},
"package_refs": [
"./ui/string_panel.wfrog"
],
"widgets": [
{
"id": "str_input",
"role": "control",
"class_ref": "frog.widgets.string_control",
"instance_ref": "str_input",
"value_type": "string",
"layout": {
"x": 20,
"y": 30,
"width": 240,
"height": 110
},
"props": {
"value": "hello world",
"label.text": "Input",
"caption.text": "String input",
"caption.visible": true,
"caption.anchor.x": 15,
"caption.anchor.y": 50,
"caption.align.horizontal": "left",
"caption.style.text_color": "#111827",
"caption.style.font_family": "system-ui, Segoe UI, Arial, sans-serif",
"caption.style.font_size": "14px",
"caption.style.font_weight": "600",
"style.frame.fill_color": "transparent",
"style.frame.border_color": "transparent",
"style.frame.border_width": "0px",
"style.text_region.fill_color": "#ffffff",
"style.text_region.fill_color.hover": "#eef6ff",
"style.text_region.border_color": "#64748b",
"style.text_region.border_color.hover": "#2563eb",
"style.text_region.border_width": "2px",
"style.text_region.border_width.hover": "2px",
"style.text.color": "#111827",
"style.text.font_size": "16px",
"style.text.font_weight": "400",
"placeholder.text": "",
"placeholder.visible": false,
"interaction.enabled": true,
"interaction.read_only": false,
"realization.variant": "rectangular"
},
"visual": {
"asset_ref": "asset:string_rectangular_svg"
},
"binding": {
"mode": "widget_value",
"public_input_id": "input_text"
}
},
{
"id": "str_result",
"role": "indicator",
"class_ref": "frog.widgets.string_indicator",
"instance_ref": "str_result",
"value_type": "string",
"layout": {
"x": 300,
"y": 30,
"width": 240,
"height": 110
},
"props": {
"value": "",
"label.text": "Result",
"caption.text": "String result",
"caption.visible": true,
"caption.anchor.x": 15,
"caption.anchor.y": 50,
"caption.align.horizontal": "left",
"caption.style.text_color": "#111827",
"caption.style.font_family": "system-ui, Segoe UI, Arial, sans-serif",
"caption.style.font_size": "14px",
"caption.style.font_weight": "600",
"style.frame.fill_color": "transparent",
"style.frame.border_color": "transparent",
"style.frame.border_width": "0px",
"style.text_region.fill_color": "#f8fafc",
"style.text_region.border_color": "#64748b",
"style.text_region.border_width": "2px",
"style.text.color": "#111827",
"style.text.font_size": "16px",
"style.text.font_weight": "400",
"interaction.enabled": false,
"interaction.read_only": true,
"realization.variant": "rectangular"
},
"visual": {
"asset_ref": "asset:string_rectangular_svg"
},
"binding": {
"mode": "widget_value",
"public_output_id": "result_text"
}
}
],
"panel_id": "main_panel",
"title": "String Hello World Roundtrip",
"class_ref": "frog.widgets.panel",
"host_binding_ref": "reference_host_default"
}
}