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
b7ad821f
Kaydet (Commit)
b7ad821f
authored
Eyl 26, 1999
tarafından
Just van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added support for global default font settings. (jvr)
üst
03bca30e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
23 deletions
+33
-23
Wtext.py
Mac/Tools/IDE/Wtext.py
+22
-18
Wwindows.py
Mac/Tools/IDE/Wwindows.py
+11
-5
No files found.
Mac/Tools/IDE/Wtext.py
Dosyayı görüntüle @
b7ad821f
...
...
@@ -24,11 +24,13 @@ class TextBox(Wbase.Widget):
"""A static text widget"""
def
__init__
(
self
,
possize
,
text
=
""
,
align
=
TextEdit
.
teJustLeft
,
fontsettings
=
(
"Python-Sans"
,
0
,
9
,
(
0
,
0
,
0
))
,
backgroundcolor
=
(
0xffff
,
0xffff
,
0xffff
)
def
__init__
(
self
,
possize
,
text
=
""
,
align
=
TextEdit
.
teJustLeft
,
fontsettings
=
None
,
backgroundcolor
=
(
0xffff
,
0xffff
,
0xffff
)
):
if
fontsettings
is
None
:
import
W
fontsettings
=
W
.
getdefaultfont
()
Wbase
.
Widget
.
__init__
(
self
,
possize
)
self
.
fontsettings
=
fontsettings
self
.
text
=
text
...
...
@@ -90,12 +92,14 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget):
"""A text edit widget, mainly for simple entry fields."""
def
__init__
(
self
,
possize
,
text
=
""
,
callback
=
None
,
inset
=
(
3
,
3
),
fontsettings
=
(
"Python-Sans"
,
0
,
9
,
(
0
,
0
,
0
))
,
def
__init__
(
self
,
possize
,
text
=
""
,
callback
=
None
,
inset
=
(
3
,
3
),
fontsettings
=
None
,
tabsettings
=
(
32
,
0
),
readonly
=
0
):
if
fontsettings
is
None
:
import
W
fontsettings
=
W
.
getdefaultfont
()
Wbase
.
SelectableWidget
.
__init__
(
self
,
possize
)
self
.
temptext
=
text
self
.
ted
=
None
...
...
@@ -553,10 +557,10 @@ class TextEditor(EditText):
"""A text edit widget."""
def
__init__
(
self
,
possize
,
text
=
""
,
callback
=
None
,
wrap
=
1
,
inset
=
(
4
,
4
),
fontsettings
=
(
"Python-Sans"
,
0
,
9
,
(
0
,
0
,
0
))
,
tabsettings
=
(
32
,
0
),
readonly
=
0
):
def
__init__
(
self
,
possize
,
text
=
""
,
callback
=
None
,
wrap
=
1
,
inset
=
(
4
,
4
),
fontsettings
=
None
,
tabsettings
=
(
32
,
0
),
readonly
=
0
):
EditText
.
__init__
(
self
,
possize
,
text
,
callback
,
inset
,
fontsettings
,
tabsettings
,
readonly
)
self
.
wrap
=
wrap
...
...
@@ -607,12 +611,12 @@ class PyEditor(TextEditor):
"""A specialized Python source edit widget"""
def
__init__
(
self
,
possize
,
text
=
""
,
callback
=
None
,
inset
=
(
4
,
4
),
fontsettings
=
(
"Python-Sans"
,
0
,
9
,
(
0
,
0
,
0
))
,
tabsettings
=
(
32
,
0
),
readonly
=
0
,
debugger
=
None
,
file
=
''
):
def
__init__
(
self
,
possize
,
text
=
""
,
callback
=
None
,
inset
=
(
4
,
4
),
fontsettings
=
None
,
tabsettings
=
(
32
,
0
),
readonly
=
0
,
debugger
=
None
,
file
=
''
):
TextEditor
.
__init__
(
self
,
possize
,
text
,
callback
,
0
,
inset
,
fontsettings
,
tabsettings
,
readonly
)
self
.
bind
(
"cmd["
,
self
.
domenu_shiftleft
)
self
.
bind
(
"cmd]"
,
self
.
domenu_shiftright
)
...
...
Mac/Tools/IDE/Wwindows.py
Dosyayı görüntüle @
b7ad821f
...
...
@@ -19,8 +19,12 @@ class Window(FrameWork.Window, Wbase.SelectableWidget):
windowkind
=
Windows
.
documentProc
def
__init__
(
self
,
possize
,
title
=
""
,
minsize
=
None
,
maxsize
=
None
,
tabbable
=
1
,
show
=
1
):
def
__init__
(
self
,
possize
,
title
=
""
,
minsize
=
None
,
maxsize
=
None
,
tabbable
=
1
,
show
=
1
,
fontsettings
=
None
):
import
W
if
fontsettings
is
None
:
fontsettings
=
W
.
getdefaultfont
()
self
.
_fontsettings
=
fontsettings
W
.
SelectableWidget
.
__init__
(
self
,
possize
)
self
.
_globalbounds
=
l
,
t
,
r
,
b
=
self
.
getwindowbounds
(
possize
,
minsize
)
self
.
_bounds
=
(
0
,
0
,
r
-
l
,
b
-
t
)
...
...
@@ -92,11 +96,13 @@ class Window(FrameWork.Window, Wbase.SelectableWidget):
self
.
wid
=
Win
.
NewCWindow
(
self
.
_globalbounds
,
self
.
title
,
self
.
_show
,
self
.
windowkind
,
-
1
,
self
.
hasclosebox
,
0
)
self
.
SetPort
()
fnum
=
Fm
.
GetFNum
(
"Python-Sans"
)
fontname
,
fontstyle
,
fontsize
,
fontcolor
=
self
.
_fontsettings
fnum
=
Fm
.
GetFNum
(
fontname
)
if
fnum
==
0
:
fnum
=
Fm
.
GetFNum
(
"Geneva"
)
Qd
.
TextFont
(
fnum
)
# XXX font&size from a function?
Qd
.
TextSize
(
9
)
# XXX font&size from a function?
Qd
.
TextFont
(
fnum
)
Qd
.
TextFace
(
fontstyle
)
Qd
.
TextSize
(
fontsize
)
if
self
.
_bindings
.
has_key
(
"<open>"
):
callback
=
self
.
_bindings
[
"<open>"
]
callback
()
...
...
@@ -286,7 +292,7 @@ class Window(FrameWork.Window, Wbase.SelectableWidget):
(
what
,
message
,
when
,
where
,
modifiers
)
=
event
key
=
char
if
Wkeys
.
keynames
.
has_key
(
key
):
key
=
Wkeys
.
keynames
[
char
]
key
=
Wkeys
.
keynames
[
key
]
if
modifiers
&
Events
.
shiftKey
:
key
=
'shift'
+
key
if
modifiers
&
Events
.
cmdKey
:
...
...
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