示例#1
0
 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'
示例#2
0
 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)
示例#3
0
 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)
示例#4
0
 def OnMouseUp(self, *args):
     CheckboxCore.OnMouseUp(self, *args)
     self.underlay.OnMouseUp()
示例#5
0
 def OnMouseDown(self, *args):
     CheckboxCore.OnMouseDown(self, *args)
     self.underlay.OnMouseDown()
示例#6
0
 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)