Hasty Badger
Small UI library (a branch of Turbo Badger)
|
TBScrollerSnapListener may override the target scroll position of a TBScroller. More...
#include <tb_scroller.h>
Public Member Functions | |
virtual void | OnScrollSnap (TBWidget *target_widget, int &target_x, int &target_y)=0 |
Called when the target scroll position is calculated. More... | |
TBScrollerSnapListener may override the target scroll position of a TBScroller.
|
pure virtual |
Called when the target scroll position is calculated.
target_widget is the widget being scroller. target_x, target_y is the suggested target scroll position which may be changed to something else in this call.
Note: The scroll positions are relative to the target widget (inner scrolled TBWidget). If there's nested scrollable widgets, only the inner scrolled widget applies snapping.