# HG changeset patch # User Edouard Tisserant # Date 1712321940 -7200 # Node ID 1cb8f90bf4fdc7adc085c5940b31956becd2ca36 # Parent 1a0bed0b4f1cffeb7744423b03b1f8258135f5d6# Parent 5c662d2e3f72ee8943ac159d0a18bbc2f94c43b1 Merge commit '80e123b34e488ffea851dc2168b366ba6124c09b' into python3 diff -r 1a0bed0b4f1c -r 1cb8f90bf4fd svghmi/analyse_widget.xslt --- a/svghmi/analyse_widget.xslt Fri Apr 05 14:55:58 2024 +0200 +++ b/svghmi/analyse_widget.xslt Fri Apr 05 14:59:00 2024 +0200 @@ -875,10 +875,6 @@ - "active"+"inactive" labeled elements can be provided to show feedback when pressed - - - Exemples: diff -r 1a0bed0b4f1c -r 1cb8f90bf4fd svghmi/gen_index_xhtml.xslt --- a/svghmi/gen_index_xhtml.xslt Fri Apr 05 14:55:58 2024 +0200 +++ b/svghmi/gen_index_xhtml.xslt Fri Apr 05 14:59:00 2024 +0200 @@ -2908,7 +2908,7 @@ - + const @@ -3306,6 +3306,34 @@ , + + class + FlatButtonWidget + extends Widget{ + + frequency = 5; + + + + + + } + + + + + + + + + /disabled + + + + + + + class PushButtonWidget @@ -7250,10 +7278,6 @@ - "active"+"inactive" labeled elements can be provided to show feedback when pressed - - - Exemples: diff -r 1a0bed0b4f1c -r 1cb8f90bf4fd svghmi/widget_assign.ysl2 --- a/svghmi/widget_assign.ysl2 Fri Apr 05 14:55:58 2024 +0200 +++ b/svghmi/widget_assign.ysl2 Fri Apr 05 14:59:00 2024 +0200 @@ -71,7 +71,7 @@ const "name","substring-before(@value,'=')"; const "value","substring-after(@value,'=')"; const "index" foreach "$paths" if "@assign = $name" value "position()-1"; - const "isVarName", "regexp:test($value,'^[a-zA-Z_][a-zA-Z0-9_]+$')"; + const "isVarName", "regexp:test($value,'^[a-zA-Z_][a-zA-Z0-9_]*$')"; choose { when "$isVarName"{ | const «$value» = this.assignments["«$value»"]; diff -r 1a0bed0b4f1c -r 1cb8f90bf4fd svghmi/widget_button.ysl2 --- a/svghmi/widget_button.ysl2 Fri Apr 05 14:55:58 2024 +0200 +++ b/svghmi/widget_button.ysl2 Fri Apr 05 14:59:00 2024 +0200 @@ -199,6 +199,16 @@ activable(); } +// FlatButton is same as Button, but it has no active/inactive elements +// and doesn't reflect current state +widget_class("FlatButton"){ + | frequency = 5; + const "fsm","exsl:node-set($_button_fsm)"; + call "generated_button_class" with "fsm", "$fsm"; +} + +widget_defs("FlatButton"); + widget_class("PushButton"){ | frequency = 20; const "fsm","exsl:node-set($_push_button_fsm)"; diff -r 1a0bed0b4f1c -r 1cb8f90bf4fd svghmi/widget_page.ysl2 --- a/svghmi/widget_page.ysl2 Fri Apr 05 14:55:58 2024 +0200 +++ b/svghmi/widget_page.ysl2 Fri Apr 05 14:59:00 2024 +0200 @@ -11,8 +11,6 @@ - name=value: setting variable with literal value. - name=other_name: copy variable content into another - "active"+"inactive" labeled elements can be provided to show feedback when pressed - Exemples: HMI:Page:notify=1@notify=/PLCVAR