summaryrefslogtreecommitdiffstats
path: root/Mac/Demo
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-11-30 00:01:29 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-11-30 00:01:29 (GMT)
commit362c7cd07bd32f94e80e5ca954834cfbc1709953 (patch)
tree8f929854033e856a2bf29d9167da8c98f754a416 /Mac/Demo
parent202355a333b98213449b30dcbfa620be86c96085 (diff)
downloadcpython-362c7cd07bd32f94e80e5ca954834cfbc1709953.zip
cpython-362c7cd07bd32f94e80e5ca954834cfbc1709953.tar.gz
cpython-362c7cd07bd32f94e80e5ca954834cfbc1709953.tar.bz2
Lots of minor tweaks for the pep252 checkins, mainly because Qd
attributes are no longer supported.
Diffstat (limited to 'Mac/Demo')
-rw-r--r--Mac/Demo/PICTbrowse/ICONbrowse.py2
-rw-r--r--Mac/Demo/PICTbrowse/PICTbrowse2.py2
-rw-r--r--Mac/Demo/PICTbrowse/cicnbrowse.py2
-rw-r--r--Mac/Demo/imgbrowse/imgbrowse.py10
-rw-r--r--Mac/Demo/mlte/mlted.py2
-rw-r--r--Mac/Demo/quicktime/MovieInWindow.py2
-rw-r--r--Mac/Demo/quicktime/VerySimplePlayer.py2
-rw-r--r--Mac/Demo/textedit/ped.py8
-rw-r--r--Mac/Demo/waste/htmled.py4
-rw-r--r--Mac/Demo/waste/swed.py4
-rw-r--r--Mac/Demo/waste/wed.py4
11 files changed, 21 insertions, 21 deletions
diff --git a/Mac/Demo/PICTbrowse/ICONbrowse.py b/Mac/Demo/PICTbrowse/ICONbrowse.py
index 902b5c7..42ae96d 100644
--- a/Mac/Demo/PICTbrowse/ICONbrowse.py
+++ b/Mac/Demo/PICTbrowse/ICONbrowse.py
@@ -93,7 +93,7 @@ class ICONwindow(FrameWork.Window):
def fitrect(self):
"""Return self.pictrect scaled to fit in window"""
graf = self.wid.GetWindowPort()
- screenrect = graf.portRect
+ screenrect = graf.GetPortBounds()
picwidth = self.pictrect[2] - self.pictrect[0]
picheight = self.pictrect[3] - self.pictrect[1]
if picwidth > screenrect[2] - screenrect[0]:
diff --git a/Mac/Demo/PICTbrowse/PICTbrowse2.py b/Mac/Demo/PICTbrowse/PICTbrowse2.py
index 0e11681..da389c0 100644
--- a/Mac/Demo/PICTbrowse/PICTbrowse2.py
+++ b/Mac/Demo/PICTbrowse/PICTbrowse2.py
@@ -93,7 +93,7 @@ class PICTwindow(FrameWork.Window):
def fitrect(self):
"""Return self.pictrect scaled to fit in window"""
graf = self.dlg.GetWindowPort()
- screenrect = graf.portRect
+ screenrect = graf.GetPortBounds()
picwidth = self.pictrect[2] - self.pictrect[0]
picheight = self.pictrect[3] - self.pictrect[1]
if picwidth > screenrect[2] - screenrect[0]:
diff --git a/Mac/Demo/PICTbrowse/cicnbrowse.py b/Mac/Demo/PICTbrowse/cicnbrowse.py
index 561dcf9..b90143e 100644
--- a/Mac/Demo/PICTbrowse/cicnbrowse.py
+++ b/Mac/Demo/PICTbrowse/cicnbrowse.py
@@ -93,7 +93,7 @@ class CIconwindow(FrameWork.Window):
def fitrect(self):
"""Return self.pictrect scaled to fit in window"""
graf = self.wid.GetWindowPort()
- screenrect = graf.portRect
+ screenrect = graf.GetPortBounds()
picwidth = self.pictrect[2] - self.pictrect[0]
picheight = self.pictrect[3] - self.pictrect[1]
if picwidth > screenrect[2] - screenrect[0]:
diff --git a/Mac/Demo/imgbrowse/imgbrowse.py b/Mac/Demo/imgbrowse/imgbrowse.py
index c67f4e8..b54f82b 100644
--- a/Mac/Demo/imgbrowse/imgbrowse.py
+++ b/Mac/Demo/imgbrowse/imgbrowse.py
@@ -1,4 +1,4 @@
-"""imgbrowse - Display pictures using img"""
+GetPortBounds()"""imgbrowse - Display pictures using img"""
import FrameWork
import EasyDialogs
@@ -88,16 +88,16 @@ class imgwindow(FrameWork.Window):
currect = self.fitrect()
print 'PICT:', self.pictrect
print 'WIND:', currect
- print 'ARGS:', (self.pixmap, self.wid.GetWindowPort().portBits, self.pictrect,
+ print 'ARGS:', (self.pixmap, self.wid.GetWindowPort().GetPortBitMapForCopyBits(), self.pictrect,
currect, QuickDraw.srcCopy, None)
self.info()
- Qd.CopyBits(self.pixmap, self.wid.GetWindowPort().portBits, self.pictrect,
+ Qd.CopyBits(self.pixmap, self.wid.GetWindowPort().GetPortBitMapForCopyBits(), self.pictrect,
currect, QuickDraw.srcCopy, None)
def fitrect(self):
"""Return self.pictrect scaled to fit in window"""
graf = self.wid.GetWindowPort()
- screenrect = graf.portRect
+ screenrect = graf.GetPortBounds()
picwidth = self.pictrect[2] - self.pictrect[0]
picheight = self.pictrect[3] - self.pictrect[1]
if picwidth > screenrect[2] - screenrect[0]:
@@ -113,7 +113,7 @@ class imgwindow(FrameWork.Window):
def info(self):
graf = self.wid.GetWindowPort()
- bits = graf.portBits
+ bits = graf.GetPortBitMapForCopyBits()
mac_image.dumppixmap(bits.pixmap_data)
main()
diff --git a/Mac/Demo/mlte/mlted.py b/Mac/Demo/mlte/mlted.py
index 2ae77e7..3f77eee 100644
--- a/Mac/Demo/mlte/mlted.py
+++ b/Mac/Demo/mlte/mlted.py
@@ -362,7 +362,7 @@ class Mlted(Application):
if self.active:
self.active.do_idle(event)
else:
- Qd.SetCursor(Qd.qd.arrow)
+ Qd.SetCursor(Qd.GetQDGlobalsArrow())
def main():
Mlte.TXNInitTextension(0)
diff --git a/Mac/Demo/quicktime/MovieInWindow.py b/Mac/Demo/quicktime/MovieInWindow.py
index 9cd4e77..620c16c 100644
--- a/Mac/Demo/quicktime/MovieInWindow.py
+++ b/Mac/Demo/quicktime/MovieInWindow.py
@@ -31,7 +31,7 @@ def main():
Qd.SetPort(theWindow)
# XXXX Needed? SetGWorld((CGrafPtr)theWindow, nil)
- playMovieInWindow(theWindow, fss, theWindow.GetWindowPort().portRect)
+ playMovieInWindow(theWindow, fss, theWindow.GetWindowPort().GetPortBounds())
def playMovieInWindow(theWindow, theFile, movieBox):
"""Play a movie in a window"""
diff --git a/Mac/Demo/quicktime/VerySimplePlayer.py b/Mac/Demo/quicktime/VerySimplePlayer.py
index 4962ebb..aca977f 100644
--- a/Mac/Demo/quicktime/VerySimplePlayer.py
+++ b/Mac/Demo/quicktime/VerySimplePlayer.py
@@ -78,7 +78,7 @@ def main():
else:
Qd.SetPort(whichWindow)
whichWindow.BeginUpdate()
- Qd.EraseRect(whichWindow.GetWindowPort().portRect)
+ Qd.EraseRect(whichWindow.GetWindowPort().GetPortBounds())
whichWindow.EndUpdate()
def loadMovie(theFile):
diff --git a/Mac/Demo/textedit/ped.py b/Mac/Demo/textedit/ped.py
index 6a0f882..6666158 100644
--- a/Mac/Demo/textedit/ped.py
+++ b/Mac/Demo/textedit/ped.py
@@ -21,7 +21,7 @@ class TEWindow(ScrolledWindow):
r = windowbounds(400, 400)
w = Win.NewWindow(r, name, 1, 0, -1, 1, 0)
self.wid = w
- x0, y0, x1, y1 = self.wid.GetWindowPort().portRect
+ x0, y0, x1, y1 = self.wid.GetWindowPort().GetPortBounds()
x0 = x0 + 4
y0 = y0 + 4
x1 = x1 - 20
@@ -87,8 +87,8 @@ class TEWindow(ScrolledWindow):
self.ted.TEDeactivate()
def do_update(self, wid, event):
- Qd.EraseRect(wid.GetWindowPort().portRect)
- self.ted.TEUpdate(wid.GetWindowPort().portRect)
+ Qd.EraseRect(wid.GetWindowPort().GetPortBounds())
+ self.ted.TEUpdate(wid.GetWindowPort().GetPortBounds())
self.updatescrollbars()
def do_contentclick(self, local, modifiers, evt):
@@ -350,7 +350,7 @@ class Ped(Application):
if self.active:
self.active.do_idle()
else:
- Qd.SetCursor(Qd.qd.arrow)
+ Qd.SetCursor(Qd.GetQDGlobalsArrow())
def main():
App = Ped()
diff --git a/Mac/Demo/waste/htmled.py b/Mac/Demo/waste/htmled.py
index b590b1d..3abbafa 100644
--- a/Mac/Demo/waste/htmled.py
+++ b/Mac/Demo/waste/htmled.py
@@ -95,7 +95,7 @@ class WasteWindow(ScrolledWindow):
self.ted.WEIdle()
if self.ted.WEAdjustCursor(where, BIGREGION):
return
- Qd.SetCursor(Qd.qd.arrow)
+ Qd.SetCursor(Qd.GetQDGlobalsArrow())
def getscrollbarvalues(self):
dr = self.ted.WEGetDestRect()
@@ -780,7 +780,7 @@ class Wed(Application):
if self.active:
self.active.do_idle(event)
else:
- Qd.SetCursor(Qd.qd.arrow)
+ Qd.SetCursor(Qd.GetQDGlobalsArrow())
def newRuler(self, obj):
"""Insert a new ruler. Make it as wide as the window minus 2 pxls"""
diff --git a/Mac/Demo/waste/swed.py b/Mac/Demo/waste/swed.py
index 62b027e..083a04c 100644
--- a/Mac/Demo/waste/swed.py
+++ b/Mac/Demo/waste/swed.py
@@ -83,7 +83,7 @@ class WasteWindow(ScrolledWindow):
self.ted.WEIdle()
if self.ted.WEAdjustCursor(where, BIGREGION):
return
- Qd.SetCursor(Qd.qd.arrow)
+ Qd.SetCursor(Qd.GetQDGlobalsArrow())
def getscrollbarvalues(self):
dr = self.ted.WEGetDestRect()
@@ -609,7 +609,7 @@ class Wed(Application):
if self.active:
self.active.do_idle(event)
else:
- Qd.SetCursor(Qd.qd.arrow)
+ Qd.SetCursor(Qd.GetQDGlobalsArrow())
def getfontnames():
names = []
diff --git a/Mac/Demo/waste/wed.py b/Mac/Demo/waste/wed.py
index 14bee45..199201b 100644
--- a/Mac/Demo/waste/wed.py
+++ b/Mac/Demo/waste/wed.py
@@ -50,7 +50,7 @@ class WasteWindow(ScrolledWindow):
self.ted.WEIdle()
if self.ted.WEAdjustCursor(where, BIGREGION):
return
- Qd.SetCursor(Qd.qd.arrow)
+ Qd.SetCursor(Qd.GetQDGlobalsArrow())
def getscrollbarvalues(self):
dr = self.ted.WEGetDestRect()
@@ -417,7 +417,7 @@ class Wed(Application):
if self.active:
self.active.do_idle(event)
else:
- Qd.SetCursor(Qd.qd.arrow)
+ Qd.SetCursor(Qd.GetQDGlobalsArrow())
def main():
App = Wed()