svghmi/widget_list.ysl2
author Edouard Tisserant <edouard.tisserant@gmail.com>
Mon, 13 Sep 2021 22:23:14 +0200
changeset 3351 88dbdebd10fc
parent 3241 fe945f1f48b7
child 3320 9fe5b4a04acc
permissions -rw-r--r--
IDE: Add a "Tutorials and Examples" sub menu to "File" menu to directly open projects in /exemples directory. Move 'python' and 'first_steps' projecvts from /tests to /exemple
// widget_list.ysl2
widget_desc("List") {
    // TODO
}

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

widget_defs("TextStyleList") {
    // TODO
}

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