tools, frontends (xmlui): add setter methods for widgets + new widget InternalButton to process UI operations
This commit is contained in:
parent
608e2ba9fa
commit
6608eafb9f
1 changed files with 119 additions and 0 deletions
|
|
@ -42,6 +42,10 @@ class WixWidget(object):
|
|||
|
||||
|
||||
class ValueWidget(WixWidget):
|
||||
|
||||
def _xmluiSetValue(self, value):
|
||||
self.SetValue(value)
|
||||
|
||||
def _xmluiGetValue(self):
|
||||
return self.GetValue()
|
||||
|
||||
|
|
@ -106,6 +110,9 @@ class BoolWidget(EventWidget, ValueWidget, xmlui.BoolWidget, wx.CheckBox):
|
|||
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 @@ class ListWidget(EventWidget, WixWidget, xmlui.ListWidget, wx.ListBox):
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue