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
6f2ee3d2
Commit
6f2ee3d2
authored
Apr 07, 1991
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added keyboard, alternate drawing, realize and getwindow interfaces.
parent
2da2948d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
4 deletions
+88
-4
Lib/lib-stdwin/Split.py
Lib/lib-stdwin/Split.py
+44
-2
Lib/stdwin/Split.py
Lib/stdwin/Split.py
+44
-2
No files found.
Lib/lib-stdwin/Split.py
View file @
6f2ee3d2
...
@@ -18,7 +18,9 @@ class Split():
...
@@ -18,7 +18,9 @@ class Split():
self
.
parent
=
parent
self
.
parent
=
parent
self
.
children
=
[]
self
.
children
=
[]
self
.
mouse_interest
=
[]
self
.
mouse_interest
=
[]
self
.
keybd_interest
=
[]
self
.
timer_interest
=
[]
self
.
timer_interest
=
[]
self
.
altdraw_interest
=
[]
self
.
mouse_focus
=
0
self
.
mouse_focus
=
0
return
self
return
self
#
#
...
@@ -30,18 +32,28 @@ class Split():
...
@@ -30,18 +32,28 @@ class Split():
child
.
destroy
()
child
.
destroy
()
del
self
.
children
[:]
del
self
.
children
[:]
del
self
.
mouse_interest
[:]
del
self
.
mouse_interest
[:]
del
self
.
keybd_interest
[:]
del
self
.
timer_interest
[:]
del
self
.
timer_interest
[:]
del
self
.
altdraw_interest
[:]
self
.
mouse_focus
=
None
self
.
mouse_focus
=
None
#
#
def
minsize
(
self
,
m
):
return
unimpl
()
def
minsize
(
self
,
m
):
return
unimpl
()
# Should ask children
def
getbounds
(
self
):
return
unimpl
()
def
getbounds
(
self
):
return
unimpl
()
def
setbounds
(
self
,
bounds
):
unimpl
()
def
setbounds
(
self
,
bounds
):
unimpl
()
# Should tell children
#
def
realize
(
self
):
for
child
in
self
.
children
:
child
.
realize
()
#
#
def
draw
(
self
,
d_detail
):
def
draw
(
self
,
d_detail
):
# (Could avoid calls to children outside the area)
# (Could avoid calls to children outside the area)
for
child
in
self
.
children
:
for
child
in
self
.
children
:
child
.
draw
(
d_detail
)
child
.
draw
(
d_detail
)
#
#
def
altdraw
(
self
,
detail
):
for
child
in
self
.
altdraw_interest
:
child
.
altdraw
(
detail
)
#
# Downcalls only made after certain upcalls
# Downcalls only made after certain upcalls
#
#
def
mouse_down
(
self
,
detail
):
def
mouse_down
(
self
,
detail
):
...
@@ -60,6 +72,10 @@ class Split():
...
@@ -60,6 +72,10 @@ class Split():
self
.
mouse_focus
.
mouse_up
(
detail
)
self
.
mouse_focus
.
mouse_up
(
detail
)
self
.
mouse_focus
=
0
self
.
mouse_focus
=
0
#
#
def
keybd
(
self
,
type_detail
):
for
child
in
self
.
keybd_interest
:
child
.
keybd
(
type_detail
)
#
def
timer
(
self
):
def
timer
(
self
):
for
child
in
self
.
timer_interest
:
for
child
in
self
.
timer_interest
:
child
.
timer
()
child
.
timer
()
...
@@ -76,8 +92,12 @@ class Split():
...
@@ -76,8 +92,12 @@ class Split():
remove
(
child
,
self
.
children
)
remove
(
child
,
self
.
children
)
if
child
in
self
.
mouse_interest
:
if
child
in
self
.
mouse_interest
:
remove
(
child
,
self
.
mouse_interest
)
remove
(
child
,
self
.
mouse_interest
)
if
child
in
self
.
keybd_interest
:
remove
(
child
,
self
.
keybd_interest
)
if
child
in
self
.
timer_interest
:
if
child
in
self
.
timer_interest
:
remove
(
child
,
self
.
timer_interest
)
remove
(
child
,
self
.
timer_interest
)
if
child
in
self
.
altdraw_interest
:
remove
(
child
,
self
.
altdraw_interest
)
if
child
=
self
.
mouse_focus
:
if
child
=
self
.
mouse_focus
:
self
.
mouse_focus
=
0
self
.
mouse_focus
=
0
#
#
...
@@ -91,6 +111,16 @@ class Split():
...
@@ -91,6 +111,16 @@ class Split():
if
not
self
.
mouse_interest
:
if
not
self
.
mouse_interest
:
self
.
parent
.
no_mouse
(
self
)
self
.
parent
.
no_mouse
(
self
)
#
#
def
need_keybd
(
self
,
child
):
if
child
not
in
self
.
keybd_interest
:
self
.
keybd_interest
.
append
(
child
)
self
.
parent
.
need_keybd
(
self
)
def
no_keybd
(
self
,
child
):
if
child
in
self
.
keybd_interest
:
remove
(
child
,
self
.
keybd_interest
)
if
not
self
.
keybd_interest
:
self
.
parent
.
no_keybd
(
self
)
#
def
need_timer
(
self
,
child
):
def
need_timer
(
self
,
child
):
if
child
not
in
self
.
timer_interest
:
if
child
not
in
self
.
timer_interest
:
self
.
timer_interest
.
append
(
child
)
self
.
timer_interest
.
append
(
child
)
...
@@ -101,12 +131,24 @@ class Split():
...
@@ -101,12 +131,24 @@ class Split():
if
not
self
.
timer_interest
:
if
not
self
.
timer_interest
:
self
.
parent
.
no_timer
(
self
)
self
.
parent
.
no_timer
(
self
)
#
#
def
need_altdraw
(
self
,
child
):
if
child
not
in
self
.
altdraw_interest
:
self
.
altdraw_interest
.
append
(
child
)
self
.
parent
.
need_altdraw
(
self
)
def
no_altdraw
(
self
,
child
):
if
child
in
self
.
altdraw_interest
:
remove
(
child
,
self
.
altdraw_interest
)
if
not
self
.
altdraw_interest
:
self
.
parent
.
no_altdraw
(
self
)
#
# The rest are transparent:
# The rest are transparent:
#
#
def
begindrawing
(
self
):
def
begindrawing
(
self
):
return
self
.
parent
.
begindrawing
()
return
self
.
parent
.
begindrawing
()
def
beginmeasuring
(
self
):
def
beginmeasuring
(
self
):
return
self
.
parent
.
beginmeasuring
()
return
self
.
parent
.
beginmeasuring
()
def
getwindow
(
self
):
return
self
.
parent
.
getwindow
()
#
#
def
change
(
self
,
area
):
def
change
(
self
,
area
):
self
.
parent
.
change
(
area
)
self
.
parent
.
change
(
area
)
...
...
Lib/stdwin/Split.py
View file @
6f2ee3d2
...
@@ -18,7 +18,9 @@ class Split():
...
@@ -18,7 +18,9 @@ class Split():
self
.
parent
=
parent
self
.
parent
=
parent
self
.
children
=
[]
self
.
children
=
[]
self
.
mouse_interest
=
[]
self
.
mouse_interest
=
[]
self
.
keybd_interest
=
[]
self
.
timer_interest
=
[]
self
.
timer_interest
=
[]
self
.
altdraw_interest
=
[]
self
.
mouse_focus
=
0
self
.
mouse_focus
=
0
return
self
return
self
#
#
...
@@ -30,18 +32,28 @@ class Split():
...
@@ -30,18 +32,28 @@ class Split():
child
.
destroy
()
child
.
destroy
()
del
self
.
children
[:]
del
self
.
children
[:]
del
self
.
mouse_interest
[:]
del
self
.
mouse_interest
[:]
del
self
.
keybd_interest
[:]
del
self
.
timer_interest
[:]
del
self
.
timer_interest
[:]
del
self
.
altdraw_interest
[:]
self
.
mouse_focus
=
None
self
.
mouse_focus
=
None
#
#
def
minsize
(
self
,
m
):
return
unimpl
()
def
minsize
(
self
,
m
):
return
unimpl
()
# Should ask children
def
getbounds
(
self
):
return
unimpl
()
def
getbounds
(
self
):
return
unimpl
()
def
setbounds
(
self
,
bounds
):
unimpl
()
def
setbounds
(
self
,
bounds
):
unimpl
()
# Should tell children
#
def
realize
(
self
):
for
child
in
self
.
children
:
child
.
realize
()
#
#
def
draw
(
self
,
d_detail
):
def
draw
(
self
,
d_detail
):
# (Could avoid calls to children outside the area)
# (Could avoid calls to children outside the area)
for
child
in
self
.
children
:
for
child
in
self
.
children
:
child
.
draw
(
d_detail
)
child
.
draw
(
d_detail
)
#
#
def
altdraw
(
self
,
detail
):
for
child
in
self
.
altdraw_interest
:
child
.
altdraw
(
detail
)
#
# Downcalls only made after certain upcalls
# Downcalls only made after certain upcalls
#
#
def
mouse_down
(
self
,
detail
):
def
mouse_down
(
self
,
detail
):
...
@@ -60,6 +72,10 @@ class Split():
...
@@ -60,6 +72,10 @@ class Split():
self
.
mouse_focus
.
mouse_up
(
detail
)
self
.
mouse_focus
.
mouse_up
(
detail
)
self
.
mouse_focus
=
0
self
.
mouse_focus
=
0
#
#
def
keybd
(
self
,
type_detail
):
for
child
in
self
.
keybd_interest
:
child
.
keybd
(
type_detail
)
#
def
timer
(
self
):
def
timer
(
self
):
for
child
in
self
.
timer_interest
:
for
child
in
self
.
timer_interest
:
child
.
timer
()
child
.
timer
()
...
@@ -76,8 +92,12 @@ class Split():
...
@@ -76,8 +92,12 @@ class Split():
remove
(
child
,
self
.
children
)
remove
(
child
,
self
.
children
)
if
child
in
self
.
mouse_interest
:
if
child
in
self
.
mouse_interest
:
remove
(
child
,
self
.
mouse_interest
)
remove
(
child
,
self
.
mouse_interest
)
if
child
in
self
.
keybd_interest
:
remove
(
child
,
self
.
keybd_interest
)
if
child
in
self
.
timer_interest
:
if
child
in
self
.
timer_interest
:
remove
(
child
,
self
.
timer_interest
)
remove
(
child
,
self
.
timer_interest
)
if
child
in
self
.
altdraw_interest
:
remove
(
child
,
self
.
altdraw_interest
)
if
child
=
self
.
mouse_focus
:
if
child
=
self
.
mouse_focus
:
self
.
mouse_focus
=
0
self
.
mouse_focus
=
0
#
#
...
@@ -91,6 +111,16 @@ class Split():
...
@@ -91,6 +111,16 @@ class Split():
if
not
self
.
mouse_interest
:
if
not
self
.
mouse_interest
:
self
.
parent
.
no_mouse
(
self
)
self
.
parent
.
no_mouse
(
self
)
#
#
def
need_keybd
(
self
,
child
):
if
child
not
in
self
.
keybd_interest
:
self
.
keybd_interest
.
append
(
child
)
self
.
parent
.
need_keybd
(
self
)
def
no_keybd
(
self
,
child
):
if
child
in
self
.
keybd_interest
:
remove
(
child
,
self
.
keybd_interest
)
if
not
self
.
keybd_interest
:
self
.
parent
.
no_keybd
(
self
)
#
def
need_timer
(
self
,
child
):
def
need_timer
(
self
,
child
):
if
child
not
in
self
.
timer_interest
:
if
child
not
in
self
.
timer_interest
:
self
.
timer_interest
.
append
(
child
)
self
.
timer_interest
.
append
(
child
)
...
@@ -101,12 +131,24 @@ class Split():
...
@@ -101,12 +131,24 @@ class Split():
if
not
self
.
timer_interest
:
if
not
self
.
timer_interest
:
self
.
parent
.
no_timer
(
self
)
self
.
parent
.
no_timer
(
self
)
#
#
def
need_altdraw
(
self
,
child
):
if
child
not
in
self
.
altdraw_interest
:
self
.
altdraw_interest
.
append
(
child
)
self
.
parent
.
need_altdraw
(
self
)
def
no_altdraw
(
self
,
child
):
if
child
in
self
.
altdraw_interest
:
remove
(
child
,
self
.
altdraw_interest
)
if
not
self
.
altdraw_interest
:
self
.
parent
.
no_altdraw
(
self
)
#
# The rest are transparent:
# The rest are transparent:
#
#
def
begindrawing
(
self
):
def
begindrawing
(
self
):
return
self
.
parent
.
begindrawing
()
return
self
.
parent
.
begindrawing
()
def
beginmeasuring
(
self
):
def
beginmeasuring
(
self
):
return
self
.
parent
.
beginmeasuring
()
return
self
.
parent
.
beginmeasuring
()
def
getwindow
(
self
):
return
self
.
parent
.
getwindow
()
#
#
def
change
(
self
,
area
):
def
change
(
self
,
area
):
self
.
parent
.
change
(
area
)
self
.
parent
.
change
(
area
)
...
...
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