-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.frog
More file actions
98 lines (94 loc) · 2.2 KB
/
main.frog
File metadata and controls
98 lines (94 loc) · 2.2 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
{
"spec_version": "0.1",
"metadata": {
"name": "UI Property Write",
"summary": "Minimal object-style widget interaction example using widget_reference and frog.ui.property_write.",
"description": "Receives a public string input and writes it to the label.text property of a front-panel widget.",
"author": "Graiphic",
"program_version": "0.1.0",
"tags": ["example", "ui", "widget_reference", "property_write", "minimal"],
"is_example": true,
"license": "Apache-2.0"
},
"interface": {
"inputs": [
{
"id": "status",
"type": "string"
}
],
"outputs": []
},
"diagram": {
"nodes": [
{
"id": "status_text",
"kind": "interface_input",
"interface_port": "status"
},
{
"id": "ctrl_gain_ref",
"kind": "widget_reference",
"widget": "ctrl_gain"
},
{
"id": "write_label_text",
"kind": "primitive",
"type": "frog.ui.property_write",
"widget_member": {
"part": "label",
"member": "text"
}
}
],
"edges": [
{
"id": "e1",
"from": { "node": "status_text", "port": "value" },
"to": { "node": "write_label_text", "port": "value" }
},
{
"id": "e2",
"from": { "node": "ctrl_gain_ref", "port": "ref" },
"to": { "node": "write_label_text", "port": "ref" }
}
]
},
"front_panel": {
"canvas": {
"width": 420,
"height": 160
},
"widgets": [
{
"id": "ctrl_gain",
"role": "control",
"widget": "frog.ui.standard.numeric_control",
"value_type": "f64",
"layout": {
"x": 20,
"y": 40,
"width": 140,
"height": 28
},
"props": {
"visible": true,
"enabled": true,
"minimum": 0.0,
"maximum": 10.0,
"step": 0.1,
"default_value": 1.0
},
"parts": {
"label": {
"class": "frog.ui.standard.label_part",
"props": {
"text": "Initial label",
"visible": true
}
}
}
}
]
}
}