6#ifndef _ZFI_ZFAnimation_h_
7#define _ZFI_ZFAnimation_h_
166 zffinal void _ZFP_ZFAnimation_aniDummyNotifyStop(
void);
216 _ZFP_ZFAnimationPrivate *d;
zftimet & ZFAniDuration(void)
global default animation duration, 250 by default
Definition ZFAnimation.h:15
#define zffinal
dummy macro shows that a method or class is designed must not to be overrided
Definition ZFCoreTypeDef_ClassType.h:63
#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 ZF_IN_OPT
dummy macro that shows the param used as optional input
Definition ZFCoreTypeDef_ClassType.h:184
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:196
#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_t_zfindex zfindex
similar to size_t, used for index and size only
Definition ZFCoreTypeDef_CoreType.h:154
#define zftrue
bool true type
Definition ZFCoreTypeDef_CoreType.h:107
_zft_zftimet zftimet
time unit, ensured at least 64 bit, ensured signed
Definition ZFCoreTypeDef_CoreType.h:203
_zft_zfidentity zfidentity
identity type, ensured at least 32 bit, ensured unsigned
Definition ZFCoreTypeDef_CoreType.h:225
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
#define ZFEXPORT_VAR_DECLARE(ZFLIB_, Type, Name)
util to export global variable
Definition ZFExport.h:68
#define ZFMP_IN_OPT(ParamType, paramName, DefaultValue)
see ZFMP_IN
Definition ZFMethod.h:108
#define ZFMP_IN(ParamType, paramName)
macro to wrap param types for ZFMETHOD_INLINE_0 series
Definition ZFMethod.h:105
#define ZFMETHOD_DECLARE_0(ReturnType, MethodName)
see ZFMethod
Definition ZFMethodDeclare.h:693
#define ZFMETHOD_DECLARE_1(ReturnType, MethodName, ZFMP_0)
see ZFMethod
Definition ZFMethodDeclare.h:854
#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_ON_INIT_DECLARE_1(ZFMP_0)
see ZFOBJECT_ON_INIT_INLINE_1
Definition ZFObjectDeclare.h:263
#define ZFOBJECT_DECLARE(ChildClass, SuperClass,...)
necessary for every class inherit from ZFObject
Definition ZFObjectDeclare.h:126
#define ZFEVENT(YourEvent)
see ZFObject::observerNotify
Definition ZFObjectObserver.h:328
#define ZFPROPERTY_RETAIN(Type, Name,...)
declare a retain property
Definition ZFPropertyDeclare.h:104
#define ZFPROPERTY_ASSIGN(Type, Name,...)
see ZFPROPERTY_RETAIN
Definition ZFPropertyDeclare.h:128
void ZFObjectPropertyInfoT(zfstring &ret, ZFObject *obj, zfindex maxCount=((zfindex) -1), const ZFTokenForKeyValueContainer &token=_ZFP_ZFTokenForKeyValueContainerDefault)
use reflect to print all property if the property is not ZFPropertyIsInitValue
v_ZFResultType::ZFEnumType ZFResultType
see v_ZFResultType
Definition ZFResultType.h:23
global header for ZFUtility module
#define ZFLIB_ZFUtility
used to export symbols
Definition ZFUtilityDef.h:15
virtual void taskOnStop(ZFResultType resultType)
called to stop task
virtual zfanyT< ZFAnimation > const & impl()
the impl
Definition ZFAnimation.h:228
virtual void objectInfoImpl(zfstring &ret)
see objectInfo
virtual void objectOnInit(void)
override this to init your object
Definition ZFAnimation.h:232
virtual void taskOnStart(void)
called to start task
base class of all animation
Definition ZFAnimation.h:22
virtual void stop()
stop the animation or do nothing if not started
virtual void aniOnStart(void)
see E_AniOnStart
Definition ZFAnimation.h:177
virtual void start(const ZFListener &onStop=(zft_zfnull))
start the animation
virtual void aniOnStop(ZFResultType resultType)
see E_AniOnStop
Definition ZFAnimation.h:185
static zfidentity E_AniOnLoop(void)
see ZFObject::observerNotify
virtual zftimet durationFixed()
util method to duration
virtual void objectInfoImplAppend(zfstring &ret)
see objectInfo
Definition ZFAnimation.h:210
virtual zfindex & loop()
loop count, 0 by default
Definition ZFAnimation.h:68
virtual void objectOnDealloc(void)
override this to destroy your object
virtual zfbool started()
true if the animation is running
virtual void objectOnInit(ZFObject *target)
init with target
virtual void aniOnStop(const ZFListener &cb)
util to attach observer
virtual void aniImplStop(void)
for subclass to stop actual animation
virtual zfidentity aniId()
get current animation's id
void aniImplNotifyStop(ZFResultType resultType=v_ZFResultType::e_Success)
subclass must notify after the animation stop
virtual void target(ZFObject *target)
animation's target, assign only, but would be retain automatically while animation is running
virtual void aniOnLoop(void)
see E_AniOnLoop
Definition ZFAnimation.h:181
virtual void aniImplTargetOnUpdate(ZFObject *targetOld)
called when target changed
Definition ZFAnimation.h:153
virtual void aniOnLoop(const ZFListener &cb)
util to attach observer
virtual void objectOnDeallocPrepare(void)
called before objectOnDealloc, safe to call virtual functions here
static zfidentity E_AniOnStart(void)
see ZFObject::observerNotify
virtual zfanyT< ZFCurve > const & curve()
curve for animation, null to use linear curve, null by default
Definition ZFAnimation.h:75
virtual zftimet & duration()
animation's duration in miliseconds, 0 to use ZFAniDuration, 0 by default
Definition ZFAnimation.h:57
virtual zfbool aniImplCheckValid(void)
called to check whether the animation is currently valid, an invalid animation is ensured can't be st...
Definition ZFAnimation.h:161
virtual zfbool stoppedByUser()
true if the animation is stopped by calling stop
virtual zfbool valid()
check whether animation is valid, see aniImplCheckValid
virtual zfindex loopCur()
current loop count, 0 for first time
static zfidentity E_AniOnStop(void)
see ZFObject::observerNotify
virtual void aniOnStart(const ZFListener &cb)
util to attach observer
virtual void aniImplStart(void)
for subclass to achieve actual animation
time based event driver
Definition ZFCurve.h:18
listener as ZFCallback, mostly used by ZFObject::observerNotify
Definition ZFObjectObserver.h:30
virtual void objectInfoImplAppend(zfstring &ret)
see objectInfo
Definition ZFObjectCore.h:331
void observerNotify(zfidentity eventId, ZFObject *param0=zft_zfnull, ZFObject *param1=zft_zfnull)
notify the observer with eventId
virtual ZFResultType & resultType()
for task impl to store task result, reset to success when start
Definition ZFTask.h:84
virtual void objectOnInit(const ZFListener &implOnStart, const ZFListener &implOnStop=(zft_zfnull))
util constructor to attach custom impl to E_TaskOnStart and E_TaskOnStop
@ e_Success
Definition ZFResultType.h:16
util method to cast ZFObject types freely
Definition zfany.h:35
see zfany
Definition zfany.h:106
util class to alloc and hold ZFObject type
Definition ZFObjectAutoPtr.h:157