flow container view that layout children in linear, and exceeds to next line or column if no enough space More...
#include <ZFUIFlowLayout.h>
Public Types | |
enum | |
![]() | |
enum | |
![]() | |
enum | |
![]() | |
enum | |
Public Member Functions | |
virtual const ZFClass * | classData (void) |
get instance's class info | |
virtual ZFUIOrientation & | orientation () |
main direction to layout children, v_ZFUIOrientation::e_Left by default | |
virtual void | orientation (ZFUIOrientation const &propertyValue) |
see orientation | |
virtual ZFUIOrientation & | orientationSecondary () |
secondary direction to layout children, v_ZFUIOrientation::e_Top by default | |
virtual void | orientationSecondary (ZFUIOrientation const &propertyValue) |
see orientationSecondary | |
virtual zfbool & | gridMode () |
whether in grid mode, which makes all children have same size | |
virtual void | gridMode (zfbool const &propertyValue) |
see gridMode | |
virtual ZFUIScaleType & | childScaleType () |
valid only when gridMode, indicates how to scale children | |
virtual void | childScaleType (ZFUIScaleType const &propertyValue) |
see childScaleType | |
virtual zfindex & | childCountPerLine () |
max child count per line, 0 means no limit | |
virtual void | childCountPerLine (zfindex const &propertyValue) |
see childCountPerLine | |
virtual ZFUIMargin & | childMargin () |
extra margin independent from children's layout param's margin, ZFUIMarginZero by default | |
virtual void | childMargin (ZFUIMargin const &propertyValue) |
see childMargin | |
virtual zffloat & | childSpaceX () |
extra space between each child independent from children's layout param, in x direction, 0 by default | |
virtual void | childSpaceX (zffloat const &propertyValue) |
see childSpaceX | |
virtual zffloat & | childSpaceY () |
extra space between each child independent from children's layout param, in y direction, 0 by default | |
virtual void | childSpaceY (zffloat const &propertyValue) |
see childSpaceY | |
![]() | |
virtual void | serializableRefLayoutParam (ZFUILayoutParam *serializableRefLayoutParam) |
store ref layout param for this view for reducing serialization output size | |
virtual ZFUILayoutParam * | serializableRefLayoutParam (void) |
see serializableRefLayoutParam | |
virtual zfstring & | viewId () |
used to identify a view, empty by default | |
virtual void | viewId (zfstring const &propertyValue) |
see viewId | |
virtual zfbool & | visible () |
visible or not, zftrue by default | |
virtual void | visible (zfbool const &propertyValue) |
see visible | |
virtual zfbool | viewTreeInWindow () |
true if added to ZFUISysWindow | |
virtual zfbool | viewTreeVisible () |
true only if added to ZFUISysWindow and all of parents are visible | |
virtual zffloat & | alpha () |
view's alpha, 1 by default | |
virtual void | alpha (zffloat const &propertyValue) |
see alpha | |
virtual zfbool & | viewUIEnable () |
whether the view should receive user interaction (doesn't affect children, see viewUIEnableTree) | |
virtual void | viewUIEnable (zfbool const &propertyValue) |
see viewUIEnable | |
virtual zfbool & | viewUIEnableTree () |
whether the view as well as all its children should receive user interaction, see viewUIEnable | |
virtual void | viewUIEnableTree (zfbool const &propertyValue) |
see viewUIEnableTree | |
virtual zfbool | viewUIEnableFixed () |
true if viewUIEnable and all of parents are viewUIEnableTree | |
virtual zfbool | viewUIEnableTreeFixed () |
true if viewUIEnableTree and all of parents are viewUIEnableTree | |
virtual zfbool & | mouseHoverEnable () |
whether enable mouse hover event, see ZFUIView::viewEventOnMouseEvent, false by default | |
virtual void | mouseHoverEnable (zfbool const &propertyValue) |
see mouseHoverEnable | |
virtual zfbool & | focusable () |
whether the view can be focused, false by default | |
virtual void | focusable (zfbool const &propertyValue) |
see focusable | |
virtual zfbool & | focusObtainWhenClick () |
whether try to obtain focus when clicked down, true by default | |
virtual void | focusObtainWhenClick (zfbool const &propertyValue) |
see focusObtainWhenClick | |
virtual ZFUIRect const & | viewFrame () |
the view's frame | |
virtual void | viewFrame (ZFUIRect const &viewFrame) |
see viewFrame | |
virtual const ZFUIRect & | viewFramePrev () |
previous viewFrame | |
virtual zfbool | viewFrameOverrided () |
true if viewFrame changed by user, use viewFrameReset to reset | |
virtual void | viewFrameReset () |
see viewFrame | |
virtual zffloat | x () |
see viewFrame | |
virtual void | x (zffloat const &propertyValue) |
see viewFrame | |
virtual zffloat | y () |
see viewFrame | |
virtual void | y (zffloat const &propertyValue) |
see viewFrame | |
virtual zffloat | width () |
see viewFrame | |
virtual void | width (zffloat const &propertyValue) |
see viewFrame | |
virtual zffloat | height () |
see viewFrame | |
virtual void | height (zffloat const &propertyValue) |
see viewFrame | |
virtual zffloat | centerX () |
see viewFrame | |
virtual void | centerX (zffloat const &propertyValue) |
see viewFrame | |
virtual zffloat | centerY () |
see viewFrame | |
virtual void | centerY (zffloat const &propertyValue) |
see viewFrame | |
virtual void | viewSizeFixed (const ZFUISize &size) |
util method to set fixed size, by setting both of viewSizeMin and viewSizeMax | |
virtual void | viewSizeFixed (zffloat width, zffloat height) |
see viewSizeFixed | |
virtual ZFUISize & | viewSizeMin () |
min size, ZFUISizeZero by default | |
virtual void | viewSizeMin (ZFUISize const &propertyValue) |
see viewSizeMin | |
virtual ZFUISize & | viewSizeMax () |
max size, negative value means not set, ZFUISizeInvalid by default | |
virtual void | viewSizeMax (ZFUISize const &propertyValue) |
see viewSizeMax | |
virtual ZFUIColor & | bgColor () |
background color, ZFUIColorZero by default | |
virtual void | bgColor (ZFUIColor const &propertyValue) |
see bgColor | |
virtual zffloat & | translateX () |
see transformAvailable | |
virtual void | translateX (zffloat const &propertyValue) |
see translateX | |
virtual zffloat & | translateY () |
see transformAvailable | |
virtual void | translateY (zffloat const &propertyValue) |
see translateY | |
virtual zffloat & | translateZ () |
see transformAvailable | |
virtual void | translateZ (zffloat const &propertyValue) |
see translateZ | |
virtual zffloat & | scaleX () |
see transformAvailable | |
virtual void | scaleX (zffloat const &propertyValue) |
see scaleX | |
virtual zffloat & | scaleY () |
see transformAvailable | |
virtual void | scaleY (zffloat const &propertyValue) |
see scaleY | |
virtual zffloat & | scaleZ () |
see transformAvailable | |
virtual void | scaleZ (zffloat const &propertyValue) |
see scaleZ | |
virtual zffloat & | rotateX () |
see transformAvailable | |
virtual void | rotateX (zffloat const &propertyValue) |
see rotateX | |
virtual zffloat & | rotateY () |
see transformAvailable | |
virtual void | rotateY (zffloat const &propertyValue) |
see rotateY | |
virtual zffloat & | rotateZ () |
see transformAvailable | |
virtual void | rotateZ (zffloat const &propertyValue) |
see rotateZ | |
virtual void | bind (ZFObject *owner, const zfstring &propertyName) |
util method to bind this view to owner's property, and auto setup viewId if not set | |
virtual void | bindEvent (const zfstring &eventName, ZFObject *owner, const zfstring &methodName) |
util method to bind this view's event to owner's method | |
virtual void | bindEvent (zfidentity eventId, ZFObject *owner, const zfstring &methodName) |
util method to bind this view's event to owner's method, see bindEvent | |
virtual void * | nativeImplView () |
native implementation view | |
virtual zfbool | nativeImplViewRequireVirtualIndex () |
whether the nativeImplView cost one virtualIndex | |
virtual const ZFUIMargin & | nativeImplViewMargin () |
inner margin between ZFUIView and the internal nativeImplView | |
virtual void | nativeImplViewMarginUpdate () |
see nativeImplViewMargin, layoutRequest if the final value actually changed | |
virtual const ZFUIRect & | nativeImplViewFrame () |
frame of nativeImplView | |
virtual ZFUIMargin & | nativeImplViewMarginCustom () |
see nativeImplViewMargin, ZFUIMarginZero by default | |
virtual void | nativeImplViewMarginCustom (ZFUIMargin const &propertyValue) |
see nativeImplViewMarginCustom | |
virtual void * | nativeView () |
native container view | |
virtual zfbool | focused () |
whether the view currently focused | |
virtual void | focusRequest (zfbool focus) |
request to obtain or resign focus, result can be checked by focused | |
virtual zfanyT< ZFUIView > | focusFind () |
recursively to find focused child, take care of performance | |
virtual zfanyT< ZFUIView > | parent () |
parent view or null if none | |
virtual void | removeFromParent () |
remove this view from parent or do nothing if no parent | |
virtual zffloat & | UIScale () |
UI scale for view tree. | |
virtual void | UIScale (zffloat const &propertyValue) |
see UIScale | |
virtual zffloat | UIScaleInherited () |
see UIScale | |
virtual zffloat | UIScaleForImpl () |
see UIScale | |
virtual zffloat | UIScaleForPixel () |
see UIScale | |
virtual zffloat | UIScaleFixed () |
see UIScale | |
virtual zfautoT< ZFUILayoutParam > | layoutParamCreate () |
create layout param, calling layoutParamClass to create instance and layoutParamOnUpdate to update | |
virtual void | layoutParam (ZFUILayoutParam *layoutParam) |
manually set layout param | |
virtual zfanyT< ZFUILayoutParam > | layoutParam () |
get self's layout param, valid only while the view has parent | |
virtual void | layoutRequest () |
set need layout | |
virtual zfbool | layoutRequested () |
true if need layout | |
virtual zfbool | layouting () |
true if currently being layouted | |
virtual const ZFUISize & | layoutMeasure (const ZFUISize &sizeHint, const ZFUISizeParam &sizeParam) |
measure the view | |
virtual const ZFUISize & | layoutMeasuredSize () |
get measured size, invalid if not measured | |
virtual void | layoutIfNeed () |
force to layout if need | |
virtual ZFUIPoint | layoutChildOffset () |
get child offset to this view | |
virtual zfanyT< ZFUIView > | childFindById (const zfstring &viewId, zfbool findRecursively=(_ZFT_t_zftrue), zfbool includeInternalViews=(_ZFT_t_zffalse)) |
find view by viewId, return the view or null if not found | |
virtual zfanyT< ZFUIView > | childFindByClass (const ZFClass *cls, zfbool findRecursively=(_ZFT_t_zftrue), zfbool includeInternalViews=(_ZFT_t_zffalse)) |
find view by class, return the view or null if not found | |
virtual zfauto | childForEach (const ZFListener &impl, zfbool findRecursively=(_ZFT_t_zftrue), zfbool includeInternalViews=(_ZFT_t_zffalse)) |
call custom impl for each child | |
virtual zfanyT< ZFUILayoutParam > | childWithParam (ZFUIView *view, ZFUILayoutParam *layoutParam, zfindex atIndex=(((zfindex) -1))) |
add view with layout param, param must be created by layoutParamCreate | |
zfanyT< ZFUILayoutParam > | child (const zfany &view, zfindex atIndex=((zfindex) -1)) |
add child and return child's layoutParam, see childWithParam | |
virtual void | childRemove (ZFUIView *view) |
remove view or do nothing if view isn't added to this view | |
virtual void | childRemoveAt (zfindex index) |
remove view at index or assert fail if index out of range | |
virtual void | childRemoveAll () |
remove all child view | |
virtual void | childMove (zfindex fromIndex, zfindex toIndexOrIndexMax) |
move view, make toIndexOrIndexMax as zfindexMax() to move to top most, and 0 to bottom most, do nothing if index invalid or have no change | |
virtual void | childMove (ZFUIView *child, zfindex toIndexOrIndexMax) |
see childMove | |
virtual void | childReplaceAt (zfindex atIndex, ZFUIView *toReplace) |
replace child at index, assert fail if index out of range or view to replace already has parent | |
virtual zfindex | childCount () |
get child view count | |
virtual zfanyT< ZFUIView > | childAt (zfindex index) |
get child view at index or assert fail if out of range | |
virtual zfindex | childFind (ZFUIView *view) |
return index of view or zfindexMax() if not child of this view | |
virtual ZFCoreArray< zfautoT< ZFUIView > > | childArray () |
get the child view array | |
virtual ZFUIViewChildLayer | viewLayer () |
this view belongs to which layer of parent, valid only if parent is not null | |
virtual ZFCoreArray< zfautoT< ZFUIView > > | childRawArray () |
return all children including internal views, see childArray | |
virtual zfanyT< ZFUILayoutParam > | internalImplViewAdd (ZFUIView *view, ZFUILayoutParam *layoutParam=(zft_zfnull), zfbool addAsTopMost=(_ZFT_t_zftrue)) |
see internalBgViewAdd | |
virtual void | internalImplViewRemove (ZFUIView *view) |
see internalBgViewAdd | |
virtual ZFCoreArray< zfautoT< ZFUIView > > | internalImplViewArray () |
see internalBgViewAdd | |
virtual zfanyT< ZFUILayoutParam > | internalBgViewAdd (ZFUIView *view, ZFUILayoutParam *layoutParam=(zft_zfnull), zfbool addAsTopMost=(_ZFT_t_zftrue)) |
internal view which is independent from normal view | |
virtual void | internalBgViewRemove (ZFUIView *view) |
see internalBgViewAdd | |
virtual ZFCoreArray< zfautoT< ZFUIView > > | internalBgViewArray () |
usually for debug use only, try to avoid use this in your app for other purpose | |
virtual zfanyT< ZFUILayoutParam > | internalFgViewAdd (ZFUIView *view, ZFUILayoutParam *layoutParam=(zft_zfnull), zfbool addAsTopMost=(_ZFT_t_zftrue)) |
see internalBgViewAdd | |
virtual void | internalFgViewRemove (ZFUIView *view) |
see internalBgViewAdd | |
virtual ZFCoreArray< zfautoT< ZFUIView > > | internalFgViewArray () |
see internalBgViewAdd | |
virtual void | internalViewAutoSerializeTagAdd (const zfstring &tag) |
used to apply auto serialize logic to internal views | |
virtual void | internalViewAutoSerializeTagRemove (const zfstring &tag) |
see internalViewAutoSerializeTagAdd | |
virtual void | internalViewAutoSerializeTagRemoveAll () |
see internalViewAutoSerializeTagAdd | |
virtual void | internalViewAutoSerializeTagGetAllT (ZFCoreArray< zfstring > &ret) |
see internalViewAutoSerializeTagAdd | |
virtual ZFCoreArray< zfstring > | internalViewAutoSerializeTagGetAll () |
see internalViewAutoSerializeTagAdd | |
virtual void | viewEventSend (ZFUIEvent *event) |
directly send a event, use with caution | |
![]() | |
zfindex | objectRetainCount (void) |
return the object's retain count | |
void | objectInfoOfInstanceT (zfstring &ret) |
see objectInfoOfInstance | |
zfstring | objectInfoOfInstance (void) |
return a short string describe the object instance | |
void | objectInfoT (zfstring &ret) |
see objectInfo | |
zfstring | objectInfo (void) |
return object info | |
zfidentity | objectHash (void) |
get hash of this object | |
ZFCompareResult | objectCompare (ZFObject *anotherObj) |
compare with anotherObj | |
ZFCompareResult | objectCompareValue (ZFObject *anotherObj) |
explicitly compare object by logical value, see objectCompare | |
virtual zfauto | invoke (const zfstring &methodName) |
util method to perform ZFDI_invoke, do nothing if fail | |
virtual zfauto | invoke (const zfstring &methodName, ZFObject *param0, ZFObject *param1=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param2=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param3=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param4=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param5=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param6=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param7=((ZFObject *const &) _ZFP_ZFMP_DEF)) |
util method to perform ZFDI_invoke, do nothing if fail | |
virtual zfbool | invokeT (zfauto &ret, zfstring *errorHint, const zfstring &methodName, ZFObject *param0=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param1=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param2=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param3=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param4=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param5=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param6=((ZFObject *const &) _ZFP_ZFMP_DEF), ZFObject *param7=((ZFObject *const &) _ZFP_ZFMP_DEF)) |
util method to perform ZFDI_invoke, do nothing if fail | |
virtual zfauto | invokeDetail (const zfstring &methodName, const ZFCoreArray< zfauto > ¶ms, zfbool *success=zft_zfnull, zfstring *errorHint=zft_zfnull) |
util method to perform ZFDI_invoke, do nothing if fail | |
zfbool | objectTagExist (void) |
see objectTag, true if this object has tag, and tag can be checked by objectTagGetAllKeyValue | |
void | objectTag (const zfstring &key, ZFObject *tag) |
used to hold a object for app's use, auto retained | |
zfany | objectTag (const zfstring &key) |
see objectTag | |
void | objectTagGetAllKeyValue (ZFCoreArray< zfstring > &allKey, ZFCoreArray< zfauto > &allValue) |
get all key value | |
void | objectTagRemove (const zfstring &key) |
remove tag, same as set tag to null | |
zfauto | objectTagRemoveAndGet (const zfstring &key) |
remove tag, return removed tag or null if not exist | |
void | objectTagRemoveAll (void) |
remove all tag | |
void | observerAdd (zfidentity eventId, const ZFListener &observer, ZFLevel observerLevel=ZFLevelAppNormal) |
see observerNotify | |
void | observerAddForOnce (zfidentity eventId, const ZFListener &observer, ZFLevel observerLevel=ZFLevelAppNormal) |
see observerNotify | |
void | observerRemove (zfidentity eventId, const ZFListener &callback) |
see observerNotify | |
void | observerRemoveAll (zfidentity eventId) |
see observerNotify | |
void | observerRemoveAll (void) |
see observerNotify | |
zfbool | observerHasAdd (void) |
true if any observer has been added | |
zfbool | observerHasAdd (zfidentity eventId) |
true if any observer with eventId has been added | |
void | observerNotify (zfidentity eventId, ZFObject *param0=zft_zfnull, ZFObject *param1=zft_zfnull) |
notify the observer with eventId | |
void | observerNotifyWithSender (ZFObject *customSender, zfidentity eventId, ZFObject *param0=zft_zfnull, ZFObject *param1=zft_zfnull) |
see observerNotify | |
void | observerNotifyReversely (zfidentity eventId, ZFObject *param0=zft_zfnull, ZFObject *param1=zft_zfnull) |
see observerNotify | |
void | observerNotifyReverselyWithSender (ZFObject *customSender, zfidentity eventId, ZFObject *param0=zft_zfnull, ZFObject *param1=zft_zfnull) |
see observerNotify | |
ZFObserver & | observerHolder (void) |
access the internal observer holder | |
void | on (const zfstring &eventName, const ZFListener &observer, ZFLevel observerLevel=ZFLevelAppNormal) |
util to observerAdd | |
void | on (zfidentity eventId, const ZFListener &observer, ZFLevel observerLevel=ZFLevelAppNormal) |
util to observerAdd | |
void | onInit (const ZFListener &impl) |
util for script to achieve chained call | |
void | onDealloc (const ZFListener &impl) |
util for script to achieve chained call | |
zfbool | objectInstanceStateCheck (ZFObjectInstanceState state) |
object instance's state | |
zfbool | objectInitRunning (void) |
util method to check whether ZFObjectInstanceStateOnInit or ZFObjectInstanceStateOnInitFinish running | |
zfbool | objectDeallocRunning (void) |
util method to check whether ZFObjectInstanceStateOnDeallocPrepare or ZFObjectInstanceStateOnDealloc running | |
virtual zfbool | objectIsInternal (void) |
whether this object is internal object or its class is ZFClass::classIsInternal | |
virtual zfbool | objectIsInternalPrivate (void) |
whether this object is internal private object or its class is ZFClass::classIsInternalPrivate | |
![]() | |
virtual zfanyT< ZFStyleable > | defaultStyle (void) |
return default style of this instance | |
void | styleableCopyFrom (ZFObject *anotherStyleable) |
copy style from another styleable, see ZFStyleable | |
virtual zfbool | styleableIsDefaultStyle (void) |
true if this object is defaultStyle | |
void | styleablePropertyGetAllT (ZFCoreArray< const ZFProperty * > &ret) |
return a list of styleable property, for debug use only | |
ZFCoreArray< const ZFProperty * > | styleablePropertyGetAll (void) |
return a list of styleable property, for debug use only | |
void | styleKey (const zfstring &styleKey) |
see ZFStyleSet | |
const zfstring & | styleKey (void) |
see ZFStyleSet | |
void | propStyle (const zfstring &propertyName, const zfstring &styleKey) |
see ZFStyleSet | |
const zfstring & | propStyle (const zfstring &propertyName) |
see ZFStyleSet | |
![]() | |
virtual ZFObject * | toObject (void)=0 |
convert to ZFObject type | |
![]() | |
zfbool | serializable (void) |
true if object is currently serializable, see ZFSerializable | |
zfbool | serializeFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializableData *outErrorPos=zft_zfnull) |
serialize from data, see ZFSerializable | |
zfbool | serializeToData (ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializable *refOwner=zft_zfnull) |
serialize to data, see ZFSerializable | |
zfbool | serializeFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull) |
serialize from string, return false by default | |
zfbool | serializeToString (zfstring &ret, zfstring *errorHint=zft_zfnull) |
see serializeFromString | |
void | serializablePropertyTypeGetAll (ZFCoreArray< const ZFProperty * > ¬SerializableProperty, ZFCoreArray< const ZFProperty * > &serializableProperty, ZFCoreArray< const ZFProperty * > &embededProperty) |
return a list of each type of property, for debug use only | |
zfstring | serializablePropertyTypeInfo (void) |
return info of serializablePropertyTypeGetAll, for debug use only | |
void | serializableGetAllSerializablePropertyT (ZFCoreArray< const ZFProperty * > &ret) |
see serializableGetAllSerializableProperty | |
ZFCoreArray< const ZFProperty * > | serializableGetAllSerializableProperty (void) |
get all serializable property, usually for debug only, see serializableOnCheckPropertyType | |
void | serializableGetAllSerializableEmbededPropertyT (ZFCoreArray< const ZFProperty * > &ret) |
see serializableGetAllSerializableEmbededProperty | |
ZFCoreArray< const ZFProperty * > | serializableGetAllSerializableEmbededProperty (void) |
get all serializable embeded property, usually for debug only, see serializableOnCheckPropertyType | |
virtual void | serializableInfoT (zfstring &ret) |
get info as a serializable | |
virtual zfstring | serializableInfo (void) |
see serializableInfoT | |
![]() | |
zfautoT< ZFCopyable > | copy (void) |
return a copy of this object | |
void | copyFrom (ZFObject *anotherObj) |
see copy, anotherObj must be same type as this object (by classData), otherwise, do nothing | |
Protected Types | |
typedef ZFUIView | zfsuper |
class ref to super | |
typedef ZFUIFlowLayout | zfself |
class ref to self | |
![]() | |
typedef ZFStyle | zfsuper |
class ref to super | |
typedef ZFUIView | zfself |
class ref to self | |
![]() | |
typedef ZFObject | zfsuper |
class ref to super | |
typedef ZFStyle | zfself |
class ref to self | |
![]() | |
typedef _ZFP_Obj_Base | zfsuper |
class ref to super | |
typedef ZFObject | zfself |
class ref to self | |
![]() | |
typedef ZFInterface | zfsuper |
typedef for super (always ZFInterface for an interface type) | |
typedef ZFStyleable | zfself |
typedef for self | |
![]() | |
typedef _ZFP_ObjI_Base | zfsuper |
typedef for super (always ZFInterface for an interface type) | |
typedef ZFInterface | zfself |
typedef for self | |
![]() | |
typedef ZFInterface | zfsuper |
typedef for super (always ZFInterface for an interface type) | |
typedef ZFSerializable | zfself |
typedef for self | |
![]() | |
typedef ZFInterface | zfsuper |
typedef for super (always ZFInterface for an interface type) | |
typedef ZFCopyable | zfself |
typedef for self | |
Protected Member Functions | |
virtual const ZFClass * | layoutParamClass (void) |
see layoutParamCreate | |
virtual void | layoutOnMeasure (ZFUISize &ret, const ZFUISize &sizeHint, const ZFUISizeParam &sizeParam) |
called by layoutMeasure to decide the view's size | |
virtual void | layoutOnLayout (const ZFUIRect &bounds) |
called by viewFrame to layout the view and children | |
![]() | |
virtual zfbool | serializableOnSerializeFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializableData *outErrorPos=zft_zfnull) |
for serializable data that has "category" attribute, ZFSerializable would ignore it and leave it to subclass to resolve, see ZFSerializable | |
virtual zfbool | serializableOnSerializeToData (ZFSerializableData &serializableData, zfstring *outErrorHint=zft_zfnull, ZFSerializable *refOwner=zft_zfnull) |
corresponding to serializableOnSerializeFromData, return whether the task is success, see ZFSerializable | |
virtual zfbool | serializableOnCheckNeedSerializeChildren (void) |
whether we should serialize all children | |
virtual void | objectOnInit (void) |
override this to init your object | |
virtual void | objectOnDealloc (void) |
override this to destroy your object | |
virtual void | objectOnDeallocPrepare (void) |
called before objectOnDealloc, safe to call virtual functions here | |
virtual void | objectInfoImplAppend (zfstring &ret) |
see objectInfo | |
virtual void | nativeImplView (void *nativeImplView, ZFUIViewNativeImplViewDeleteCallback nativeImplViewDeleteCallback, zfbool nativeImplViewRequireVirtualIndex) |
see nativeImplView | |
virtual void | nativeImplViewMarginImplUpdate (ZFUIMargin &nativeImplViewMargin) |
see nativeImplViewMargin, subclass must call super and "append" to existing margin | |
virtual void | nativeImplViewMarginOnUpdate (void) |
see E_NativeImplViewMarginOnUpdate | |
virtual void | nativeImplViewOnLayout (ZFUIRect &ret, const ZFUIRect &bounds, const ZFUIMargin &nativeImplViewMargin) |
called to layout nativeImplView | |
virtual void | implChildOnAdd (ZFUIView *child, zfindex virtualIndex, ZFUIViewChildLayer childLayer, zfindex childLayerIndex) |
called to add or remove view to impl | |
virtual void | implChildOnRemove (ZFUIView *child, zfindex virtualIndex, ZFUIViewChildLayer childLayer, zfindex childLayerIndex) |
see implChildOnAdd, implChildOnRemoveAllForDealloc | |
virtual void | implChildOnRemoveAllForDealloc (void) |
called to remove all children during parent dealloc for performance | |
virtual void | focusOnUpdate (void) |
see E_ViewFocusOnUpdate | |
virtual void | UIScaleOnUpdate (void) |
see UIScale, ensured called only when scale value actually changed | |
virtual void | layoutParamOnUpdate (ZFUILayoutParam *layoutParam) |
see layoutParamCreate | |
virtual void | layoutOnLayoutRequest (void) |
called during layoutRequest | |
virtual void | layoutOnMeasureFinish (ZFUISize &measuredSize, const ZFUISize &sizeHint, const ZFUISizeParam &sizeParam) |
see E_ViewLayoutOnMeasure | |
virtual void | layoutOnLayoutPrepare (const ZFUIRect &bounds) |
see E_ViewLayoutOnLayoutPrepare | |
virtual void | layoutOnLayoutFinish (const ZFUIRect &bounds) |
see E_ViewLayoutOnLayoutFinish | |
virtual void | layoutChildOffsetOnUpdate (ZFUIPoint &ret) |
see layoutChildOffset | |
virtual void | viewTreeInWindowOnUpdate (void) |
see E_ViewTreeInWindowOnUpdate | |
virtual void | viewTreeVisibleOnUpdate (void) |
see E_ViewTreeVisibleOnUpdate | |
virtual void | viewChildOnUpdate (void) |
see E_ViewChildOnUpdate | |
virtual void | viewChildOnAdd (ZFUIView *child, ZFUIViewChildLayer childLayer) |
see E_ViewChildOnAdd | |
virtual void | viewChildOnRemove (ZFUIView *child, ZFUIViewChildLayer childLayer) |
see E_ViewChildOnRemove | |
virtual void | viewOnAddToParent (ZFUIView *parent) |
see E_ViewOnAddToParent | |
virtual void | viewOnRemoveFromParent (ZFUIView *parent) |
see E_ViewOnRemoveFromParent | |
virtual zfbool | internalViewShouldLayout (ZFUIView *internalView) |
called to check whether the internal view should be layouted using default layout logic, return true by default | |
virtual void | internalViewOnLayout (const ZFUIRect &bounds) |
see internalBgViewAdd | |
virtual void | viewEventOnEvent (ZFUIEvent *event) |
notified when a ZFUIEvent occurred | |
virtual void | viewEventOnMouseEvent (ZFUIMouseEvent *mouseEvent) |
called when mouse event occurred | |
virtual void | viewEventOnKeyEvent (ZFUIKeyEvent *keyEvent) |
called when key occurred | |
virtual void | viewEventOnKeyEventResolveFocus (ZFUIKeyEvent *keyEvent) |
called by viewEventOnKeyEvent to resolve focus move key event | |
virtual void | viewEventOnWheelEvent (ZFUIWheelEvent *wheelEvent) |
called when wheel event occurred | |
virtual void | styleableOnCopyFrom (ZFObject *anotherStyleable) |
for a view, copy style would also copy all of it's children | |
virtual void | observerOnAdd (zfidentity eventId) |
called when add first observer | |
virtual void | observerOnRemove (zfidentity eventId) |
called when remove last observer | |
![]() | |
virtual void | copyableOnCopyFrom (ZFObject *anotherObj) |
called by copy to copy contents from anotherObj | |
![]() | |
virtual void | objectInfoImpl (zfstring &ret) |
see objectInfo | |
virtual zfidentity | objectHashImpl (void) |
see objectHash | |
virtual ZFCompareResult | objectCompareImpl (ZFObject *anotherObj) |
see objectCompare | |
virtual ZFCompareResult | objectCompareValueImpl (ZFObject *anotherObj) |
see objectCompareValue | |
virtual void | observerOnEvent (const ZFArgs &zfargs) |
notified when observerNotify | |
virtual void | objectOnInitFinish (void) |
called after objectOnInit, safe to call virtual functions here | |
virtual void | objectOnRetain (void) |
called to retain object | |
virtual void | objectOnRelease (void) |
called to release object | |
virtual void | objectPropertyValueOnUpdate (const ZFProperty *property, const void *oldValue) |
see E_ObjectPropertyValueOnUpdate | |
virtual void | objectPropertyValueOnReset (const ZFProperty *property) |
see E_ObjectPropertyValueOnReset | |
![]() | |
virtual void | styleableOnCopyPropertyFrom (ZFObject *anotherStyleable, const ZFProperty *property) |
copy property with styleable logic | |
![]() | |
virtual ZFSerializablePropertyType | serializableOnCheckPropertyType (const ZFProperty *property) |
check the property type that serializable should do what while serializing | |
virtual zfbool | serializableOnCheck (void) |
see serializable | |
virtual zfbool | serializableOnSerializePropertyFromData (const ZFSerializableData &propertyData, const ZFProperty *property, zfstring *outErrorHint=zft_zfnull, ZFSerializableData *outErrorPos=zft_zfnull) |
see serializableOnCheckPropertyType, usually you have no need to override this method, see ZFSerializable | |
virtual zfbool | serializableOnSerializePropertyToData (ZFSerializableData &ownerData, const ZFProperty *property, zfstring *outErrorHint=zft_zfnull, ZFSerializable *refOwner=zft_zfnull) |
see serializableOnCheckPropertyType, usually you have no need to override this method, see ZFSerializable | |
virtual zfbool | serializableOnSerializeEmbededPropertyFromData (const ZFSerializableData &propertyData, const ZFProperty *property, zfstring *outErrorHint=zft_zfnull, ZFSerializableData *outErrorPos=zft_zfnull) |
see serializableOnCheckPropertyType, usually you have no need to override this method, see ZFSerializable | |
virtual zfbool | serializableOnSerializeEmbededPropertyToData (ZFSerializableData &ownerData, const ZFProperty *property, ZFSerializable *refOwner, zfstring *outErrorHint=zft_zfnull) |
see serializableOnCheckPropertyType, usually you have no need to override this method, see ZFSerializable | |
virtual zfbool | serializableOnSerializeFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=zft_zfnull) |
see serializeFromString | |
virtual zfbool | serializableOnSerializeToString (zfstring &ret, zfstring *errorHint=zft_zfnull) |
see serializeFromString | |
flow container view that layout children in linear, and exceeds to next line or column if no enough space
a ZFUIFlowLayout is much similar to ZFUILinearLayout, except that ZFUIFlowLayout would exceeds children to next line or column if no enough space, which looks like "wrap" mode for text editors
|
inlinevirtual |
|
static |
default style for ZFUIFlowLayout
|
inlinevirtual |
main direction to layout children, v_ZFUIOrientation::e_Left by default
v_ZFUIOrientation::e_Left means layout children from left to right, while v_ZFUIOrientation::e_Bottom means layout children from bottom to top
|
inlinevirtual |
secondary direction to layout children, v_ZFUIOrientation::e_Top by default
v_ZFUIOrientation::e_Left means layout children from left to right, while v_ZFUIOrientation::e_Bottom means layout children from bottom to top
|
inlineprotectedvirtual |
you should override this method to declare your layout param class
Reimplemented from ZFUIView.
Reimplemented in ZFUIGridLayout.
|
protectedvirtual |
called by layoutMeasure to decide the view's size
you may override without call super to supply your own layout logic
note that we doesn't ensure layoutOnMeasure would be called during layout steps, only layout that has wrap content features may call layoutMeasure to calculate children's size
sizeHint means the max size child should reach, see ZFUISizeType for more info
return a negative value means the view doesn't care about size
Reimplemented from ZFUIView.
|
protectedvirtual |
called by viewFrame to layout the view and children
it's valid for subclass to override without calling zfsuper::layoutOnLayout, which means subclass would override all layout steps in parent
note that we doesn't ensure layoutOnMeasure would be called before layoutOnLayout
Reimplemented from ZFUIView.