[Python-checkins] CVS: python/dist/src/Mac/Tools/IDE Wcontrols.py,1.7,1.8
Just van Rossum
jvr@users.sourceforge.net
Fri, 02 Nov 2001 11:17:18 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE Wlists.py,1.5,1.6 Wmenus.py,1.5,1.6 Wwindows.py,1.12,1.13 Wbase.py,1.6,1.7
- Next message: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE PyBrowser.py,1.10,1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE
In directory usw-pr-cvs1:/tmp/cvs-serv1343
Modified Files:
Wcontrols.py
Log Message:
- rearranged some imports
- removed default button drawing code: this doesn't work well
under OSX. Needs to be replaced by SetWindowDefaultButton()
calls, once we have those.
Index: Wcontrols.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/Wcontrols.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Wcontrols.py 2001/08/25 12:13:59 1.7
--- Wcontrols.py 2001/11/02 19:17:16 1.8
***************
*** 1,8 ****
! from Carbon import Ctl
! from Carbon import Controls
! from Carbon import Win
import Wbase
! from Carbon import Qd
! from Carbon import Evt
class ControlWidget(Wbase.ClickableWidget):
--- 1,6 ----
! from Carbon import Ctl, Controls
! from Carbon import Evt, Qd, Win
import Wbase
!
class ControlWidget(Wbase.ClickableWidget):
***************
*** 118,124 ****
self._control.HiliteControl((not onoff) and 255)
self._enabled = onoff
- if self._isdefault and self._visible:
- self.SetPort()
- self.drawfatframe(onoff)
def activate(self, onoff):
--- 116,119 ----
***************
*** 126,160 ****
if self._enabled:
self._control.HiliteControl((not onoff) and 255)
- if self._isdefault and self._visible:
- self.SetPort()
- self.drawfatframe(onoff)
def show(self, onoff):
ControlWidget.show(self, onoff)
- if self._isdefault:
- self.drawfatframe(onoff and self._enabled)
def draw(self, visRgn = None):
if self._visible:
self._control.Draw1Control()
- if self._isdefault and self._activated:
- self.drawfatframe(self._enabled)
-
- def drawfatframe(self, onoff):
- state = Qd.GetPenState()
- if onoff:
- Qd.PenPat(Qd.qd.black)
- else:
- Qd.PenPat(Qd.qd.white)
- fatrect = Qd.InsetRect(self._bounds, -4, -4)
- Qd.PenSize(3, 3)
- Qd.FrameRoundRect(fatrect, 16, 16)
- Qd.SetPenState(state)
def _setdefault(self, onoff):
self._isdefault = onoff
- if self._control and self._enabled:
- self.SetPort()
- self.drawfatframe(onoff)
def adjust(self, oldbounds):
--- 121,134 ----
- Previous message: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE Wlists.py,1.5,1.6 Wmenus.py,1.5,1.6 Wwindows.py,1.12,1.13 Wbase.py,1.6,1.7
- Next message: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE PyBrowser.py,1.10,1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]