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
31a4c22c
Kaydet (Commit)
31a4c22c
authored
Ara 31, 2001
tarafından
Just van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
added support for live feedback in scrollbars
üst
cae6da63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
27 deletions
+11
-27
Wcontrols.py
Mac/Tools/IDE/Wcontrols.py
+11
-27
No files found.
Mac/Tools/IDE/Wcontrols.py
Dosyayı görüntüle @
31a4c22c
...
@@ -295,8 +295,11 @@ class Scrollbar(ControlWidget):
...
@@ -295,8 +295,11 @@ class Scrollbar(ControlWidget):
"""Standard scrollbar."""
"""Standard scrollbar."""
def
__init__
(
self
,
possize
,
callback
=
None
,
value
=
0
,
min
=
0
,
max
=
0
):
def
__init__
(
self
,
possize
,
callback
=
None
,
value
=
0
,
min
=
0
,
max
=
0
,
livefeedback
=
1
):
procID
=
Controls
.
scrollBarProc
if
livefeedback
:
procID
=
Controls
.
kControlScrollBarLiveProc
else
:
procID
=
Controls
.
scrollBarProc
ControlWidget
.
__init__
(
self
,
possize
,
""
,
procID
,
callback
,
value
,
min
,
max
)
ControlWidget
.
__init__
(
self
,
possize
,
""
,
procID
,
callback
,
value
,
min
,
max
)
# interface
# interface
...
@@ -373,34 +376,15 @@ class Scrollbar(ControlWidget):
...
@@ -373,34 +376,15 @@ class Scrollbar(ControlWidget):
def
click
(
self
,
point
,
modifiers
):
def
click
(
self
,
point
,
modifiers
):
if
not
self
.
_enabled
:
if
not
self
.
_enabled
:
return
return
# custom TrackControl. A mousedown in a scrollbar arrow or page area should
def
hitter
(
ctl
,
part
,
self
=
self
):
# generate _control hits as long as the mouse is a) down, b) still in the same part
part
=
self
.
_control
.
TestControl
(
point
)
if
Controls
.
inUpButton
<=
part
<=
Controls
.
inPageDown
:
self
.
_control
.
HiliteControl
(
part
)
self
.
_hit
(
part
)
oldpart
=
part
# slight delay before scrolling at top speed...
now
=
Evt
.
TickCount
()
while
Evt
.
StillDown
():
if
(
Evt
.
TickCount
()
-
now
)
>
18
:
# 0.3 seconds
break
while
Evt
.
StillDown
():
part
=
self
.
_control
.
TestControl
(
point
)
if
part
==
oldpart
:
self
.
_control
.
HiliteControl
(
part
)
self
.
_hit
(
part
)
else
:
self
.
_control
.
HiliteControl
(
0
)
self
.
SetPort
()
point
=
Evt
.
GetMouse
()
self
.
_control
.
HiliteControl
(
0
)
elif
part
==
Controls
.
inThumb
:
part
=
self
.
_control
.
TrackControl
(
point
)
if
part
:
if
part
:
self
.
_hit
(
part
)
self
.
_hit
(
part
)
part
=
self
.
_control
.
TrackControl
(
point
,
hitter
)
if
part
:
self
.
_hit
(
part
)
def
_hit
(
self
,
part
):
def
_hit
(
self
,
part
):
value
=
None
if
part
==
Controls
.
inThumb
:
if
part
==
Controls
.
inThumb
:
try
:
try
:
value
=
self
.
_control
.
GetControl32BitValue
()
value
=
self
.
_control
.
GetControl32BitValue
()
...
@@ -416,7 +400,7 @@ class Scrollbar(ControlWidget):
...
@@ -416,7 +400,7 @@ class Scrollbar(ControlWidget):
value
=
"++"
value
=
"++"
elif
part
==
Controls
.
inPageDown
:
elif
part
==
Controls
.
inPageDown
:
value
=
"--"
value
=
"--"
if
self
.
_callback
:
if
value
is
not
None
and
self
.
_callback
:
Wbase
.
CallbackCall
(
self
.
_callback
,
1
,
value
)
Wbase
.
CallbackCall
(
self
.
_callback
,
1
,
value
)
def
draw
(
self
,
visRgn
=
None
):
def
draw
(
self
,
visRgn
=
None
):
...
...
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