comparison engine/extensions/pychan/widgets/widget.py @ 253:6ab09eb765a1

* Added patch by MadMonk that exposes the guichan focus functions to pychan * Thanks for contributing
author nihathrael@33b003aa-7bff-0310-803a-e67f0ece8222
date Fri, 08 May 2009 08:45:27 +0000
parents 1cc51d145af9
children 51cc05d862f2
comparison
equal deleted inserted replaced
252:81d623c97e57 253:6ab09eb765a1
57 57
58 ATTRIBUTES = [ Attr('name'), PointAttr('position'), 58 ATTRIBUTES = [ Attr('name'), PointAttr('position'),
59 PointAttr('min_size'), PointAttr('size'), PointAttr('max_size'), 59 PointAttr('min_size'), PointAttr('size'), PointAttr('max_size'),
60 ColorAttr('base_color'),ColorAttr('background_color'),ColorAttr('foreground_color'),ColorAttr('selection_color'), 60 ColorAttr('base_color'),ColorAttr('background_color'),ColorAttr('foreground_color'),ColorAttr('selection_color'),
61 Attr('style'), Attr('font'),IntAttr('border_size'),Attr('position_technique'), 61 Attr('style'), Attr('font'),IntAttr('border_size'),Attr('position_technique'),
62 UnicodeAttr('helptext') 62 UnicodeAttr('helptext'), BoolAttr('is_focusable')
63 ] 63 ]
64 64
65 DEFAULT_NAME = '__unnamed__' 65 DEFAULT_NAME = '__unnamed__'
66 66
67 HIDE_SHOW_ERROR = """\ 67 HIDE_SHOW_ERROR = """\
639 639
640 def _setName(self,name): self._name = name 640 def _setName(self,name): self._name = name
641 def _getName(self): return self._name 641 def _getName(self): return self._name
642 name = property(_getName,_setName) 642 name = property(_getName,_setName)
643 643
644 def _setFocusable(self, b): self.real_widget.setFocusable(b)
645 def _isFocusable(self):
646 return self.real_widget.isFocusable()
647
644 x = property(_getX,_setX) 648 x = property(_getX,_setX)
645 y = property(_getY,_setY) 649 y = property(_getY,_setY)
646 width = property(_getWidth,_setWidth) 650 width = property(_getWidth,_setWidth)
647 height = property(_getHeight,_setHeight) 651 height = property(_getHeight,_setHeight)
648 size = property(_getSize,_setSize) 652 size = property(_getSize,_setSize)
649 position = property(_getPosition,_setPosition) 653 position = property(_getPosition,_setPosition)
650 font = property(_getFont,_setFont) 654 font = property(_getFont,_setFont)
651 border_size = property(_getBorderSize,_setBorderSize) 655 border_size = property(_getBorderSize,_setBorderSize)
656 is_focusable = property(_isFocusable,_setFocusable)
652 657
653 def setEnterCallback(self, cb): 658 def setEnterCallback(self, cb):
654 """ 659 """
655 *DEPRECATED* 660 *DEPRECATED*
656 661