scroller used to achieve scroll logic, typically ZFUIScrollerDefault would suit most cases More...
#include <ZFUIScroller.h>
Public Member Functions | |
virtual void | scrollOwnerSizeOnUpdate (zffloat ownerSize)=0 |
called when owner scroll view's size changed, you should fix content frame to match bounds if necessary | |
virtual void | scrollBounceOnUpdate (zfbool scrollBounce, zfbool scrollBounceAlways)=0 |
whether use bounce | |
virtual void | scrollAlignToPageOnUpdate (zfbool scrollAlignToPage)=0 |
whether align to page | |
virtual void | scrollContentOnUpdate (zffloat contentOffset, zffloat contentSize)=0 |
used to update scroll content, you should keep or update previous scroll animation if necessary | |
virtual void | scrollToFitRange (void)=0 |
cancel over scroll and ensure content offset in range | |
virtual void | scrollStop (void) |
util method to stop scroll animation | |
virtual void | scrollWithoutAnimation (zffloat contentOffset)=0 |
scroll without scroll animation, you should stop old scroll animation if necessary | |
virtual void | scrollByPoint (zffloat point)=0 |
see ZFUIScrollView::scrollByPoint | |
virtual zffloat | scrollByPointEndPoint (void)=0 |
return end position of scrollByPoint, must return current content offset if not scrolling | |
virtual void | scrollBySpeed (zffloat speed)=0 |
see ZFUIScrollView::scrollBySpeed | |
virtual zffloat | scrollBySpeedCurrentSpeed (void)=0 |
return current speed of scrollBySpeed | |
virtual zffloat | scrollBySpeedEndPointPredicted (void)=0 |
return end position of scrollBySpeed, must return current content offset if not scrolling | |
virtual zffloat | scrollEndPointPredicted (void)=0 |
return end position, must return current content offset if not scrolling | |
virtual zfbool | scrollRequireFocus (void)=0 |
whether this direction's scroller want higher priority, typically true if currently under progress to scroll to align to page | |
virtual zffloat | scrollOwnerSize (void)=0 |
used to get current owner size | |
virtual zffloat | scrollContentOffset (void)=0 |
used to get current content offset | |
virtual zffloat | scrollContentSize (void)=0 |
used to get current content size | |
virtual void | scrollOnDragBegin (zffloat mousePos, zftimet mouseTime)=0 |
drag begin | |
virtual void | scrollOnDrag (zffloat mousePos, zftimet mouseTime)=0 |
drag | |
virtual void | scrollOnDragEnd (zftimet mouseTime, zfbool needScrollAni)=0 |
drag end | |
virtual void | scrollAniOnUpdate (zftimet time)=0 |
called to update scroll animation | |
![]() | |
virtual const ZFClass * | classData (void)=0 |
get instance's class info | |
virtual ZFObject * | toObject (void)=0 |
convert to ZFObject type | |
Static Public Member Functions | |
static const ZFClass * | ClassData (void) |
get class info | |
![]() | |
static const ZFClass * | ClassData (void) |
get class info | |
Public Attributes | |
ZFListener | scrollAniStartCallback |
used to start scroll animation's timer | |
ZFListener | scrollAniStopCallback |
used to stop scroll animation's timer | |
Protected Types | |
typedef ZFInterface | zfsuper |
typedef for super (always ZFInterface for an interface type) | |
typedef ZFUIScroller | zfself |
typedef for self | |
![]() | |
typedef _ZFP_ObjI_Base | zfsuper |
typedef for super (always ZFInterface for an interface type) | |
typedef ZFInterface | zfself |
typedef for self | |
scroller used to achieve scroll logic, typically ZFUIScrollerDefault would suit most cases
to use a scroller, you must:
to implement a scroller, you must:
|
pure virtual |
called when owner scroll view's size changed, you should fix content frame to match bounds if necessary
Implemented in ZFUIScrollerDefault.
|
pure virtual |
whether use bounce
Implemented in ZFUIScrollerDefault.
|
pure virtual |
whether align to page
Implemented in ZFUIScrollerDefault.
|
pure virtual |
used to update scroll content, you should keep or update previous scroll animation if necessary
Implemented in ZFUIScrollerDefault.
|
pure virtual |
cancel over scroll and ensure content offset in range
Implemented in ZFUIScrollerDefault.
|
pure virtual |
scroll without scroll animation, you should stop old scroll animation if necessary
Implemented in ZFUIScrollerDefault.
|
pure virtual |
see ZFUIScrollView::scrollByPoint
Implemented in ZFUIScrollerDefault.
|
pure virtual |
return end position of scrollByPoint, must return current content offset if not scrolling
Implemented in ZFUIScrollerDefault.
|
pure virtual |
see ZFUIScrollView::scrollBySpeed
Implemented in ZFUIScrollerDefault.
|
pure virtual |
return current speed of scrollBySpeed
Implemented in ZFUIScrollerDefault.
|
pure virtual |
return end position of scrollBySpeed, must return current content offset if not scrolling
Implemented in ZFUIScrollerDefault.
|
pure virtual |
return end position, must return current content offset if not scrolling
Implemented in ZFUIScrollerDefault.
|
pure virtual |
whether this direction's scroller want higher priority, typically true if currently under progress to scroll to align to page
Implemented in ZFUIScrollerDefault.
|
pure virtual |
used to get current owner size
Implemented in ZFUIScrollerDefault.
|
pure virtual |
used to get current content offset
Implemented in ZFUIScrollerDefault.
|
pure virtual |
used to get current content size
Implemented in ZFUIScrollerDefault.
drag end
note drag events is not ensured paired
if scroll animation is needed, use scrollAniStartCallback to start
Implemented in ZFUIScrollerDefault.
|
pure virtual |
called to update scroll animation
Implemented in ZFUIScrollerDefault.
ZFListener ZFUIScroller::scrollAniStartCallback |
used to start scroll animation's timer
impl must return a v_zftimet (stored in ZFArgs::result) to indicates current timestamp