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

abstract scroll thumb for ZFUIScrollView More...

#include <ZFUIScrollThumb.h>

Inheritance diagram for ZFUIScrollThumb:
ZFInterface ZFUIScrollThumbDefault

Public Member Functions

zfanyT< ZFUIScrollView > const & scrollView (void)
 owner scroll view
zfbool scrollThumbHorizontal (void)
 this thumb is horizontal or not
virtual void scrollThumbInit (void)=0
 init the scroll thumb
virtual void scrollThumbDealloc (void)=0
 destroy the scroll thumb
virtual void scrollThumbUpdate (void)=0
 update the scroll thumb, this method may be called repeatly
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 zfidentity E_ScrollThumbOnUpdate (void)
 see ZFObject::observerNotify
static void scrollThumbPosFromViewPos (zffloat &scrollThumbResultPos, zffloat &scrollThumbResultSize, zffloat scrollThumbRange, zffloat scrollViewSize, zffloat scrollContentOffset, zffloat scrollContentSize, zffloat scrollThumbMinSize, zffloat headMargin=0, zffloat tailMargin=0)
 util method to calculate scroll thumb's position according to view's position
static void scrollThumbPosToViewPos (zffloat &scrollContentOffset, zffloat scrollViewSize, zffloat scrollContentSize, zffloat scrollThumbPos, zffloat scrollThumbSize, zffloat scrollThumbRange, zffloat headMargin=0, zffloat tailMargin=0)
 util method to calculate view's position according to scroll thumb's position
Static Public Member Functions inherited from ZFInterface
static const ZFClassClassData (void)
 get class info

Protected Types

typedef ZFInterface zfsuper
 typedef for super (always ZFInterface for an interface type)
typedef ZFUIScrollThumb 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

Friends

class ZFUIScrollView

Detailed Description

abstract scroll thumb for ZFUIScrollView

Member Function Documentation

◆ E_ScrollThumbOnUpdate()

zfidentity ZFUIScrollThumb::E_ScrollThumbOnUpdate ( void )
static

see ZFObject::observerNotify

called when thumb updated

◆ scrollThumbPosFromViewPos()

void ZFUIScrollThumb::scrollThumbPosFromViewPos ( zffloat & scrollThumbResultPos,
zffloat & scrollThumbResultSize,
zffloat scrollThumbRange,
zffloat scrollViewSize,
zffloat scrollContentOffset,
zffloat scrollContentSize,
zffloat scrollThumbMinSize,
zffloat headMargin = 0,
zffloat tailMargin = 0 )
static

util method to calculate scroll thumb's position according to view's position

0 result size means no need to show the scroll thumb

◆ scrollThumbInit()

virtual void ZFUIScrollThumb::scrollThumbInit ( void )
pure virtual

init the scroll thumb

Implemented in ZFUIScrollThumbDefault.

◆ scrollThumbDealloc()

virtual void ZFUIScrollThumb::scrollThumbDealloc ( void )
pure virtual

destroy the scroll thumb

Implemented in ZFUIScrollThumbDefault.

◆ scrollThumbUpdate()

virtual void ZFUIScrollThumb::scrollThumbUpdate ( void )
pure virtual

update the scroll thumb, this method may be called repeatly

you may update thumb depending on ZFUIScrollView::scrollViewState

Implemented in ZFUIScrollThumbDefault.


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