475 emit "declarations:hmi-classes" { |
475 emit "declarations:hmi-classes" { |
476 const "used_widget_types", """$parsed_widgets/widget[ |
476 const "used_widget_types", """$parsed_widgets/widget[ |
477 generate-id() = generate-id(key('TypesKey', @type)) and |
477 generate-id() = generate-id(key('TypesKey', @type)) and |
478 not(@type = $excluded_types)]"""; |
478 not(@type = $excluded_types)]"""; |
479 apply "$used_widget_types", mode="widget_class"; |
479 apply "$used_widget_types", mode="widget_class"; |
480 } |
480 |
481 |
481 } |
482 template "widget", mode="widget_class" |
482 |
483 || |
483 template "widget", mode="widget_class" { |
484 class «@type»Widget extends Widget{ |
484 || |
485 /* empty class, as «@type» widget didn't provide any */ |
485 class «@type»Widget extends Widget{ |
486 } |
486 /* empty class, as «@type» widget didn't provide any */ |
487 || |
487 } |
|
488 || |
|
489 warning > «@type» widget is used in SVG but widget type is not declared |
|
490 } |
488 |
491 |
489 const "included_ids","$parsed_widgets/widget[not(@type = $excluded_types) and not(@id = $discardable_elements/@id)]/@id"; |
492 const "included_ids","$parsed_widgets/widget[not(@type = $excluded_types) and not(@id = $discardable_elements/@id)]/@id"; |
490 const "hmi_widgets","$hmi_elements[@id = $included_ids]"; |
493 const "hmi_widgets","$hmi_elements[@id = $included_ids]"; |
491 const "result_widgets","$result_svg_ns//*[@id = $hmi_widgets/@id]"; |
494 const "result_widgets","$result_svg_ns//*[@id = $hmi_widgets/@id]"; |
492 |
495 |
493 emit "declarations:hmi-elements" { |
496 emit "declarations:hmi-elements" { |
494 | var hmi_widgets = { |
497 | var hmi_widgets = { |
495 apply "$hmi_widgets", mode="hmi_widgets"; |
498 apply "$hmi_widgets", mode="hmi_widgets"; |
496 | } |
499 | } |
|
500 | |
497 } |
501 } |
498 |
502 |
499 function "defs_by_labels" { |
503 function "defs_by_labels" { |
500 param "labels","''"; |
504 param "labels","''"; |
501 param "mandatory","'yes'"; |
505 param "mandatory","'yes'"; |