Hasty Badger
Small UI library (a branch of Turbo Badger)
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
tb::TBScrollerSnapListener Class Referenceabstract

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...
 

Detailed Description

TBScrollerSnapListener may override the target scroll position of a TBScroller.

Member Function Documentation

virtual void tb::TBScrollerSnapListener::OnScrollSnap ( TBWidget target_widget,
int &  target_x,
int &  target_y 
)
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.


The documentation for this class was generated from the following file: