diff src/tools/common/template_xmlui.py @ 2397:7fff98d64ab5

core (XMLUI), template(XMLUI): added flags to ListWidget: following flags have been added: - noselect: list selection is not allowed (options are the important data) - extensible: user can add elements to the list - reducible: user can remove elements from the list - inline: presentation hint: the list should be displayed horizontally
author Goffi <goffi@goffi.org>
date Fri, 27 Oct 2017 18:03:35 +0200
parents 42a54cbc1872
children 8253ea069781
line wrap: on
line diff
--- a/src/tools/common/template_xmlui.py	Fri Oct 27 17:58:05 2017 +0200
+++ b/src/tools/common/template_xmlui.py	Fri Oct 27 18:03:35 2017 +0200
@@ -81,6 +81,14 @@
                 ret.append(label)
         return ret
 
+    @property
+    def inline(self):
+        return u'inline' in self.style
+
+    @property
+    def no_select(self):
+        return u'noselect' in self.style
+
 
 class EmptyWidget(xmlui.EmptyWidget, Widget):