Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
2cc41604
Kaydet (Commit)
2cc41604
authored
Nis 19, 1996
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Minimal waste test program, modified from ttedit.
üst
08365425
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
0 deletions
+86
-0
twedit.py
Mac/Lib/test/twedit.py
+86
-0
No files found.
Mac/Lib/test/twedit.py
0 → 100644
Dosyayı görüntüle @
2cc41604
# Test waste module.
# Draw a window in which the user can type.
#
# This test expects Win, Evt and FrameWork (and anything used by those)
# to work.
#
# Actually, it is more a test of FrameWork by now....
from
FrameWork
import
*
import
Win
import
Qd
import
waste
import
WASTEconst
import
os
class
WasteWindow
(
Window
):
def
open
(
self
,
name
):
r
=
(
40
,
40
,
400
,
300
)
w
=
Win
.
NewWindow
(
r
,
name
,
1
,
0
,
-
1
,
1
,
0x55555555
)
r2
=
(
0
,
0
,
400
-
40
-
16
,
300
-
40
-
16
)
Qd
.
SetPort
(
w
)
flags
=
WASTEconst
.
weDoAutoScroll
|
WASTEconst
.
weDoOutlineHilite
|
\
WASTEconst
.
weDoMonoStyled
self
.
ted
=
waste
.
WENew
(
r2
,
r2
,
flags
)
w
.
DrawGrowIcon
()
self
.
wid
=
w
self
.
do_postopen
()
def
do_idle
(
self
):
self
.
ted
.
WEIdle
()
def
do_activate
(
self
,
onoff
,
evt
):
if
onoff
:
self
.
ted
.
WEActivate
()
else
:
self
.
ted
.
WEDeactivate
()
def
do_update
(
self
,
wid
,
event
):
Qd
.
EraseRect
(
wid
.
GetWindowPort
()
.
portRect
)
self
.
ted
.
WEUpdate
(
wid
.
GetWindowPort
()
.
visRgn
)
def
do_contentclick
(
self
,
local
,
modifiers
,
evt
):
(
what
,
message
,
when
,
where
,
modifiers
)
=
evt
self
.
ted
.
WEClick
(
local
,
modifiers
,
when
)
def
do_char
(
self
,
ch
,
event
):
(
what
,
message
,
when
,
where
,
modifiers
)
=
event
self
.
ted
.
WEKey
(
ord
(
ch
),
modifiers
)
class
TestWaste
(
Application
):
def
__init__
(
self
):
Application
.
__init__
(
self
)
self
.
num
=
0
self
.
listoflists
=
[]
def
makeusermenus
(
self
):
self
.
filemenu
=
m
=
Menu
(
self
.
menubar
,
"File"
)
self
.
newitem
=
MenuItem
(
m
,
"New window..."
,
"O"
,
self
.
open
)
self
.
quititem
=
MenuItem
(
m
,
"Quit"
,
"Q"
,
self
.
quit
)
def
open
(
self
,
*
args
):
w
=
WasteWindow
(
self
)
w
.
open
(
'Window
%
d'
%
self
.
num
)
self
.
num
=
self
.
num
+
1
self
.
listoflists
.
append
(
w
)
def
quit
(
self
,
*
args
):
raise
self
def
do_about
(
self
,
id
,
item
,
window
,
event
):
EasyDialogs
.
Message
(
"""Test the WASTE interface.
Simple window in which you can type"""
)
def
do_idle
(
self
,
*
args
):
for
l
in
self
.
listoflists
:
l
.
do_idle
()
def
main
():
print
'Open app'
App
=
TestWaste
()
print
'run'
App
.
mainloop
()
if
__name__
==
'__main__'
:
main
()
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