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:
TTkAbstractScrollViewLayout
Slots🌶️
viewMoveTo(x, y)This method is used to set the vertical and horizontal offsets of the
TTkAbstractScrollViewInterfaceMethods🌶️
- getViewOffsets() tuple[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:
TTkAbstractScrollViewLayout
- 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:
TTkAbstractScrollViewLayout
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)[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:
TTkAbstractScrollViewLayout
- Parameters:
x (int) – the horizontal position
y (int) – the vertical position