Exemplo n.º 1
0
 def __init__(self, touch_slideable=None, dragging_enabled=False, *a, **k):
     super(SlideableTouchStripComponent, self).__init__(*a, **k)
     self._behaviour = DraggingBehaviour(
     ) if dragging_enabled else SelectingBehaviour()
     self._touch_strip_array = []
     self._on_page_length_changed.subject = touch_slideable
     self._on_position_changed.subject = touch_slideable
     self._on_contents_changed.subject = touch_slideable
     self._slideable = touch_slideable
 def __init__(self, slideable = None, dragging_enabled = False, *a, **k):
     super(SlideComponent, self).__init__(*a, **k)
     slideable = slideable or self
     self._behaviour = DraggingBehaviour() if dragging_enabled else SelectingBehaviour()
     self._touch_strip_array = []
     self._slideable = slideable
     self._position_scroll, self._page_scroll = self.register_components(ScrollComponent(), ScrollComponent())
     self._position_scroll.scrollable = self
     self._page_scroll.can_scroll_up = self.can_scroll_page_up
     self._page_scroll.can_scroll_down = self.can_scroll_page_down
     self._page_scroll.scroll_down = self.scroll_page_down
     self._page_scroll.scroll_up = self.scroll_page_up
     self._on_page_length_changed.subject = slideable
     self._on_page_offset_changed.subject = slideable
     self._on_position_count_changed.subject = slideable
     self._on_position_changed.subject = slideable
     self._on_contents_changed.subject = slideable