svghmi/widget_list.ysl2
author Edouard Tisserant
Mon, 15 Feb 2021 15:46:47 +0100
branchsvghmi
changeset 3143 8388e6d4aa61
parent 3031 440d74319a74
child 3175 b2ba6eeb61ec
permissions -rw-r--r--
SVGHMI: more straightforward implementation of dragging position computation in Scrollbar + some little fix about boundaries.
// widget_list.ysl2

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

template "widget[@type='TextStyleList']", mode="widget_defs" {
    param "hmi_element";
    |     styles: {
    foreach "$hmi_element/*[@inkscape:label]" {
        const "style", "func:refered_elements(.)[self::svg:text]/@style";
    |         «@inkscape:label»: "«$style»",
    }
    |     },
}