diff frontends/src/wix/xmlui.py @ 969:5c7707c958d8

tools, frontends (xmlui): add setter methods for widgets + new widget InternalButton to process UI operations
author souliane <souliane@mailoo.org>
date Tue, 01 Apr 2014 21:30:21 +0200
parents 75f3b3b430ff
children b37b1d183ac3
line wrap: on
line diff
--- a/frontends/src/wix/xmlui.py	Tue Apr 01 21:21:13 2014 +0200
+++ b/frontends/src/wix/xmlui.py	Tue Apr 01 21:30:21 2014 +0200
@@ -42,6 +42,10 @@
 
 
 class ValueWidget(WixWidget):
+
+    def _xmluiSetValue(self, value):
+        self.SetValue(value)
+
     def _xmluiGetValue(self):
         return self.GetValue()
 
@@ -106,6 +110,9 @@
         self.SetValue(state)
         self._xmlui_proportion = 1
 
+    def _xmluiSetValue(self, value):
+        self.SetValue(value == 'true')
+
     def _xmluiGetValue(self):
         return "true" if self.GetValue() else "false"
 
@@ -153,6 +160,11 @@
             ret.append(self._xmlui_attr_map[label])
         return ret
 
+    def _xmluiAddValues(self, values, select=True):
+        wx.ListBox.AppendItems(values)
+        if select:
+            self._xmluiSelectValues(values)
+
 
 class WixContainer(object):
     _xmlui_proportion = 1