equal
deleted
inserted
replaced
1 // widget_list.ysl2 |
1 // widget_list.ysl2 |
|
2 |
2 widget_desc("List") { |
3 widget_desc("List") { |
3 // TODO |
4 longdesc |
|
5 || |
|
6 List widget is a svg:group, list items are labeled elements |
|
7 in that group. |
|
8 |
|
9 To use a List, clone (svg:use) one of the items inside the widget that |
|
10 expects a List. |
|
11 |
|
12 Positions of items are relative to each other, and they must all be in the |
|
13 same place. In order to make editing easier it is therefore recommanded to |
|
14 make stacked clones of svg elements spread nearby the list. |
|
15 || |
|
16 |
|
17 shortdesc > A named list of named graphical elements |
|
18 |
|
19 arg name="listname" |
4 } |
20 } |
5 |
21 |
6 widget_defs("List") { |
22 widget_defs("List") { |
7 | items: { |
23 | items: { |
8 foreach "$hmi_element/*[@inkscape:label]" { |
24 foreach "$hmi_element/*[@inkscape:label]" { |
9 | «@inkscape:label»: "«@id»", |
25 | «@inkscape:label»: "«@id»", |
10 } |
26 } |
11 | }, |
27 | }, |
12 } |
28 } |
13 |
29 |
14 widget_defs("TextStyleList") { |
|
15 // TODO |
|
16 } |
|
17 |
|
18 widget_defs("TextStyleList") { |
|
19 | styles: { |
|
20 foreach "$hmi_element/*[@inkscape:label]" { |
|
21 const "style", "func:refered_elements(.)[self::svg:text]/@style"; |
|
22 | «@inkscape:label»: "«$style»", |
|
23 } |
|
24 | }, |
|
25 } |
|