TTkAbstractScrollViewInterface🌶️
- class TTkAbstractScrollViewInterface[source]🌶️
Bases:
objectThe
TTkAbstractScrollViewInterfaceprovide the basic interface that can be used inTTkAbstractScrollAreato enable on-demand scroll bars.When subclassing
TTkAbstractScrollViewInterface, you must implementviewFullAreaSize(),viewDisplayedSize(),getViewOffsets(), andviewMoveTo().This interface is implemented in the following specialised classes:
Signals🌶️
Slots🌶️
viewMoveTo(x, y)This method is used to set the vertical and horizontal offsets of the
TTkAbstractScrollViewInterfaceMembers🌶️
- viewChanged: pyTTkSignal🌶️
This signal is emitted whenever there is a change in the view content topology (size,pos)
Note
This signal must be implemented in any implementation of
TTkAbstractScrollViewto notify that the view content boudaries changed
- viewMovedTo: pyTTkSignal🌶️
This signal is emitted when the view content move to a new position (x,y),
- Parameters:
x (int) – the new horizontal offset
y (int) – the new vertical offset
- viewSizeChanged: pyTTkSignal🌶️
This signal is emitted when the view content size changed
- Parameters:
width (int) – the new width
height (int) – the new height
Methods🌶️
- getViewOffsets() Tuple[int, int][source]🌶️
Retrieve the vertical and horizontal offsets of the
TTkAbstractScrollViewInterfaceNote
Reimplement this function to handle this event
- This method is already implemented in the following classes:
- Returns:
the (x,y) offset
- Return type:
tuple[int,int]
- viewDisplayedSize() Tuple[int, int][source]🌶️
This method returns the displayed size of the
TTkAbstractScrollViewInterfaceimplementation.Note
Reimplement this function to handle this event
This method is already implemented in the following classes:
Unless a different iplementation is required, by default it should return
TTkWidget.size()- Returns:
the displayed size as a tuple of 2 int elements (width,height)
- Return type:
tuple[int,int]
- viewFullAreaSize() Tuple[int, int][source]🌶️
This method returns the full widget area size of the
TTkAbstractScrollViewInterfaceimplementation.This is required to TTkAbstractScrollArea implementation to handle the on-demand scroll bars.
Note
Reimplement this function to handle this event
- Returns:
the full area size as a tuple of 2 int elements (width,height)
- Return type:
tuple[int,int]
- viewMoveTo(x: int, y: int) None[source]🌶️
This method is used to set the vertical and horizontal offsets of the
TTkAbstractScrollViewInterfaceNote
Reimplement this function to handle this event
- This method is already implemented in the following classes:
- Parameters:
x (int) – the horizontal position
y (int) – the vertical position