svghmi/widget_jump.ysl2
branchsvghmi
changeset 3241 fe945f1f48b7
parent 3232 7bdb766c2a4d
child 3242 f037e901a17c
equal deleted inserted replaced
3238:8a9d4c794cba 3241:fe945f1f48b7
     1 // widget_jump.ysl2
     1 // widget_jump.ysl2
       
     2 
       
     3 widget_desc("Jump") {
       
     4     longdesc
       
     5     ||
       
     6     Jump widget brings focus to a different page. Mandatory single argument
       
     7     gives name of the page.
       
     8 
       
     9     Optional single path is used as new reference when jumping to a relative
       
    10     page, it must point to a HMI_NODE.
       
    11 
       
    12     "active"+"inactive" labeled elements can be provided and reflect current
       
    13     page being shown.
       
    14 
       
    15     "disabled" labeled element, if provided, is shown instead of "active" or
       
    16     "inactive" widget when pointed HMI_NODE is null.
       
    17     ||
       
    18 
       
    19     shortdesc > Jump to given page
       
    20 
       
    21     arg name="page" accepts="string" > name of page to jump to
       
    22 
       
    23     path name="reference" count="optional" accepts="HMI_NODE" > reference for relative jump
       
    24 }
     2 
    25 
     3 widget_class("Jump") {
    26 widget_class("Jump") {
     4 ||
    27 ||
     5         activable = false;
    28         activable = false;
     6         active = false;
    29         active = false;
    58         }
    81         }
    59 ||
    82 ||
    60 }
    83 }
    61 
    84 
    62 widget_defs("Jump") {
    85 widget_defs("Jump") {
    63     param "hmi_element";
    86     // TODO: ensure both active and inactive are provided
    64     const "activity" optional_labels("active inactive");
    87     const "activity" optional_labels("active inactive");
    65     const "have_activity","string-length($activity)>0";
    88     const "have_activity","string-length($activity)>0";
    66     value "$activity";
    89     value "$activity";
    67 
    90 
    68     const "disability" optional_labels("disabled");
    91     const "disability" optional_labels("disabled");