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
2dd4d160
Kaydet (Commit)
2dd4d160
authored
Kas 02, 2001
tarafından
Just van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use 32bit APIs for control values, refactor slightly
üst
52a42e98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
42 deletions
+28
-42
Wcontrols.py
Mac/Tools/IDE/Wcontrols.py
+28
-42
No files found.
Mac/Tools/IDE/Wcontrols.py
Dosyayı görüntüle @
2dd4d160
...
@@ -94,6 +94,19 @@ class ControlWidget(Wbase.ClickableWidget):
...
@@ -94,6 +94,19 @@ class ControlWidget(Wbase.ClickableWidget):
def
gettitle
(
self
):
def
gettitle
(
self
):
return
self
.
_title
return
self
.
_title
def
set
(
self
,
value
):
if
self
.
_control
:
self
.
_control
.
SetControl32BitValue
(
value
)
else
:
self
.
_value
=
value
def
get
(
self
):
if
self
.
_control
:
return
self
.
_control
.
GetControl32BitValue
()
else
:
return
self
.
_value
class
Button
(
ControlWidget
):
class
Button
(
ControlWidget
):
...
@@ -165,19 +178,7 @@ class CheckBox(ControlWidget):
...
@@ -165,19 +178,7 @@ class CheckBox(ControlWidget):
def
toggle
(
self
):
def
toggle
(
self
):
self
.
set
(
not
self
.
get
())
self
.
set
(
not
self
.
get
())
def
set
(
self
,
value
):
if
self
.
_control
:
self
.
_control
.
SetControlValue
(
value
)
else
:
self
.
_value
=
value
def
get
(
self
):
if
self
.
_control
:
return
self
.
_control
.
GetControlValue
()
else
:
return
self
.
_value
class
RadioButton
(
ControlWidget
):
class
RadioButton
(
ControlWidget
):
...
@@ -217,13 +218,7 @@ class RadioButton(ControlWidget):
...
@@ -217,13 +218,7 @@ class RadioButton(ControlWidget):
button
.
_control
.
SetControlValue
(
button
==
self
)
button
.
_control
.
SetControlValue
(
button
==
self
)
else
:
else
:
button
.
_value
=
(
button
==
self
)
button
.
_value
=
(
button
==
self
)
def
get
(
self
):
if
self
.
_control
:
return
self
.
_control
.
GetControlValue
()
else
:
return
self
.
_value
class
Scrollbar
(
ControlWidget
):
class
Scrollbar
(
ControlWidget
):
...
@@ -234,9 +229,9 @@ class Scrollbar(ControlWidget):
...
@@ -234,9 +229,9 @@ class Scrollbar(ControlWidget):
ControlWidget
.
__init__
(
self
,
possize
,
""
,
procID
,
callback
,
value
,
min
,
max
)
ControlWidget
.
__init__
(
self
,
possize
,
""
,
procID
,
callback
,
value
,
min
,
max
)
# interface
# interface
def
set
(
self
,
value
):
#
def set(self, value):
if
self
.
_callback
:
#
if self._callback:
Wbase
.
CallbackCall
(
self
.
_callback
,
1
,
value
)
#
Wbase.CallbackCall(self._callback, 1, value)
def
up
(
self
):
def
up
(
self
):
if
self
.
_callback
:
if
self
.
_callback
:
...
@@ -255,16 +250,19 @@ class Scrollbar(ControlWidget):
...
@@ -255,16 +250,19 @@ class Scrollbar(ControlWidget):
Wbase
.
CallbackCall
(
self
.
_callback
,
1
,
'--'
)
Wbase
.
CallbackCall
(
self
.
_callback
,
1
,
'--'
)
def
setmin
(
self
,
min
):
def
setmin
(
self
,
min
):
self
.
_control
.
SetControlMinimum
(
min
)
self
.
_control
.
SetControl32BitMinimum
(
min
)
def
setmax
(
self
,
max
):
self
.
_control
.
SetControl32BitMaximum
(
max
)
def
set
max
(
self
,
min
):
def
set
viewsize
(
self
,
view
):
self
.
_control
.
SetControl
Minimum
(
max
)
self
.
_control
.
SetControl
ViewSize
(
view
)
def
getmin
(
self
):
def
getmin
(
self
):
return
self
.
_control
.
GetControlMinimum
()
return
self
.
_control
.
GetControl
32Bit
Minimum
()
def
getmax
(
self
):
def
getmax
(
self
):
return
self
.
_control
.
GetControl
Min
imum
()
return
self
.
_control
.
GetControl
32BitMax
imum
()
# internals
# internals
def
click
(
self
,
point
,
modifiers
):
def
click
(
self
,
point
,
modifiers
):
...
@@ -299,7 +297,7 @@ class Scrollbar(ControlWidget):
...
@@ -299,7 +297,7 @@ class Scrollbar(ControlWidget):
def
_hit
(
self
,
part
):
def
_hit
(
self
,
part
):
if
part
==
Controls
.
inThumb
:
if
part
==
Controls
.
inThumb
:
value
=
self
.
_control
.
GetControlValue
()
value
=
self
.
_control
.
GetControl
32Bit
Value
()
elif
part
==
Controls
.
inUpButton
:
elif
part
==
Controls
.
inUpButton
:
value
=
"+"
value
=
"+"
elif
part
==
Controls
.
inDownButton
:
elif
part
==
Controls
.
inDownButton
:
...
@@ -329,19 +327,7 @@ class Scrollbar(ControlWidget):
...
@@ -329,19 +327,7 @@ class Scrollbar(ControlWidget):
else
:
else
:
Qd
.
FrameRect
(
self
.
_bounds
)
Qd
.
FrameRect
(
self
.
_bounds
)
self
.
GetWindow
()
.
ValidWindowRect
(
self
.
_bounds
)
self
.
GetWindow
()
.
ValidWindowRect
(
self
.
_bounds
)
def
set
(
self
,
value
):
if
self
.
_control
:
self
.
_control
.
SetControlValue
(
value
)
else
:
self
.
_value
=
value
def
get
(
self
):
if
self
.
_control
:
return
self
.
_control
.
GetControlValue
()
else
:
return
self
.
_value
def
_scalebarvalue
(
absmin
,
absmax
,
curmin
,
curmax
):
def
_scalebarvalue
(
absmin
,
absmax
,
curmin
,
curmax
):
if
curmin
<=
absmin
and
curmax
>=
absmax
:
if
curmin
<=
absmin
and
curmax
>=
absmax
:
...
...
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