def ApplyAttributes(self, attributes): CheckboxCore.ApplyAttributes(self, attributes) self.prefstype = attributes.get('prefstype', self.default_prefstype) if self.prefstype == 1: self.prefstype = ('char', 'ui') elif self.prefstype == 2: self.prefstype = 'prefs'
def ToggleState(self, *args): if not self or self.destroyed: return if self._checked: uicore.Message('DiodeDeselect') else: uicore.Message('DiodeClick') CheckboxCore.ToggleState(self, *args)
def __getattr__(self, k): if k == 'groupName' and self.__dict__.has_key('_groupName'): return self.__dict__['_groupName'] if k == 'checked' and self.__dict__.has_key('_checked'): return self.__dict__['_checked'] return CheckboxCore.__getattr__(self, k)
def OnMouseUp(self, *args): CheckboxCore.OnMouseUp(self, *args) self.underlay.OnMouseUp()
def OnMouseDown(self, *args): CheckboxCore.OnMouseDown(self, *args) self.underlay.OnMouseDown()