ZFFramework
 
Loading...
Searching...
No Matches
ZFUIImageView.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFUIImageView_h_
7#define _ZFI_ZFUIImageView_h_
8
9#include "ZFUIView.h"
10#include "ZFUIImage.h"
12
13// ============================================================
14// ZFUIImageView
18zfclass ZFLIB_ZFUIKit ZFUIImageView : zfextend ZFUIView {
19 ZFOBJECT_DECLARE(ZFUIImageView, ZFUIView)
21
22public:
23 // ============================================================
24 // properties
27
34
39
45
51
52public:
57 , ZFMP_OUT(ZFUISize &, ret)
58 )
59
60protected:
66 virtual void objectOnInit(void);
68 virtual void objectOnDeallocPrepare(void);
69
72
73protected:
78 ZF_OUT ZFUIRect &ret
79 , ZF_IN const ZFUIRect &bounds
81 );
86 virtual void layoutOnMeasure(
87 ZF_OUT ZFUISize &ret
88 , ZF_IN const ZFUISize &sizeHint
89 , ZF_IN const ZFUISizeParam &sizeParam
90 );
91
93 virtual void viewTreeVisibleOnUpdate(void);
94
95private:
96 ZFListener _ZFP_imageStateOnUpdateListener;
97 void _ZFP_imageStateAttach(void);
98 void _ZFP_imageStateDetach(void);
99};
100
102#endif // #ifndef _ZFI_ZFUIImageView_h_
103
#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
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(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 ZFPROPERTY_RETAIN(Type, Name,...)
declare a retain property
Definition ZFPropertyDeclare.h:104
#define ZFPROPERTY_ON_DETACH_DECLARE(Type, Name)
see ZFPROPERTY_ON_INIT_DECLARE
Definition ZFPropertyDeclare.h:258
#define ZFPROPERTY_ASSIGN(Type, Name,...)
see ZFPROPERTY_RETAIN
Definition ZFPropertyDeclare.h:128
#define ZFPROPERTY_ON_INIT_DECLARE(Type, Name)
override life cycle callback for the property
Definition ZFPropertyDeclare.h:208
#define ZFPROPERTY_ON_ATTACH_DECLARE(Type, Name)
see ZFPROPERTY_ON_INIT_DECLARE
Definition ZFPropertyDeclare.h:248
#define ZFSTYLE_DEFAULT_DECLARE(YourStyle)
used to declare a default style, see ZFStyleable
Definition ZFStyleable.h:262
#define ZFLIB_ZFUIKit
used to export symbols
Definition ZFUIKitDef.h:16
v_ZFUIScaleType::ZFEnumType ZFUIScaleType
see v_ZFUIScaleType
Definition ZFUITypeDef.h:1487
base class of all UI views
listener as ZFCallback, mostly used by ZFObject::observerNotify
Definition ZFObjectObserver.h:30
image storage
Definition ZFUIImage.h:30
virtual void nativeImplViewMarginImplUpdate(ZFUIMargin &nativeImplViewMargin)
see nativeImplViewMargin, subclass must call super and "append" to existing margin
virtual zfautoT< ZFUIImage > imageState()
util method to access ZFUIImage::imageState
virtual void nativeImplViewOnLayout(ZFUIRect &ret, const ZFUIRect &bounds, const ZFUIMargin &nativeImplViewMargin)
called to layout nativeImplView
virtual void layoutOnMeasure(ZFUISize &ret, const ZFUISize &sizeHint, const ZFUISizeParam &sizeParam)
image view would measure according image size
virtual void measureImageView(ZFUISize &ret)
measure image view according to current image
virtual void objectInfoImplAppend(zfstring &ret)
see objectInfo
virtual void objectOnDeallocPrepare(void)
called before objectOnDealloc, safe to call virtual functions here
virtual void viewTreeVisibleOnUpdate(void)
see E_ViewTreeVisibleOnUpdate
virtual void objectOnInit(ZFUIImage *image)
init with image
virtual zfanyT< ZFUIImage > const & image()
image for this view
Definition ZFUIImageView.h:31
virtual ZFUIScaleType & imageScaleType()
image scale type, fill by default
Definition ZFUIImageView.h:43
virtual ZFUIMargin & imageMargin()
margin of the content image
Definition ZFUIImageView.h:49
margin
Definition ZFUITypeDef.h:147
2D rectangle
Definition ZFUITypeDef.h:636
2D size
Definition ZFUITypeDef.h:397
2D size
Definition ZFUIViewType.h:41
virtual zfbool & viewUIEnableTree()
whether the view as well as all its children should receive user interaction, see viewUIEnable
Definition ZFUIView.h:300
virtual zfbool & viewUIEnable()
whether the view should receive user interaction (doesn't affect children, see viewUIEnableTree)
Definition ZFUIView.h:293
virtual const ZFUIMargin & nativeImplViewMargin()
inner margin between ZFUIView and the internal nativeImplView
scale type when stretch items
Definition ZFUITypeDef.h:1434
see zfany
Definition zfany.h:106
type restrict version of zfauto
Definition zfautoFwd.h:110