svghmi/widget_textstylelist.ysl2
author Edouard Tisserant <edouard.tisserant@gmail.com>
Sat, 05 Mar 2022 11:14:00 +0100
branchwxPython4
changeset 3437 ce366d67a5b7
parent 3322 67069f4634b7
child 3556 5d73bed497de
permissions -rw-r--r--
Tests: Enhance robustness of stdout driven waiting state in Sikuli based tests.

Some tests were randomly passing, because from time to time waiting for idle was skiped. It was combination of multiple problems :
- buffering on stdout (now use readline + flush for each write to log)
- it is sometime required to wait for activity before waiting for timeout added "WaitForChangeAndIdle" to "stdoutIdleObserver"
3322
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     1
// widget_textstylelist.ysl2
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     2
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     3
widget_desc("TextStyleList") {
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     4
    longdesc
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     5
    ||
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     6
    TextStyleList widget is a svg:group, list items are labeled elements
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     7
    in that group.
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     8
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     9
    To use a TextStyleList, clone (svg:use) one of the items inside the widget 
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    10
    that expects a TextStyleList.
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    11
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    12
    In this list, only style matters. Text content is ignored.
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    13
    ||
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    14
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    15
    shortdesc > A named list of named texts
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    16
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    17
    arg name="listname"
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    18
}
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    19
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    20
widget_defs("TextStyleList") {
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    21
    |     styles: {
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    22
    foreach "$hmi_element/*[@inkscape:label]" {
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    23
        const "style", "func:refered_elements(.)[self::svg:text]/@style";
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    24
    |         «@inkscape:label»: "«$style»",
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    25
    }
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    26
    |     },
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    27
}
67069f4634b7 SVGHMI: add files missing in ee9e98c856a : Add TextList widget, add support for TextList in DropDown widget, move List, TextStyleList and TextList widget code in dedicated file with documentation.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    28