svghmi/widget_list.ysl2
author Edouard Tisserant <edouard.tisserant@gmail.com>
Wed, 05 Aug 2020 18:49:29 +0200
branchsvghmi
changeset 3005 ff9ae4f4e3be
parent 2997 2f298089e32e
child 3028 72ee99635db7
permissions -rw-r--r--
SVGHMI: widgets are not anymore binary relative or absolute, but have a "relativeness".

Because of allowing multiple variables per widget, we must distinguish if individual variables is relative to page, not the whole widget.
// widget_list.ysl2

template "widget[@type='List']", mode="widget_defs" {
    param "hmi_element";
    |     items: {
    foreach "$hmi_element/*[@inkscape:label]" {
    |         «func:escape_quotes(@inkscape:label)»: "«@id»",
    }
    |     },
}