document scrollview generic events

This commit is contained in:
Ryan Pessa 2015-03-27 16:11:02 -05:00
parent c2815a0634
commit d48c94faca
1 changed files with 14 additions and 0 deletions

View File

@ -135,6 +135,18 @@ if Config:
class ScrollView(StencilView):
'''ScrollView class. See module documentation for more information.
:Events:
`on_scroll_start`
Generic event fired when scrolling starts from touch.
`on_scroll_move`
Generic event fired when scrolling move from touch.
`on_scroll_stop`
Generic event fired when scrolling stops from touch.
.. versionchanged:: 1.9.0
`on_scroll_start`, `on_scroll_move` and `on_scroll_stop` events are
now dispatched when scrolling to handle nested ScrollViews.
.. versionchanged:: 1.7.0
`auto_scroll`, `scroll_friction`, `scroll_moves`, `scroll_stoptime' has
been deprecated, use :attr:`effect_cls` instead.
@ -416,6 +428,8 @@ class ScrollView(StencilView):
value.bind(size=self._set_viewport_size)
self.viewport_size = value.size
__events__ = ('on_scroll_start', 'on_scroll_move', 'on_scroll_stop')
def __init__(self, **kwargs):
self._touch = None
self._trigger_update_from_scroll = Clock.create_trigger(