svghmi/widget_meter.ysl2
branchsvghmi
changeset 3241 fe945f1f48b7
parent 3232 7bdb766c2a4d
child 3275 1fd8bef23f67
equal deleted inserted replaced
3238:8a9d4c794cba 3241:fe945f1f48b7
     1 // widget_meter.ysl2
     1 // widget_meter.ysl2
       
     2 
       
     3 widget_desc("Meter") {
       
     4     longdesc
       
     5     ||
       
     6     Meter widget moves the end of "needle" labeled path along "range" labeled
       
     7     path, according to value of the single accepted variable.
       
     8 
       
     9     Needle is reduced to a single segment. If "min" a "max" labeled texts
       
    10     are provided, or if first and second argument are given, then they are used
       
    11     as respective minimum and maximum value. Otherwise, value is expected to be
       
    12     in between 0 and 100.
       
    13 
       
    14     If "value" labeled text is found, then its content is replaced by value.
       
    15     ||
       
    16 
       
    17     shortdesc > Moves "needle" along "range"
       
    18 
       
    19     arg name="min" count="optional" accepts="int,real" > minimum value
       
    20 
       
    21     arg name="max" count="optional" accepts="int,real" > maximum value
       
    22 
       
    23     // TODO: add printf-like format
       
    24 
       
    25     path name="value" accepts="HMI_INT,HMI_REAL" > Value to display
       
    26     
       
    27 }
     2 
    28 
     3 widget_class("Metter"){
    29 widget_class("Metter"){
     4     ||
    30     ||
     5         frequency = 10;
    31         frequency = 10;
     6         origin = undefined;
    32         origin = undefined;
    30         }
    56         }
    31     ||
    57     ||
    32 }
    58 }
    33 
    59 
    34 widget_defs("Meter") {
    60 widget_defs("Meter") {
    35     param "hmi_element";
       
    36     labels("needle range");
    61     labels("needle range");
    37     optional_labels("value min max");
    62     optional_labels("value min max");
    38 }
    63 }
    39 
    64 
    40 
    65