TTkAbstractScrollViewInterface🌶️
- class TTkAbstractScrollViewInterface[source]🌶️
Bases:
object
The
TTkAbstractScrollViewInterface
provide the basic interface that can be used inTTkAbstractScrollArea
to 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
TTkAbstractScrollViewInterface
Methods🌶️
- getViewOffsets() tuple [source]🌶️
Retrieve the vertical and horizontal offsets of the
TTkAbstractScrollViewInterface
Note
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() -> (<class 'int'>, <class 'int'>)[source]🌶️
This method returns the displayed size of the
TTkAbstractScrollViewInterface
implementation.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() -> (<class 'int'>, <class 'int'>)[source]🌶️
This method returns the full widget area size of the
TTkAbstractScrollViewInterface
implementation.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
TTkAbstractScrollViewInterface
Note
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