ZFFramework
 
Loading...
Searching...
No Matches
ZFUIScrollerDefault.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFUIScrollerDefault_h_
7#define _ZFI_ZFUIScrollerDefault_h_
8
9#include "ZFUIScroller.h"
11
12zfclassFwd _ZFP_ZFUIScrollerDefaultPrivate;
16zfclass ZFLIB_ZFUIKit ZFUIScrollerDefault : zfextend ZFObject, zfimplement ZFUIScroller {
17 ZFOBJECT_DECLARE(ZFUIScrollerDefault, ZFObject)
18 ZFIMPLEMENT_DECLARE(ZFUIScroller)
19
20protected:
22 virtual void objectOnInit(void);
24 virtual void objectOnDealloc(void);
25
26public:
28 virtual void scrollOwnerSizeOnUpdate(ZF_IN zffloat ownerSize);
31 ZF_IN zfbool scrollBounce
32 , ZF_IN zfbool scrollBounceAlways
33 );
35 virtual void scrollAlignToPageOnUpdate(ZF_IN zfbool scrollAlignToPage);
38 ZF_IN zffloat contentOffset
39 , ZF_IN zffloat contentSize
40 );
41
42public:
44 virtual void scrollToFitRange(void);
46 virtual void scrollWithoutAnimation(ZF_IN zffloat contentOffset);
48 virtual void scrollByPoint(ZF_IN zffloat point);
52 virtual void scrollBySpeed(ZF_IN zffloat speed);
57
60
63
64public:
66 virtual zffloat scrollOwnerSize(void);
71
72public:
74 virtual void scrollOnDragBegin(
75 ZF_IN zffloat mousePos
76 , ZF_IN zftimet mouseTime
77 );
79 virtual void scrollOnDrag(
80 ZF_IN zffloat mousePos
81 , ZF_IN zftimet mouseTime
82 );
84 virtual void scrollOnDragEnd(
85 ZF_IN zftimet mouseTime
86 , ZF_IN zfbool needScrollAni
87 );
88
89public:
91 virtual void scrollAniOnUpdate(ZF_IN zftimet time);
92
93private:
94 _ZFP_ZFUIScrollerDefaultPrivate *d;
95};
96
98#endif // #ifndef _ZFI_ZFUIScrollerDefault_h_
99
#define zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define zfoverride
dummy macro shows that method override parent's method
Definition ZFCoreTypeDef_ClassType.h:58
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define zfclassFwd
forward declaration of a class type
Definition ZFCoreTypeDef_ClassType.h:31
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
_zft_zftimet zftimet
time unit, ensured at least 64 bit, ensured signed
Definition ZFCoreTypeDef_CoreType.h:203
_zft_zffloat zffloat
same as float, see zfindex
Definition ZFCoreTypeDef_CoreType.h:183
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
#define zfclass
same as class, shows that this class is a ZFObject type
Definition ZFObjectClassTypeFwd.h:38
#define ZFOBJECT_DECLARE(ChildClass, SuperClass,...)
necessary for every class inherit from ZFObject
Definition ZFObjectDeclare.h:126
#define ZFIMPLEMENT_DECLARE(ImplementedInterfaces,...)
see ZFINTERFACE_DECLARE
Definition ZFObjectInterface.h:169
#define zfimplement
shows class implement from interface, see ZFInterface
Definition ZFObjectInterface.h:24
#define ZFLIB_ZFUIKit
used to export symbols
Definition ZFUIKitDef.h:16
scroller for ZFUIScrollView
virtual void scrollAniOnUpdate(zftimet time)
called to update scroll animation
virtual void objectOnInit(void)
override this to init your object
virtual void scrollBySpeed(zffloat speed)
see ZFUIScrollView::scrollBySpeed
virtual zffloat scrollBySpeedCurrentSpeed(void)
return current speed of scrollBySpeed
virtual void scrollOnDragBegin(zffloat mousePos, zftimet mouseTime)
drag begin
virtual void scrollByPoint(zffloat point)
see ZFUIScrollView::scrollByPoint
virtual void scrollOnDragEnd(zftimet mouseTime, zfbool needScrollAni)
drag end
virtual void scrollBounceOnUpdate(zfbool scrollBounce, zfbool scrollBounceAlways)
whether use bounce
virtual void scrollContentOnUpdate(zffloat contentOffset, zffloat contentSize)
used to update scroll content, you should keep or update previous scroll animation if necessary
virtual zffloat scrollBySpeedEndPointPredicted(void)
return end position of scrollBySpeed, must return current content offset if not scrolling
virtual void scrollOwnerSizeOnUpdate(zffloat ownerSize)
called when owner scroll view's size changed, you should fix content frame to match bounds if necessa...
virtual void objectOnDealloc(void)
override this to destroy your object
virtual zffloat scrollContentSize(void)
used to get current content size
virtual zffloat scrollContentOffset(void)
used to get current content offset
virtual zffloat scrollOwnerSize(void)
used to get current owner size
virtual zffloat scrollEndPointPredicted(void)
return end position, must return current content offset if not scrolling
virtual void scrollOnDrag(zffloat mousePos, zftimet mouseTime)
drag
virtual zfbool scrollRequireFocus(void)
whether this direction's scroller want higher priority, typically true if currently under progress to...
virtual void scrollAlignToPageOnUpdate(zfbool scrollAlignToPage)
whether align to page
virtual zffloat scrollByPointEndPoint(void)
return end position of scrollByPoint, must return current content offset if not scrolling
virtual void scrollWithoutAnimation(zffloat contentOffset)
scroll without scroll animation, you should stop old scroll animation if necessary
virtual void scrollToFitRange(void)
cancel over scroll and ensure content offset in range