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
2f21246c
Kaydet (Commit)
2f21246c
authored
Agu 17, 1995
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Test of list in dialog
üst
b4e47839
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
0 deletions
+93
-0
tlist_dialog.py
Mac/Lib/test/tlist_dialog.py
+82
-0
tlist_dialog.rsrc.hqx
Mac/Lib/test/tlist_dialog.rsrc.hqx
+11
-0
No files found.
Mac/Lib/test/tlist_dialog.py
0 → 100644
Dosyayı görüntüle @
2f21246c
import
addpack
addpack
.
addpack
(
':Tools:bgen:evt'
)
from
Dlg
import
*
from
Events
import
*
from
Evt
import
*
from
List
import
*
from
Qd
import
*
import
Res
import
string
import
MacOS
ID
=
513
def
dodialog
(
items
):
print
'This is to create a window'
#
# Create the dialog
#
d
=
GetNewDialog
(
ID
,
-
1
)
#
# Create the list and fill it
#
tp
,
h
,
rect
=
d
.
GetDialogItem
(
2
)
rect
=
rect
[
0
],
rect
[
1
],
rect
[
2
]
-
15
,
rect
[
3
]
-
15
# Space for scrollbars
length
=
(
len
(
items
)
+
1
)
/
2
list
=
LNew
(
rect
,
(
0
,
0
,
2
,
length
),
(
0
,
0
),
0
,
d
,
0
,
1
,
1
,
1
)
for
i
in
range
(
len
(
items
)):
list
.
LSetCell
(
items
[
i
],
(
i
%
2
,
i
/
2
))
#
# Draw it.
#
list
.
LSetDrawingMode
(
1
)
list
.
LUpdate
()
#
# Do the (modeless) dialog
#
while
1
:
ok
,
ev
=
WaitNextEvent
(
0xffff
,
10
)
if
not
ok
:
# No event.
continue
(
what
,
message
,
when
,
where
,
modifiers
)
=
ev
if
what
==
updateEvt
:
# XXXX We just always update our list (sigh...)
SetPort
(
window
)
list
.
LUpdate
()
if
IsDialogEvent
(
ev
):
# It is a dialog event. See if it's ours.
ok
,
window
,
item
=
DialogSelect
(
ev
)
if
ok
:
if
window
==
d
:
# Yes, it is ours.
if
item
==
1
:
# OK button
break
elif
item
==
2
:
# List
(
what
,
message
,
when
,
where
,
modifiers
)
=
ev
SetPort
(
window
)
if
what
==
mouseDown
:
local
=
GlobalToLocal
(
where
)
list
.
LClick
(
local
,
modifiers
)
else
:
print
'Unexpected item hit'
else
:
print
'Unexpected dialog hit'
else
:
MacOS
.
HandleEvent
(
ev
)
sel
=
[]
for
i
in
range
(
len
(
items
)):
ok
,
dummycell
=
list
.
LGetSelect
(
0
,
(
i
%
2
,
i
/
2
))
if
ok
:
sel
.
append
(
list
.
LGetCell
(
256
,
(
i
%
2
,
i
/
2
)))
print
'Your selection:'
,
sel
def
test
():
import
os
,
sys
Res
.
OpenResFile
(
'tlist_dialog.rsrc'
)
dodialog
(
os
.
listdir
(
':'
))
sys
.
exit
(
1
)
if
__name__
==
'__main__'
:
test
()
Mac/Lib/test/tlist_dialog.rsrc.hqx
0 → 100644
Dosyayı görüntüle @
2f21246c
(This file may be decompressed with BinHex 4.0)
:%A4XDA0dAf4TB@a[CbjbFh*M!(*cFQ058d9%!3#3"`'IhEi!N!3"!!!!!9N!!!"C
!!!!4J$k+J!!qLS!!2SU!!$k+J!!qLS!!2SUq!$k+`!!q[rj%A4XDA0dAf4TB@a[
CbjbFh*M!J!!!(*cFQ058d9%!3!!!(*cFQ058d9%!3!!0!$!!*!5V&M0H3#3"J'I
+J!!qLS!!2SU!!$k+J!!qLS!!2SU!!$k+J!!qLS!!2SUq!$k+`!!q[rj!$S!!2Vr
%$S!!2SV!!$kr!!!qLS!!2SU!!$k+J!!qLS!!2SU!!$k+J!!qLS!!2SU!!$k+[J!
qLX!!2Vrq3!k!!$kr`!!qLX!!2Vm!!$k+J!!qLS!!2SU!*!%2!!#!*!&UJ#J!,i!
fJ3#6dX!N!8S!!S!T3$D!*!(#J!+!"`!fBJ18f9XC@0d)'%JGfpbC$S!!!!9!%B!
MJ%1!Ai!!`%!!3#3"3)"!!!!!3!!!!&C!!!!@3!!!%B!b9$i%D)!!!!F!%B!!84-
6dF!!!!54%P86!!!!"i#!Irr!!!!3!$*8E`#!Irr!*!&b8rJ2A):
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