ZFFramework
 
Loading...
Searching...
No Matches
ZFUIScroller Class Referenceabstract

scroller used to achieve scroll logic, typically ZFUIScrollerDefault would suit most cases More...

#include <ZFUIScroller.h>

Inheritance diagram for ZFUIScroller:
ZFInterface ZFUIScrollerDefault

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
 
- Public Member Functions inherited from ZFInterface
virtual const ZFClassclassData (void)=0
 get instance's class info
 
virtual ZFObjecttoObject (void)=0
 convert to ZFObject type
 

Static Public Member Functions

static const ZFClassClassData (void)
 get class info
 
- Static Public Member Functions inherited from ZFInterface
static const ZFClassClassData (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
 
- Protected Types inherited from ZFInterface
typedef _ZFP_ObjI_Base zfsuper
 typedef for super (always ZFInterface for an interface type)
 
typedef ZFInterface zfself
 typedef for self
 

Detailed Description

scroller used to achieve scroll logic, typically ZFUIScrollerDefault would suit most cases

to use a scroller, you must:


to implement a scroller, you must:

Member Function Documentation

◆ scrollOwnerSizeOnUpdate()

virtual void ZFUIScroller::scrollOwnerSizeOnUpdate ( zffloat ownerSize)
pure virtual

called when owner scroll view's size changed, you should fix content frame to match bounds if necessary

Implemented in ZFUIScrollerDefault.

◆ scrollBounceOnUpdate()

virtual void ZFUIScroller::scrollBounceOnUpdate ( zfbool scrollBounce,
zfbool scrollBounceAlways )
pure virtual

whether use bounce

Implemented in ZFUIScrollerDefault.

◆ scrollAlignToPageOnUpdate()

virtual void ZFUIScroller::scrollAlignToPageOnUpdate ( zfbool scrollAlignToPage)
pure virtual

whether align to page

Implemented in ZFUIScrollerDefault.

◆ scrollContentOnUpdate()

virtual void ZFUIScroller::scrollContentOnUpdate ( zffloat contentOffset,
zffloat contentSize )
pure virtual

used to update scroll content, you should keep or update previous scroll animation if necessary

Implemented in ZFUIScrollerDefault.

◆ scrollToFitRange()

virtual void ZFUIScroller::scrollToFitRange ( void )
pure virtual

cancel over scroll and ensure content offset in range

Implemented in ZFUIScrollerDefault.

◆ scrollWithoutAnimation()

virtual void ZFUIScroller::scrollWithoutAnimation ( zffloat contentOffset)
pure virtual

scroll without scroll animation, you should stop old scroll animation if necessary

Implemented in ZFUIScrollerDefault.

◆ scrollByPoint()

virtual void ZFUIScroller::scrollByPoint ( zffloat point)
pure virtual

◆ scrollByPointEndPoint()

virtual zffloat ZFUIScroller::scrollByPointEndPoint ( void )
pure virtual

return end position of scrollByPoint, must return current content offset if not scrolling

Implemented in ZFUIScrollerDefault.

◆ scrollBySpeed()

virtual void ZFUIScroller::scrollBySpeed ( zffloat speed)
pure virtual

◆ scrollBySpeedCurrentSpeed()

virtual zffloat ZFUIScroller::scrollBySpeedCurrentSpeed ( void )
pure virtual

return current speed of scrollBySpeed

Implemented in ZFUIScrollerDefault.

◆ scrollBySpeedEndPointPredicted()

virtual zffloat ZFUIScroller::scrollBySpeedEndPointPredicted ( void )
pure virtual

return end position of scrollBySpeed, must return current content offset if not scrolling

Implemented in ZFUIScrollerDefault.

◆ scrollEndPointPredicted()

virtual zffloat ZFUIScroller::scrollEndPointPredicted ( void )
pure virtual

return end position, must return current content offset if not scrolling

Implemented in ZFUIScrollerDefault.

◆ scrollRequireFocus()

virtual zfbool ZFUIScroller::scrollRequireFocus ( void )
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.

◆ scrollOwnerSize()

virtual zffloat ZFUIScroller::scrollOwnerSize ( void )
pure virtual

used to get current owner size

Implemented in ZFUIScrollerDefault.

◆ scrollContentOffset()

virtual zffloat ZFUIScroller::scrollContentOffset ( void )
pure virtual

used to get current content offset

Implemented in ZFUIScrollerDefault.

◆ scrollContentSize()

virtual zffloat ZFUIScroller::scrollContentSize ( void )
pure virtual

used to get current content size

Implemented in ZFUIScrollerDefault.

◆ scrollOnDragBegin()

virtual void ZFUIScroller::scrollOnDragBegin ( zffloat mousePos,
zftimet mouseTime )
pure virtual

drag begin

note drag events is not ensured paired

Implemented in ZFUIScrollerDefault.

◆ scrollOnDrag()

virtual void ZFUIScroller::scrollOnDrag ( zffloat mousePos,
zftimet mouseTime )
pure virtual

drag

note drag events is not ensured paired

Implemented in ZFUIScrollerDefault.

◆ scrollOnDragEnd()

virtual void ZFUIScroller::scrollOnDragEnd ( zftimet mouseTime,
zfbool needScrollAni )
pure virtual

drag end

note drag events is not ensured paired

if scroll animation is needed, use scrollAniStartCallback to start

Implemented in ZFUIScrollerDefault.

◆ scrollAniOnUpdate()

virtual void ZFUIScroller::scrollAniOnUpdate ( zftimet time)
pure virtual

called to update scroll animation

Implemented in ZFUIScrollerDefault.

Member Data Documentation

◆ scrollAniStartCallback

ZFListener ZFUIScroller::scrollAniStartCallback

used to start scroll animation's timer

impl must return a v_zftimet (stored in ZFArgs::result) to indicates current timestamp


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