Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e55f9c8d
Commit
e55f9c8d
authored
Jan 23, 2001
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sigh... First test before committing. InvalWindowRect and friends are window object methods. Fixed.
parent
3999d8df
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
55 additions
and
48 deletions
+55
-48
Mac/Demo/waste/htmled.py
Mac/Demo/waste/htmled.py
+2
-2
Mac/Demo/waste/swed.py
Mac/Demo/waste/swed.py
+1
-1
Mac/Demo/waste/wed.py
Mac/Demo/waste/wed.py
+1
-1
Mac/Lib/FrameWork.py
Mac/Lib/FrameWork.py
+10
-7
Mac/Lib/test/tscrollwin.py
Mac/Lib/test/tscrollwin.py
+1
-1
Mac/Tools/IDE/PyEdit.py
Mac/Tools/IDE/PyEdit.py
+1
-1
Mac/Tools/IDE/Splash.py
Mac/Tools/IDE/Splash.py
+1
-1
Mac/Tools/IDE/Wbase.py
Mac/Tools/IDE/Wbase.py
+13
-9
Mac/Tools/IDE/Wcontrols.py
Mac/Tools/IDE/Wcontrols.py
+7
-7
Mac/Tools/IDE/Wlists.py
Mac/Tools/IDE/Wlists.py
+5
-5
Mac/Tools/IDE/Wquicktime.py
Mac/Tools/IDE/Wquicktime.py
+4
-4
Mac/Tools/IDE/Wtext.py
Mac/Tools/IDE/Wtext.py
+5
-5
Mac/Tools/IDE/Wwindows.py
Mac/Tools/IDE/Wwindows.py
+3
-3
Mac/scripts/MkDistr_ui.py
Mac/scripts/MkDistr_ui.py
+1
-1
No files found.
Mac/Demo/waste/htmled.py
View file @
e55f9c8d
...
...
@@ -194,7 +194,7 @@ class WasteWindow(ScrolledWindow):
l
,
t
,
r
,
b
=
self
.
ted
.
WEGetViewRect
()
vr
=
(
l
,
t
,
l
+
width
-
15
,
t
+
height
-
15
)
self
.
ted
.
WESetViewRect
(
vr
)
Win
.
InvalWindowRect
(
vr
)
self
.
wid
.
InvalWindowRect
(
vr
)
ScrolledWindow
.
do_postresize
(
self
,
width
,
height
,
window
)
def
do_contentclick
(
self
,
local
,
modifiers
,
evt
):
...
...
@@ -290,7 +290,7 @@ class WasteWindow(ScrolledWindow):
self
.
ted
.
WESetSelection
(
start
,
end
)
self
.
ted
.
WESelView
()
self
.
ted
.
WEFeatureFlag
(
WASTEconst
.
weFInhibitRecal
,
0
)
Win
.
InvalWindowRect
(
self
.
ted
.
WEGetViewRect
())
self
.
wid
.
InvalWindowRect
(
self
.
ted
.
WEGetViewRect
())
self
.
updatescrollbars
()
self
.
parent
.
updatemenubar
()
...
...
Mac/Demo/waste/swed.py
View file @
e55f9c8d
...
...
@@ -163,7 +163,7 @@ class WasteWindow(ScrolledWindow):
l
,
t
,
r
,
b
=
self
.
ted
.
WEGetViewRect
()
vr
=
(
l
,
t
,
l
+
width
-
15
,
t
+
height
-
15
)
self
.
ted
.
WESetViewRect
(
vr
)
Win
.
InvalWindowRect
(
vr
)
self
.
wid
.
InvalWindowRect
(
vr
)
ScrolledWindow
.
do_postresize
(
self
,
width
,
height
,
window
)
def
do_contentclick
(
self
,
local
,
modifiers
,
evt
):
...
...
Mac/Demo/waste/wed.py
View file @
e55f9c8d
...
...
@@ -136,7 +136,7 @@ class WasteWindow(ScrolledWindow):
l
,
t
,
r
,
b
=
self
.
ted
.
WEGetViewRect
()
vr
=
(
l
,
t
,
l
+
width
-
15
,
t
+
height
-
15
)
self
.
ted
.
WESetViewRect
(
vr
)
Win
.
InvalWindowRect
(
vr
)
self
.
wid
.
InvalWindowRect
(
vr
)
ScrolledWindow
.
do_postresize
(
self
,
width
,
height
,
window
)
def
do_contentclick
(
self
,
local
,
modifiers
,
evt
):
...
...
Mac/Lib/FrameWork.py
View file @
e55f9c8d
...
...
@@ -713,6 +713,9 @@ class Window:
def
SetPort
(
self
):
# Convinience method
SetPort
(
self
.
wid
)
def
GetWindow
(
self
):
return
self
.
wid
def
do_inDrag
(
self
,
partcode
,
window
,
event
):
where
=
event
[
3
]
...
...
@@ -753,13 +756,13 @@ class Window:
def
do_resize
(
self
,
width
,
height
,
window
):
l
,
t
,
r
,
b
=
self
.
wid
.
GetWindowPort
().
portRect
# jvr, forGrowIcon
self
.
SetPort
()
# jvr
InvalWindowRect
((
r
-
SCROLLBARWIDTH
+
1
,
b
-
SCROLLBARWIDTH
+
1
,
r
,
b
))
# jvr
self
.
wid
.
InvalWindowRect
((
r
-
SCROLLBARWIDTH
+
1
,
b
-
SCROLLBARWIDTH
+
1
,
r
,
b
))
# jvr
window
.
SizeWindow
(
width
,
height
,
1
)
# changed updateFlag to true jvr
self
.
do_postresize
(
width
,
height
,
window
)
def
do_postresize
(
self
,
width
,
height
,
window
):
SetPort
(
window
)
InvalWindowRect
(
window
.
GetWindowPort
().
portRect
)
self
.
wid
.
InvalWindowRect
(
window
.
GetWindowPort
().
portRect
)
def
do_inContent
(
self
,
partcode
,
window
,
event
):
#
...
...
@@ -853,12 +856,12 @@ class ScrolledWindow(ControlsWindow):
rect
=
x0
-
1
,
y1
-
(
SCROLLBARWIDTH
-
1
),
x1
-
(
SCROLLBARWIDTH
-
2
),
y1
+
1
self
.
barx
=
NewControl
(
self
.
wid
,
rect
,
""
,
1
,
vx
,
0
,
32767
,
16
,
0
)
if
not
self
.
barx_enabled
:
self
.
barx
.
HiliteControl
(
255
)
## InvalWindowRect(rect)
##
self.wid.
InvalWindowRect(rect)
if
wanty
:
rect
=
x1
-
(
SCROLLBARWIDTH
-
1
),
y0
-
1
,
x1
+
1
,
y1
-
(
SCROLLBARWIDTH
-
2
)
self
.
bary
=
NewControl
(
self
.
wid
,
rect
,
""
,
1
,
vy
,
0
,
32767
,
16
,
0
)
if
not
self
.
bary_enabled
:
self
.
bary
.
HiliteControl
(
255
)
## InvalWindowRect(rect)
##
self.wid.
InvalWindowRect(rect)
def
do_postclose
(
self
):
self
.
barx
=
self
.
bary
=
None
...
...
@@ -893,11 +896,11 @@ class ScrolledWindow(ControlsWindow):
self
.
bary
.
SizeControl
(
SCROLLBARWIDTH
,
(
b
-
t
)
-
(
SCROLLBARWIDTH
-
3
))
# jvr
if
self
.
barx
:
self
.
barx
.
ShowControl
()
# jvr
ValidWindowRect
((
l
,
b
-
SCROLLBARWIDTH
+
1
,
r
-
SCROLLBARWIDTH
+
2
,
b
))
# jvr
self
.
wid
.
ValidWindowRect
((
l
,
b
-
SCROLLBARWIDTH
+
1
,
r
-
SCROLLBARWIDTH
+
2
,
b
))
# jvr
if
self
.
bary
:
self
.
bary
.
ShowControl
()
# jvr
ValidWindowRect
((
r
-
SCROLLBARWIDTH
+
1
,
t
,
r
,
b
-
SCROLLBARWIDTH
+
2
))
# jvr
InvalWindowRect
((
r
-
SCROLLBARWIDTH
+
1
,
b
-
SCROLLBARWIDTH
+
1
,
r
,
b
))
# jvr, growicon
self
.
wid
.
ValidWindowRect
((
r
-
SCROLLBARWIDTH
+
1
,
t
,
r
,
b
-
SCROLLBARWIDTH
+
2
))
# jvr
self
.
wid
.
InvalWindowRect
((
r
-
SCROLLBARWIDTH
+
1
,
b
-
SCROLLBARWIDTH
+
1
,
r
,
b
))
# jvr, growicon
def
do_rawcontrolhit
(
self
,
window
,
control
,
pcode
,
local
,
event
):
...
...
Mac/Lib/test/tscrollwin.py
View file @
e55f9c8d
...
...
@@ -47,7 +47,7 @@ class MyWindow(ScrolledWindow):
self
.
vy
=
value
else
:
self
.
vy
=
self
.
vy
+
delta
Win
.
InvalWindowRect
(
self
.
ourrect
)
self
.
wid
.
InvalWindowRect
(
self
.
ourrect
)
def
do_update
(
self
,
wid
,
event
):
Qd
.
EraseRect
(
self
.
ourrect
)
...
...
Mac/Tools/IDE/PyEdit.py
View file @
e55f9c8d
...
...
@@ -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)
...
...
Mac/Tools/IDE/Splash.py
View file @
e55f9c8d
...
...
@@ -100,7 +100,7 @@ def UpdateSplash(drawdialog = 0, what = 0):
if
drawdialog
:
splash
.
DrawDialog
()
drawtext
(
what
)
Win
.
ValidWindowRect
(
splash
.
GetWindow
Port
().
portRect
)
splash
.
GetDialogWindow
().
ValidWindowRect
(
splash
.
GetDialog
Port
().
portRect
)
def
drawtext
(
what
=
0
):
Qd
.
SetPort
(
splash
)
...
...
Mac/Tools/IDE/Wbase.py
View file @
e55f9c8d
...
...
@@ -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
):
...
...
Mac/Tools/IDE/Wcontrols.py
View file @
e55f9c8d
...
...
@@ -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
:
...
...
Mac/Tools/IDE/Wlists.py
View file @
e55f9c8d
...
...
@@ -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
)
...
...
Mac/Tools/IDE/Wquicktime.py
View file @
e55f9c8d
...
...
@@ -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
...
...
Mac/Tools/IDE/Wtext.py
View file @
e55f9c8d
...
...
@@ -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
):
...
...
Mac/Tools/IDE/Wwindows.py
View file @
e55f9c8d
...
...
@@ -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
):
...
...
Mac/scripts/MkDistr_ui.py
View file @
e55f9c8d
...
...
@@ -115,7 +115,7 @@ class ListWindow(DialogWindow):
self
.
list
.
LSetCell
(
contents
[
i
],
(
0
,
i
))
self
.
list
.
LSetDrawingMode
(
1
)
##self.list.LUpdate(self.wid.GetWindowPort().visRgn)
Win
.
InvalWindowRect
(
self
.
listrect
)
self
.
wid
.
InvalWindowRect
(
self
.
listrect
)
def
additem
(
self
,
item
):
where
=
self
.
list
.
LAddRow
(
1
,
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment