svghmi/widget_list.ysl2
author Edouard Tisserant <edouard.tisserant@gmail.com>
Sun, 02 May 2021 23:15:23 +0200
branchsvghmi
changeset 3233 315f17e74ef5
parent 3232 7bdb766c2a4d
child 3241 fe945f1f48b7
permissions -rw-r--r--
SVGHMI: Added widget_desc to declare widget signature and description
// widget_list.ysl2

widget_defs("List") {
    param "hmi_element";
    |     items: {
    foreach "$hmi_element/*[@inkscape:label]" {
    |         «@inkscape:label»: "«@id»",
    }
    |     },
}

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