ZFFramework
 
Loading...
Searching...
No Matches
ZFUIGridLayout.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFUIGridLayout_h_
7#define _ZFI_ZFUIGridLayout_h_
8
9#include "ZFUIFlowLayout.h"
11
12// ============================================================
13// ZFUIGridLayoutParam
22zfclass ZFLIB_ZFUIWidget ZFUIGridLayoutParam : zfextend ZFUIFlowLayoutParam {
23 ZFOBJECT_DECLARE(ZFUIGridLayoutParam, ZFUIFlowLayoutParam)
24
25public:
27 /* ZFTAG_TRICKS: util for chained call to build view tree */
29 ZF_IN const zfany &view
30 , ZF_IN_OPT zfindex atIndex = zfindexMax()
31 ) {
32 return zfsuper::child(view, atIndex);
33 }
35};
36
37// ============================================================
38// ZFUIGridLayout
45zfclass ZFLIB_ZFUIWidget ZFUIGridLayout : zfextend ZFUIFlowLayout {
46 ZFOBJECT_DECLARE(ZFUIGridLayout, ZFUIFlowLayout)
48
49public:
52
53 // ============================================================
54 // override ZFUIView
55public:
57 /* ZFTAG_TRICKS: util for chained call to build view tree */
59 ZF_IN const zfany &view
60 , ZF_IN_OPT zfindex atIndex = zfindexMax()
61 ) {
62 return zfsuper::child(view, atIndex);
63 }
65protected:
67 virtual const ZFClass *layoutParamClass(void) {
69 }
70};
71
73#endif // #ifndef _ZFI_ZFUIGridLayout_h_
74
#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
_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 zfindexMax()
(zfindex)-1, indicate a max index value, see zfindex
Definition ZFCoreTypeDef_CoreType.h:159
#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 ZFPROPERTY_ON_INIT_DECLARE_NO_AUTO_INIT(Type, Name)
see ZFPROPERTY_ON_INIT_DECLARE
Definition ZFPropertyDeclare.h:213
#define ZFSTYLE_DEFAULT_DECLARE(YourStyle)
used to declare a default style, see ZFStyleable
Definition ZFStyleable.h:262
flow container view
v_ZFUIScaleType::ZFEnumType ZFUIScaleType
see v_ZFUIScaleType
Definition ZFUITypeDef.h:1487
#define ZFLIB_ZFUIWidget
used to export symbols
Definition ZFUIWidgetDef.h:17
ZFObject's class info.
Definition ZFClass.h:67
virtual ZFUIScaleType & childScaleType()
valid only when gridMode, indicates how to scale children
Definition ZFUIFlowLayout.h:100
virtual zfbool & gridMode()
whether in grid mode, which makes all children have same size
Definition ZFUIFlowLayout.h:94
virtual const ZFClass * layoutParamClass(void)
see layoutParamCreate
Definition ZFUIGridLayout.h:67
layout param for ZFUIGridLayout
Definition ZFUIGridLayout.h:22
static const ZFClass * ClassData(void)
get class info
Definition ZFUIGridLayout.h:23
zfanyT< ZFUILayoutParam > child(const zfany &view, zfindex atIndex=((zfindex) -1))
util method to add sibling child to owner parent, for convenient for chained call
zfanyT< ZFUILayoutParam > child(const zfany &view, zfindex atIndex=((zfindex) -1))
add child and return child's layoutParam, see childWithParam
util method to cast ZFObject types freely
Definition zfany.h:35
see zfany
Definition zfany.h:106