svghmi/widget_list.ysl2
branchsvghmi
changeset 3031 440d74319a74
parent 3028 72ee99635db7
child 3175 b2ba6eeb61ec
equal deleted inserted replaced
3030:2d13a4379e2f 3031:440d74319a74
     1 // widget_list.ysl2
     1 // widget_list.ysl2
     2 
     2 
     3 template "widget[@type='List' or @type='TextStyleList']", mode="widget_defs" {
     3 template "widget[@type='List']", mode="widget_defs" {
     4     param "hmi_element";
     4     param "hmi_element";
     5     |     items: {
     5     |     items: {
     6     foreach "$hmi_element/*[@inkscape:label]" {
     6     foreach "$hmi_element/*[@inkscape:label]" {
     7     |         «func:escape_quotes(@inkscape:label)»: "«@id»",
     7     |         «@inkscape:label»: "«@id»",
     8     }
     8     }
     9     |     },
     9     |     },
    10 }
    10 }
       
    11 
       
    12 template "widget[@type='TextStyleList']", mode="widget_defs" {
       
    13     param "hmi_element";
       
    14     |     styles: {
       
    15     foreach "$hmi_element/*[@inkscape:label]" {
       
    16         const "style", "func:refered_elements(.)[self::svg:text]/@style";
       
    17     |         «@inkscape:label»: "«$style»",
       
    18     }
       
    19     |     },
       
    20 }