template "widget[@type='Input']", mode="widget_class"{
class InputWidget extends Widget{
this.change_hmi_value(0, opstr);
this.apply_hmi_value(0, new_val);
this.last_display = "max: "+max;
undershot(new_val, min) {
this.last_display = "min: "+min;
template "widget[@type='Input']", mode="widget_defs" {
const "value_elt" optional_labels("value");
const "have_value","string-length($value_elt)>0";
const "edit_elt" optional_labels("edit");
const "have_edit","string-length($edit_elt)>0";
| dispatch: function(value) {
| this.last_display = value;
| this.request_animate();
| this.value_elt.textContent = String(this.last_display);
| this.edit_elt.onclick = () => edit_value("«path/@value»", "«path/@type»", this, this.last_val);
foreach "$hmi_element/*[regexp:test(@inkscape:label,'^[=+\-].+')]" {
| id("«@id»").onclick = () => this.on_op_click("«func:escape_quotes(@inkscape:label)»");