summaryrefslogtreecommitdiffstats
path: root/Mac/Tools
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-01-23 14:58:20 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-01-23 14:58:20 (GMT)
commit73023404369dca5216fc81e1fa21d19a03498a3f (patch)
tree3c80b0560c8cc0e01a049ab8515a2ed62a69ca41 /Mac/Tools
parent43bb2a4f44bb936cf4d950ee23ccd248276f4b07 (diff)
downloadcpython-73023404369dca5216fc81e1fa21d19a03498a3f.zip
cpython-73023404369dca5216fc81e1fa21d19a03498a3f.tar.gz
cpython-73023404369dca5216fc81e1fa21d19a03498a3f.tar.bz2
Sigh... First test before committing. InvalWindowRect and friends are window object methods. Fixed.
Diffstat (limited to 'Mac/Tools')
-rw-r--r--Mac/Tools/IDE/PyEdit.py2
-rw-r--r--Mac/Tools/IDE/Splash.py2
-rw-r--r--Mac/Tools/IDE/Wbase.py22
-rw-r--r--Mac/Tools/IDE/Wcontrols.py14
-rw-r--r--Mac/Tools/IDE/Wlists.py10
-rw-r--r--Mac/Tools/IDE/Wquicktime.py8
-rw-r--r--Mac/Tools/IDE/Wtext.py10
-rw-r--r--Mac/Tools/IDE/Wwindows.py6
8 files changed, 39 insertions, 35 deletions
diff --git a/Mac/Tools/IDE/PyEdit.py b/Mac/Tools/IDE/PyEdit.py
index c18e31f..3f1e9c8 100644
--- a/Mac/Tools/IDE/PyEdit.py
+++ b/Mac/Tools/IDE/PyEdit.py
@@ -957,7 +957,7 @@ class SearchEngine:
editor.ted.WEUseText(Res.Resource(Text))
editor.ted.WECalText()
editor.SetPort()
- Win.InvalWindowRect(editor._bounds)
+ editor.GetWindow().InvalWindowRect(editor._bounds)
#editor.ted.WEUpdate(self.w.wid.GetWindowPort().visRgn)
EasyDialogs.Message("Replaced %d occurrences" % counter)
diff --git a/Mac/Tools/IDE/Splash.py b/Mac/Tools/IDE/Splash.py
index 1544b67..b71e0ca 100644
--- a/Mac/Tools/IDE/Splash.py
+++ b/Mac/Tools/IDE/Splash.py
@@ -100,7 +100,7 @@ def UpdateSplash(drawdialog = 0, what = 0):
if drawdialog:
splash.DrawDialog()
drawtext(what)
- Win.ValidWindowRect(splash.GetWindowPort().portRect)
+ splash.GetDialogWindow().ValidWindowRect(splash.GetDialogPort().portRect)
def drawtext(what = 0):
Qd.SetPort(splash)
diff --git a/Mac/Tools/IDE/Wbase.py b/Mac/Tools/IDE/Wbase.py
index 0a987c6..3c5ab60 100644
--- a/Mac/Tools/IDE/Wbase.py
+++ b/Mac/Tools/IDE/Wbase.py
@@ -104,8 +104,8 @@ class Widget:
def adjust(self, oldbounds):
self.SetPort()
- Win.InvalWindowRect(oldbounds)
- Win.InvalWindowRect(self._bounds)
+ self.GetWindow().InvalWindowRect(oldbounds)
+ self.GetWindow().InvalWindowRect(self._bounds)
def _calcbounds(self):
# calculate absolute bounds relative to the window origin from our
@@ -218,7 +218,7 @@ class Widget:
self._setparentwindow(widget)
if self._parentwindow and self._parentwindow.wid:
widget.forall_frombottom("open")
- Win.InvalWindowRect(widget._bounds)
+ self.GetWindow().InvalWindowRect(widget._bounds)
def _setparentwindow(self, widget):
widget._parentwindow = self._parentwindow
@@ -235,7 +235,7 @@ class Widget:
widget.select(0)
self._parentwindow._currentwidget = None
self.SetPort()
- Win.InvalWindowRect(widget._bounds)
+ self.GetWindow().InvalWindowRect(widget._bounds)
widget.close()
del self._widgetsdict[key]
self._widgets.remove(widget)
@@ -274,7 +274,11 @@ class Widget:
def SetPort(self):
self._parentwindow.SetPort()
-
+
+
+ def GetWindow(self):
+ return self._parentwindow.GetWindow()
+
def __del__(self):
if DEBUG:
print "%s instance deleted" % self.__class__.__name__
@@ -340,11 +344,11 @@ class SelectableWidget(ClickableWidget):
def adjust(self, oldbounds):
self.SetPort()
if self._selected:
- Win.InvalWindowRect(Qd.InsetRect(oldbounds, -3, -3))
- Win.InvalWindowRect(Qd.InsetRect(self._bounds, -3, -3))
+ self.GetWindow().InvalWindowRect(Qd.InsetRect(oldbounds, -3, -3))
+ self.GetWindow().InvalWindowRect(Qd.InsetRect(self._bounds, -3, -3))
else:
- Win.InvalWindowRect(oldbounds)
- Win.InvalWindowRect(self._bounds)
+ self.GetWindow().InvalWindowRect(oldbounds)
+ self.GetWindow().InvalWindowRect(self._bounds)
class _Line(Widget):
diff --git a/Mac/Tools/IDE/Wcontrols.py b/Mac/Tools/IDE/Wcontrols.py
index 1a0fe88..7a88cca 100644
--- a/Mac/Tools/IDE/Wcontrols.py
+++ b/Mac/Tools/IDE/Wcontrols.py
@@ -32,7 +32,7 @@ class ControlWidget(Wbase.ClickableWidget):
self._procID,
0)
self.SetPort()
- #Win.ValidWindowRect(self._bounds)
+ #self.GetWindow().ValidWindowRect(self._bounds)
self.enable(self._enabled)
def adjust(self, oldbounds):
@@ -43,7 +43,7 @@ class ControlWidget(Wbase.ClickableWidget):
if self._visible:
Qd.EraseRect(self._bounds)
self._control.ShowControl()
- Win.ValidWindowRect(self._bounds)
+ self.GetWindow().ValidWindowRect(self._bounds)
def close(self):
self._control.HideControl()
@@ -162,8 +162,8 @@ class Button(ControlWidget):
old = Qd.InsetRect(oldbounds, -4, -4)
new = Qd.InsetRect(self._bounds, -4, -4)
Qd.EraseRect(old)
- Win.InvalWindowRect(old)
- Win.InvalWindowRect(new)
+ self.GetWindow().InvalWindowRect(old)
+ self.GetWindow().InvalWindowRect(new)
ControlWidget.adjust(self, oldbounds)
@@ -346,7 +346,7 @@ class Scrollbar(ControlWidget):
def adjust(self, oldbounds):
self.SetPort()
- Win.InvalWindowRect(oldbounds)
+ self.GetWindow().InvalWindowRect(oldbounds)
self._control.HideControl()
self._control.MoveControl(self._bounds[0], self._bounds[1])
self._control.SizeControl(self._bounds[2] - self._bounds[0], self._bounds[3] - self._bounds[1])
@@ -356,7 +356,7 @@ class Scrollbar(ControlWidget):
self._control.ShowControl()
else:
Qd.FrameRect(self._bounds)
- Win.ValidWindowRect(self._bounds)
+ self.GetWindow().ValidWindowRect(self._bounds)
def activate(self, onoff):
self._activated = onoff
@@ -366,7 +366,7 @@ class Scrollbar(ControlWidget):
else:
self._control.HideControl()
self.draw(None)
- Win.ValidWindowRect(self._bounds)
+ self.GetWindow().ValidWindowRect(self._bounds)
def set(self, value):
if self._control:
diff --git a/Mac/Tools/IDE/Wlists.py b/Mac/Tools/IDE/Wlists.py
index 08853f4..dd43a2d 100644
--- a/Mac/Tools/IDE/Wlists.py
+++ b/Mac/Tools/IDE/Wlists.py
@@ -57,11 +57,11 @@ class List(Wbase.SelectableWidget):
def adjust(self, oldbounds):
self.SetPort()
if self._selected:
- Win.InvalWindowRect(Qd.InsetRect(oldbounds, -3, -3))
- Win.InvalWindowRect(Qd.InsetRect(self._bounds, -3, -3))
+ self.GetWindow().InvalWindowRect(Qd.InsetRect(oldbounds, -3, -3))
+ self.GetWindow().InvalWindowRect(Qd.InsetRect(self._bounds, -3, -3))
else:
- Win.InvalWindowRect(oldbounds)
- Win.InvalWindowRect(self._bounds)
+ self.GetWindow().InvalWindowRect(oldbounds)
+ self.GetWindow().InvalWindowRect(self._bounds)
if oldbounds[:2] == self._bounds[:2]:
# set visRgn to empty, to prevent nasty drawing side effect of LSize()
Qd.RectRgn(self._parentwindow.wid.GetWindowPort().visRgn, (0, 0, 0, 0))
@@ -359,7 +359,7 @@ class List(Wbase.SelectableWidget):
self.SetPort()
Qd.EraseRect((l, cb, cr, b))
self._list.LUpdate(self._parentwindow.wid.GetWindowPort().visRgn)
- Win.ValidWindowRect(bounds)
+ self.GetWindow().ValidWindowRect(bounds)
else:
if self.drawingmode == 0 and self._list is not None:
self._list.LSetDrawingMode(0)
diff --git a/Mac/Tools/IDE/Wquicktime.py b/Mac/Tools/IDE/Wquicktime.py
index 224fd5f..79adc110 100644
--- a/Mac/Tools/IDE/Wquicktime.py
+++ b/Mac/Tools/IDE/Wquicktime.py
@@ -24,14 +24,14 @@ class Movie(W.Widget):
def adjust(self, oldbounds):
self.SetPort()
- Win.InvalWindowRect(oldbounds)
- Win.InvalWindowRect(self._bounds)
+ self.GetWindow().InvalWindowRect(oldbounds)
+ self.GetWindow().InvalWindowRect(self._bounds)
self.calcmoviebox()
def set(self, path_or_fss, start = 0):
self.SetPort()
if self.movie:
- #Win.InvalWindowRect(self.movie.GetMovieBox())
+ #self.GetWindow().InvalWindowRect(self.movie.GetMovieBox())
Qd.PaintRect(self.movie.GetMovieBox())
if type(path_or_fss) == type(''):
path = path_or_fss
@@ -106,7 +106,7 @@ class Movie(W.Widget):
elif self.running:
box = self.movie.GetMovieBox()
self.SetPort()
- Win.InvalWindowRect(box)
+ self.GetWindow().InvalWindowRect(box)
self.movie = None
self.running = 0
diff --git a/Mac/Tools/IDE/Wtext.py b/Mac/Tools/IDE/Wtext.py
index 759a9ea..8c1662d 100644
--- a/Mac/Tools/IDE/Wtext.py
+++ b/Mac/Tools/IDE/Wtext.py
@@ -213,11 +213,11 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget):
def adjust(self, oldbounds):
self.SetPort()
if self._selected and self._parentwindow._hasselframes:
- Win.InvalWindowRect(Qd.InsetRect(oldbounds, -3, -3))
- Win.InvalWindowRect(Qd.InsetRect(self._bounds, -3, -3))
+ self.GetWindow().InvalWindowRect(Qd.InsetRect(oldbounds, -3, -3))
+ self.GetWindow().InvalWindowRect(Qd.InsetRect(self._bounds, -3, -3))
else:
- Win.InvalWindowRect(oldbounds)
- Win.InvalWindowRect(self._bounds)
+ self.GetWindow().InvalWindowRect(oldbounds)
+ self.GetWindow().InvalWindowRect(self._bounds)
viewrect, destrect = self._calctextbounds()
self.ted.WESetViewRect(viewrect)
self.ted.WESetDestRect(destrect)
@@ -305,7 +305,7 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget):
Qd.RectRgn(rgn, viewrect)
Qd.EraseRect(viewrect)
self.draw(rgn)
- #Win.InvalWindowRect(self.ted.WEGetViewRect())
+ #self.GetWindow().InvalWindowRect(self.ted.WEGetViewRect())
self.updatescrollbars()
def get(self):
diff --git a/Mac/Tools/IDE/Wwindows.py b/Mac/Tools/IDE/Wwindows.py
index 1ab5056..2d449c7 100644
--- a/Mac/Tools/IDE/Wwindows.py
+++ b/Mac/Tools/IDE/Wwindows.py
@@ -157,7 +157,7 @@ class Window(FrameWork.Window, Wbase.SelectableWidget):
if y == None:
x, y = x
self.SetPort()
- Win.InvalWindowRect(self.getgrowrect())
+ self.GetWindow().InvalWindowRect(self.getgrowrect())
self.wid.SizeWindow(x, y, 1)
self._calcbounds()
@@ -247,7 +247,7 @@ class Window(FrameWork.Window, Wbase.SelectableWidget):
def drawwidgetbounds(self, onoff):
self._drawwidgetbounds = onoff
self.SetPort()
- Win.InvalWindowRect(self._bounds)
+ self.GetWindow().InvalWindowRect(self._bounds)
def _drawbounds(self):
pass
@@ -353,7 +353,7 @@ class Window(FrameWork.Window, Wbase.SelectableWidget):
self.draw()
def do_postresize(self, width, height, window):
- Win.InvalWindowRect(self.getgrowrect())
+ self.GetWindow().InvalWindowRect(self.getgrowrect())
self._calcbounds()
def do_inGoAway(self, partcode, window, event):