ZFFramework
 
Loading...
Searching...
No Matches
ZFUINativeViewWrapper.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFUINativeViewWrapper_h_
7#define _ZFI_ZFUINativeViewWrapper_h_
8
9#include "ZFUIView.h"
11
12// ============================================================
13// ZFUINativeViewWrapper
26zffinal zfclass ZFLIB_ZFUIKit ZFUINativeViewWrapper : zfextend ZFUIView {
27 ZFOBJECT_DECLARE(ZFUINativeViewWrapper, ZFUIView)
28
29protected:
34
36 virtual void objectOnInit(void) {zfsuper::objectOnInit();}
37
38protected:
41
42public:
44 virtual void *nativeImplView(void) {
46 }
47
59
63 ZFMETHOD_DECLARE_2(void, measureNativeView
64 , ZFMP_OUT(ZFUISize &, ret)
65 , ZFMP_IN_OPT(const ZFUISize &, sizeHint, ZFUISizeInvalid())
66 )
67
68protected:
70 virtual void layoutOnMeasure(
71 ZF_OUT ZFUISize &ret
72 , ZF_IN const ZFUISize &sizeHint
73 , ZF_IN const ZFUISizeParam &sizeParam
74 );
75};
76
78#endif // #ifndef _ZFI_ZFUINativeViewWrapper_h_
79
#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_OUT
dummy macro that shows the param used as required output
Definition ZFCoreTypeDef_ClassType.h:188
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:196
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
#define zftrue
bool true type
Definition ZFCoreTypeDef_CoreType.h:107
#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 ZFMP_OUT(ParamType, paramName)
see ZFMP_IN
Definition ZFMethod.h:111
#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_2(ReturnType, MethodName, ZFMP_0, ZFMP_1)
see ZFMethod
Definition ZFMethodDeclare.h:1025
#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 ZFLIB_ZFUIKit
used to export symbols
Definition ZFUIKitDef.h:16
ZFUISize const & ZFUISizeInvalid(void)
(-1, -1)
Definition ZFUITypeDef.h:428
base class of all UI views
void(* ZFUIViewNativeImplViewDeleteCallback)(zfanyT< ZFUIView > const &view, void *nativeImplView)
see ZFUIView::nativeImplView
Definition ZFUIView.h:33
virtual void * nativeImplView(void)
native implementation view
Definition ZFUINativeViewWrapper.h:44
virtual void objectOnInit(void)
override this to init your object
Definition ZFUINativeViewWrapper.h:36
virtual void objectInfoImplAppend(zfstring &ret)
see objectInfo
virtual void layoutOnMeasure(ZFUISize &ret, const ZFUISize &sizeHint, const ZFUISizeParam &sizeParam)
called by layoutMeasure to decide the view's size
virtual void nativeImplView(void *nativeImplView, ZFUIViewNativeImplViewDeleteCallback nativeImplViewDeleteCallback=zft_zfnull, zfbool nativeImplViewRequireVirtualIndex=_ZFT_t_zftrue)
see nativeImplView
Definition ZFUINativeViewWrapper.h:52
2D size
Definition ZFUITypeDef.h:397
2D size
Definition ZFUIViewType.h:41
virtual void * nativeImplView()
native implementation view
virtual void objectOnInit(void)
override this to init your object
virtual zfbool nativeImplViewRequireVirtualIndex()
whether the nativeImplView cost one virtualIndex