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
c4570487
Kaydet (Commit)
c4570487
authored
Mar 20, 1998
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Give in to the tab police.
üst
6f73c1a2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
10 deletions
+20
-10
Canvas.py
Lib/lib-tk/Canvas.py
+2
-2
FileDialog.py
Lib/lib-tk/FileDialog.py
+0
-0
SimpleDialog.py
Lib/lib-tk/SimpleDialog.py
+0
-0
Tkinter.py
Lib/lib-tk/Tkinter.py
+18
-8
No files found.
Lib/lib-tk/Canvas.py
Dosyayı görüntüle @
c4570487
...
@@ -99,11 +99,11 @@ class Oval(CanvasItem):
...
@@ -99,11 +99,11 @@ class Oval(CanvasItem):
class
Polygon
(
CanvasItem
):
class
Polygon
(
CanvasItem
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'polygon'
)
+
args
,
kw
)
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'polygon'
)
+
args
,
kw
)
class
Rectangle
(
CanvasItem
):
class
Rectangle
(
CanvasItem
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
def
__init__
(
self
,
canvas
,
*
args
,
**
kw
):
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'rectangle'
)
+
args
,
kw
)
apply
(
CanvasItem
.
__init__
,
(
self
,
canvas
,
'rectangle'
)
+
args
,
kw
)
# XXX "Text" is taken by the Text widget...
# XXX "Text" is taken by the Text widget...
class
CanvasText
(
CanvasItem
):
class
CanvasText
(
CanvasItem
):
...
...
Lib/lib-tk/FileDialog.py
Dosyayı görüntüle @
c4570487
Lib/lib-tk/SimpleDialog.py
Dosyayı görüntüle @
c4570487
Lib/lib-tk/Tkinter.py
Dosyayı görüntüle @
c4570487
...
@@ -51,8 +51,14 @@ def _cnfmerge(cnfs):
...
@@ -51,8 +51,14 @@ def _cnfmerge(cnfs):
class
Event
:
class
Event
:
pass
pass
_support_default_root
=
1
_default_root
=
None
_default_root
=
None
def
NoDefaultRoot
():
global
_support_default_root
_support_default_root
=
0
del
_default_root
def
_tkerror
(
err
):
def
_tkerror
(
err
):
pass
pass
...
@@ -702,6 +708,7 @@ class Misc:
...
@@ -702,6 +708,7 @@ class Misc:
# Support for the "event" command, new in Tk 4.2.
# Support for the "event" command, new in Tk 4.2.
# By Case Roole.
# By Case Roole.
# XXX Why is this using the default root?
def
event_add
(
self
,
virtual
,
*
sequences
):
def
event_add
(
self
,
virtual
,
*
sequences
):
args
=
(
'event'
,
'add'
,
virtual
)
+
sequences
args
=
(
'event'
,
'add'
,
virtual
)
+
sequences
...
@@ -857,14 +864,14 @@ class Tk(Misc, Wm):
...
@@ -857,14 +864,14 @@ class Tk(Misc, Wm):
self
.
tk
.
createcommand
(
'tkerror'
,
_tkerror
)
self
.
tk
.
createcommand
(
'tkerror'
,
_tkerror
)
self
.
tk
.
createcommand
(
'exit'
,
_exit
)
self
.
tk
.
createcommand
(
'exit'
,
_exit
)
self
.
readprofile
(
baseName
,
className
)
self
.
readprofile
(
baseName
,
className
)
if
not
_default_root
:
if
_support_default_root
and
not
_default_root
:
_default_root
=
self
_default_root
=
self
def
destroy
(
self
):
def
destroy
(
self
):
for
c
in
self
.
children
.
values
():
c
.
destroy
()
for
c
in
self
.
children
.
values
():
c
.
destroy
()
self
.
tk
.
call
(
'destroy'
,
self
.
_w
)
self
.
tk
.
call
(
'destroy'
,
self
.
_w
)
Misc
.
destroy
(
self
)
Misc
.
destroy
(
self
)
global
_default_root
global
_default_root
if
_default_root
is
self
:
if
_
support_default_root
and
_
default_root
is
self
:
_default_root
=
None
_default_root
=
None
def
readprofile
(
self
,
baseName
,
className
):
def
readprofile
(
self
,
baseName
,
className
):
import
os
import
os
...
@@ -994,6 +1001,7 @@ class Grid:
...
@@ -994,6 +1001,7 @@ class Grid:
class
BaseWidget
(
Misc
):
class
BaseWidget
(
Misc
):
def
_setup
(
self
,
master
,
cnf
):
def
_setup
(
self
,
master
,
cnf
):
if
_support_default_root
:
global
_default_root
global
_default_root
if
not
master
:
if
not
master
:
if
not
_default_root
:
if
not
_default_root
:
...
@@ -1693,10 +1701,12 @@ class OptionMenu(Menubutton):
...
@@ -1693,10 +1701,12 @@ class OptionMenu(Menubutton):
self
.
__menu
=
None
self
.
__menu
=
None
class
Image
:
class
Image
:
def
__init__
(
self
,
imgtype
,
name
=
None
,
cnf
=
{},
**
kw
):
def
__init__
(
self
,
imgtype
,
name
=
None
,
cnf
=
{},
master
=
None
,
**
kw
):
self
.
name
=
None
self
.
name
=
None
if
not
master
:
master
=
_default_root
master
=
_default_root
if
not
master
:
raise
RuntimeError
,
'Too early to create image'
if
not
master
:
raise
RuntimeError
,
'Too early to create image'
self
.
tk
=
master
.
tk
self
.
tk
=
master
.
tk
if
not
name
:
if
not
name
:
name
=
`id(self)`
name
=
`id(self)`
...
@@ -1741,8 +1751,8 @@ class Image:
...
@@ -1741,8 +1751,8 @@ class Image:
self
.
tk
.
call
(
'image'
,
'width'
,
self
.
name
))
self
.
tk
.
call
(
'image'
,
'width'
,
self
.
name
))
class
PhotoImage
(
Image
):
class
PhotoImage
(
Image
):
def
__init__
(
self
,
name
=
None
,
cnf
=
{},
**
kw
):
def
__init__
(
self
,
name
=
None
,
cnf
=
{},
master
=
None
,
**
kw
):
apply
(
Image
.
__init__
,
(
self
,
'photo'
,
name
,
cnf
),
kw
)
apply
(
Image
.
__init__
,
(
self
,
'photo'
,
name
,
cnf
,
master
),
kw
)
def
blank
(
self
):
def
blank
(
self
):
self
.
tk
.
call
(
self
.
name
,
'blank'
)
self
.
tk
.
call
(
self
.
name
,
'blank'
)
def
cget
(
self
,
option
):
def
cget
(
self
,
option
):
...
@@ -1784,8 +1794,8 @@ class PhotoImage(Image):
...
@@ -1784,8 +1794,8 @@ class PhotoImage(Image):
apply
(
self
.
tk
.
call
,
args
)
apply
(
self
.
tk
.
call
,
args
)
class
BitmapImage
(
Image
):
class
BitmapImage
(
Image
):
def
__init__
(
self
,
name
=
None
,
cnf
=
{},
**
kw
):
def
__init__
(
self
,
name
=
None
,
cnf
=
{},
master
=
None
,
**
kw
):
apply
(
Image
.
__init__
,
(
self
,
'bitmap'
,
name
,
cnf
),
kw
)
apply
(
Image
.
__init__
,
(
self
,
'bitmap'
,
name
,
cnf
,
master
),
kw
)
def
image_names
():
return
_default_root
.
tk
.
call
(
'image'
,
'names'
)
def
image_names
():
return
_default_root
.
tk
.
call
(
'image'
,
'names'
)
def
image_types
():
return
_default_root
.
tk
.
call
(
'image'
,
'types'
)
def
image_types
():
return
_default_root
.
tk
.
call
(
'image'
,
'types'
)
...
...
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