ZFFramework
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
ZFUITypeDef.h File Reference

necessary header file for all ZFUIKit member More...

#include "ZFUIKitDef.h"

Go to the source code of this file.

Classes

class  ZFUIPoint
 2D point More...
 
class  v_ZFUIPoint
 type wrapper for ZFTypeId::Value More...
 
class  ZFUIMargin
 margin More...
 
class  v_ZFUIMargin
 type wrapper for ZFTypeId::Value More...
 
class  ZFUISize
 2D size More...
 
class  v_ZFUISize
 type wrapper for ZFTypeId::Value More...
 
class  ZFUIRect
 2D rectangle More...
 
class  v_ZFUIRect
 type wrapper for ZFTypeId::Value More...
 
class  ZFUIAlign
 align types for UI in ZFFramework More...
 
class  ZFUIAlignFlags
 ZFUIAlign as zfflags, see ZFUIAlign , ZFUIAlignFlagsToString, ZFUIAlignFlagsFromString. More...
 
class  v_ZFUIAlignFlags
 type wrapper for ZFTypeId::Value More...
 
class  ZFUIOrientation
 orientation types for UI in ZFFramework More...
 
class  ZFUIOrientationFlags
 ZFUIOrientation as zfflags, see ZFUIOrientation , ZFUIOrientationFlagsToString, ZFUIOrientationFlagsFromString. More...
 
class  v_ZFUIOrientationFlags
 type wrapper for ZFTypeId::Value More...
 
class  v_ZFUIColor
 type wrapper for ZFTypeId::Value More...
 
class  ZFUITextAppearance
 text appearance type, normal, bold or italic More...
 
class  ZFUITextTruncateMode
 text truncate mode More...
 
class  ZFUIContentScaleType
 scale type when stretch items More...
 

Macros

#define ZFUIColorBlack()
 0x000000
 
#define ZFUIColorGrayDark()
 0x555555
 
#define ZFUIColorGray()
 0x808080
 
#define ZFUIColorGrayLight()
 0xAAAAAA
 
#define ZFUIColorWhite()
 0xFFFFFF
 
#define ZFUIColorRed()
 0xFF0000
 
#define ZFUIColorGreen()
 0x00FF00
 
#define ZFUIColorBlue()
 0x0000FF
 
#define ZFUIColorYellow()
 0xFFFF00
 
#define ZFUIColorMagenta()
 0xFF00FF
 
#define ZFUIColorCyan()
 0x00FFFF
 

Typedefs

typedef ZFUIAlign::ZFEnumType ZFUIAlignEnum
 same as ZFUIAlignEnum, see ZFUIAlign

 
typedef ZFUIOrientation::ZFEnumType ZFUIOrientationEnum
 same as ZFUIOrientationEnum, see ZFUIOrientation

 
typedef _zft_ZFUIColor ZFUIColor
 color with AARRGGBB format
 
typedef zft_zfuint32 zft_ZFUIColor
 primitive number type, use only if necessary, for app, use ZFUIColor instead
 
typedef ZFUITextAppearance::ZFEnumType ZFUITextAppearanceEnum
 same as ZFUITextAppearanceEnum, see ZFUITextAppearance

 
typedef ZFUITextTruncateMode::ZFEnumType ZFUITextTruncateModeEnum
 same as ZFUITextTruncateModeEnum, see ZFUITextTruncateMode

 
typedef ZFUIContentScaleType::ZFEnumType ZFUIContentScaleTypeEnum
 same as ZFUIContentScaleTypeEnum, see ZFUIContentScaleType

 

Functions

void ZFUISizeApplyScale (zffloat &ret, zffloat const &v, zffloat scale)
 return a scaled int
 
zffloat ZFUISizeApplyScale (zffloat const &v, zffloat scale)
 return a scaled int
 
void ZFUISizeApplyScaleReversely (zffloat &ret, zffloat const &v, zffloat scale)
 return a scaled int reversely
 
zffloat ZFUISizeApplyScaleReversely (zffloat const &v, zffloat scale)
 return a scaled int reversely
 
const zfcharZFTypeId_ZFUIPoint (void)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIPointFromDataT (ZFUIPoint &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
ZFUIPoint ZFUIPointFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIPointToDataT (ZFSerializableData &serializableData, ZFUIPoint const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
ZFSerializableData ZFUIPointToData (ZFUIPoint const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIPointFromStringT (ZFUIPoint &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIPoint from string
 
ZFUIPoint ZFUIPointFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIPoint from string
 
zfbool ZFUIPointToStringT (zfstring &s, ZFUIPoint const &v, zfstring *errorHint=0)
 util method to convert ZFUIPoint to string
 
zfstring ZFUIPointToString (ZFUIPoint const &v, zfstring *errorHint=0)
 util method to convert ZFUIPoint to string
 
zfbool ZFUIPointIsEqual (ZFUIPoint const &v0, ZFUIPoint const &v1)
 compare by value
 
ZFUIPoint const & ZFUIPointZero (void)
 (0, 0)
 
ZFUIPoint ZFUIPointMake (zffloat const &x, zffloat const &y)
 make a ZFUIPoint
 
void ZFUIPointApplyScale (ZFUIPoint &ret, const ZFUIPoint &point, zffloat scale)
 return a scaled point
 
ZFUIPoint ZFUIPointApplyScale (const ZFUIPoint &point, zffloat scale)
 return a scaled point
 
void ZFUIPointApplyScaleReversely (ZFUIPoint &ret, const ZFUIPoint &point, zffloat scale)
 return a scaled point reversely
 
ZFUIPoint ZFUIPointApplyScaleReversely (const ZFUIPoint &point, zffloat scale)
 return a scaled point reversely
 
const zfcharZFTypeId_ZFUIMargin (void)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIMarginFromDataT (ZFUIMargin &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
ZFUIMargin ZFUIMarginFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIMarginToDataT (ZFSerializableData &serializableData, ZFUIMargin const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
ZFSerializableData ZFUIMarginToData (ZFUIMargin const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIMarginFromStringT (ZFUIMargin &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIMargin from string
 
ZFUIMargin ZFUIMarginFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIMargin from string
 
zfbool ZFUIMarginToStringT (zfstring &s, ZFUIMargin const &v, zfstring *errorHint=0)
 util method to convert ZFUIMargin to string
 
zfstring ZFUIMarginToString (ZFUIMargin const &v, zfstring *errorHint=0)
 util method to convert ZFUIMargin to string
 
zfbool ZFUIMarginIsEqual (ZFUIMargin const &v0, ZFUIMargin const &v1)
 compare by value
 
ZFUIMargin const & ZFUIMarginZero (void)
 (0, 0, 0, 0)
 
ZFUIMargin ZFUIMarginMake (zffloat const &left, zffloat const &top, zffloat const &right, zffloat const &bottom)
 make a margin
 
ZFUIMargin ZFUIMarginMake (zffloat const &margin)
 make a margin with all sides set to margin
 
ZFUIMargin ZFUIMarginMake (zffloat const &x, zffloat const &y)
 make a margin with left/right to x and top/bottom to y
 
void ZFUIMarginApplyScale (ZFUIMargin &ret, const ZFUIMargin &margin, zffloat scale)
 return a scaled margin
 
ZFUIMargin ZFUIMarginApplyScale (const ZFUIMargin &margin, zffloat scale)
 return a scaled margin
 
void ZFUIMarginApplyScaleReversely (ZFUIMargin &ret, const ZFUIMargin &margin, zffloat scale)
 return a scaled margin reversely
 
ZFUIMargin ZFUIMarginApplyScaleReversely (const ZFUIMargin &margin, zffloat scale)
 return a scaled margin reversely
 
zffloat ZFUIMarginGetWidth (const ZFUIMargin &margin)
 left + right margin
 
zffloat ZFUIMarginGetHeight (const ZFUIMargin &margin)
 top + bottom margin
 
void ZFUIMarginInc (ZFUIMargin &ret, const ZFUIMargin &v0, const ZFUIMargin &v1)
 v0 + v1
 
ZFUIMargin ZFUIMarginInc (const ZFUIMargin &v0, const ZFUIMargin &v1)
 v0 + v1
 
ZFUIMargin operator+ (const ZFUIMargin &v0, const ZFUIMargin &v1)
 v0 + v1
 
ZFUIMarginoperator+= (ZFUIMargin &v0, const ZFUIMargin &v1)
 v0 += v1
 
void ZFUIMarginDec (ZFUIMargin &ret, const ZFUIMargin &v0, const ZFUIMargin &v1)
 v0 - v1
 
ZFUIMargin ZFUIMarginDec (const ZFUIMargin &v0, const ZFUIMargin &v1)
 v0 - v1
 
ZFUIMargin operator- (const ZFUIMargin &v0, const ZFUIMargin &v1)
 v0 - v1
 
ZFUIMarginoperator-= (ZFUIMargin &v0, const ZFUIMargin &v1)
 v0 -= v1
 
const zfcharZFTypeId_ZFUISize (void)
 see ZFTYPEID_DECLARE
 
zfbool ZFUISizeFromDataT (ZFUISize &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
ZFUISize ZFUISizeFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUISizeToDataT (ZFSerializableData &serializableData, ZFUISize const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
ZFSerializableData ZFUISizeToData (ZFUISize const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUISizeFromStringT (ZFUISize &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUISize from string
 
ZFUISize ZFUISizeFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUISize from string
 
zfbool ZFUISizeToStringT (zfstring &s, ZFUISize const &v, zfstring *errorHint=0)
 util method to convert ZFUISize to string
 
zfstring ZFUISizeToString (ZFUISize const &v, zfstring *errorHint=0)
 util method to convert ZFUISize to string
 
zfbool ZFUISizeIsEqual (ZFUISize const &v0, ZFUISize const &v1)
 compare by value
 
ZFUISize const & ZFUISizeZero (void)
 (0, 0)
 
ZFUISize const & ZFUISizeInvalid (void)
 (-1, -1)
 
ZFUISize ZFUISizeMake (zffloat const &width, zffloat const &height)
 make a ZFUISize
 
ZFUISize ZFUISizeMake (zffloat const &v)
 make a ZFUISize
 
void ZFUISizeApplyRange (ZFUISize &ret, const ZFUISize &orgSize, const ZFUISize &minSize, const ZFUISize &maxSize)
 check and apply size range
 
ZFUISize ZFUISizeApplyRange (const ZFUISize &orgSize, const ZFUISize &minSize, const ZFUISize &maxSize)
 check and apply size range
 
void ZFUISizeApplyScale (ZFUISize &ret, const ZFUISize &size, zffloat scale)
 return a scaled size
 
ZFUISize ZFUISizeApplyScale (const ZFUISize &size, zffloat scale)
 return a scaled size
 
void ZFUISizeApplyScaleReversely (ZFUISize &ret, const ZFUISize &size, zffloat scale)
 return a scaled size reversely
 
ZFUISize ZFUISizeApplyScaleReversely (const ZFUISize &size, zffloat scale)
 return a scaled size reversely
 
void ZFUISizeApplyAspectRatio (ZFUISize &ret, const ZFUISize &size, const ZFUISize &refSize)
 scale size to fit refSize and keep aspect ratio
 
ZFUISize ZFUISizeApplyAspectRatio (const ZFUISize &size, const ZFUISize &refSize)
 scale size to fit refSize and keep aspect ratio
 
void ZFUISizeApplyMargin (ZFUISize &ret, const ZFUISize &size, const ZFUIMargin &margin)
 return a size excluding the margin
 
ZFUISize ZFUISizeApplyMargin (const ZFUISize &size, const ZFUIMargin &margin)
 return a size excluding the margin
 
void ZFUISizeApplyMarginReversely (ZFUISize &ret, const ZFUISize &size, const ZFUIMargin &margin)
 revert excluding the margin
 
ZFUISize ZFUISizeApplyMarginReversely (const ZFUISize &size, const ZFUIMargin &margin)
 revert excluding the margin
 
const zfcharZFTypeId_ZFUIRect (void)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIRectFromDataT (ZFUIRect &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
ZFUIRect ZFUIRectFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIRectToDataT (ZFSerializableData &serializableData, ZFUIRect const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
ZFSerializableData ZFUIRectToData (ZFUIRect const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIRectFromStringT (ZFUIRect &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIRect from string
 
ZFUIRect ZFUIRectFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIRect from string
 
zfbool ZFUIRectToStringT (zfstring &s, ZFUIRect const &v, zfstring *errorHint=0)
 util method to convert ZFUIRect to string
 
zfstring ZFUIRectToString (ZFUIRect const &v, zfstring *errorHint=0)
 util method to convert ZFUIRect to string
 
zfbool ZFUIRectIsEqual (ZFUIRect const &v0, ZFUIRect const &v1)
 compare by value
 
ZFUIRect const & ZFUIRectZero (void)
 (0, 0, 0, 0)
 
ZFUIRect ZFUIRectMake (zffloat const &x, zffloat const &y, zffloat const &w, zffloat const &h)
 make a ZFUIRect
 
ZFUIRect ZFUIRectMake (const ZFUIPoint &point, const ZFUISize &size)
 make a ZFUIRect
 
zfbool ZFUIRectIsEmpty (const ZFUIRect &rect)
 is rect empty
 
ZFUIRect ZFUIRectUnion (const ZFUIRect &rect1, const ZFUIRect &rect2)
 union two rect, return a rect that contains both rect1 and rect2
 
ZFUIRect ZFUIRectIntersection (const ZFUIRect &rect1, const ZFUIRect &rect2)
 intersect two rect, return ZFUIRectZero if not intersected
 
zfbool ZFUIRectIsIntersectToRect (const ZFUIRect &rect1, const ZFUIRect &rect2)
 is two rect intersected, two tangented rect is not intersected
 
zfbool ZFUIRectIsContainPoint (const ZFUIRect &rect, const ZFUIPoint &point)
 is rect contains point
 
zfbool ZFUIRectIsContainPoint (const ZFUIRect &rect, const ZFUIPoint &point, const ZFUIMargin &margin)
 see ZFUIRectIsContainPoint
 
zfbool ZFUIRectIsContainRect (const ZFUIRect &rect1, const ZFUIRect &rect2)
 return true if rect2 is completely contained by rect1, two equal rect is regarded as contain each other
 
zfbool ZFUIRectIsContainRect (const ZFUIRect &rect1, const ZFUIRect &rect2, const ZFUIMargin &margin)
 see ZFUIRectIsContainRect
 
void ZFUIRectApplyScale (ZFUIRect &ret, const ZFUIRect &rect, zffloat scale)
 return a scaled rect
 
ZFUIRect ZFUIRectApplyScale (const ZFUIRect &rect, zffloat scale)
 return a scaled rect
 
void ZFUIRectApplyScaleReversely (ZFUIRect &ret, const ZFUIRect &rect, zffloat scale)
 return a scaled rect reversely
 
ZFUIRect ZFUIRectApplyScaleReversely (const ZFUIRect &rect, zffloat scale)
 return a scaled rect reversely
 
ZFUIRect ZFUIRectGetBounds (const ZFUIRect &rect)
 get bounds for rect, i.e. (0, 0, width, height)
 
ZFUISize ZFUIRectGetSize (const ZFUIRect &rect)
 get size of the rect
 
ZFUIPoint ZFUIRectGetCenter (const ZFUIRect &rect)
 get center point of the rect
 
zffloat ZFUIRectGetLeft (const ZFUIRect &rect)
 get left edge of the rect
 
zffloat ZFUIRectGetTop (const ZFUIRect &rect)
 get top edge of the rect
 
zffloat ZFUIRectGetRight (const ZFUIRect &rect)
 get right edge of the rect
 
zffloat ZFUIRectGetBottom (const ZFUIRect &rect)
 get bottom edge of the rect
 
void ZFUIRectApplyMargin (ZFUIRect &ret, const ZFUIRect &rect, const ZFUIMargin &margin)
 return a rect excluding the margin
 
ZFUIRect ZFUIRectApplyMargin (const ZFUIRect &rect, const ZFUIMargin &margin)
 return a rect excluding the margin
 
void ZFUIRectApplyMarginReversely (ZFUIRect &ret, const ZFUIRect &rect, const ZFUIMargin &margin)
 revert excluding the margin
 
ZFUIRect ZFUIRectApplyMarginReversely (const ZFUIRect &rect, const ZFUIMargin &margin)
 revert excluding the margin
 
zfbool ZFUIAlignFromStringT (zfauto &ret, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 see ZFUIAlign , return enum object if success
 
zfbool ZFUIAlignToStringT (zfstring &ret, ZFUIAlign *const &value, zfstring *errorHint=0)
 see ZFUIAlign , return empty string if error
 
zfstring ZFUIAlignToString (ZFUIAlign *const &value, zfstring *errorHint=0)
 see ZFUIAlign , return empty string if error
 
const zfcharZFTypeId_ZFUIAlign (void)
 
zfbool ZFUIAlignFromDataT (ZFUIAlignEnum &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
ZFUIAlignEnum ZFUIAlignFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIAlignToDataT (ZFSerializableData &serializableData, ZFUIAlignEnum const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
ZFSerializableData ZFUIAlignToData (ZFUIAlignEnum const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIAlignFromStringT (ZFUIAlignEnum &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIAlign from string
 
ZFUIAlignEnum ZFUIAlignFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIAlign from string
 
zfbool ZFUIAlignToStringT (zfstring &s, ZFUIAlignEnum const &v, zfstring *errorHint=0)
 util method to convert ZFUIAlign to string
 
zfstring ZFUIAlignToString (ZFUIAlignEnum const &v, zfstring *errorHint=0)
 util method to convert ZFUIAlign to string
 
const zfcharZFTypeId_ZFUIAlignFlags (void)
 
zfbool ZFUIAlignFlagsFromDataT (ZFUIAlignFlags &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
ZFUIAlignFlags ZFUIAlignFlagsFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIAlignFlagsToDataT (ZFSerializableData &serializableData, ZFUIAlignFlags const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
ZFSerializableData ZFUIAlignFlagsToData (ZFUIAlignFlags const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIAlignFlagsFromStringT (ZFUIAlignFlags &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIAlignFlags from string
 
ZFUIAlignFlags ZFUIAlignFlagsFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIAlignFlags from string
 
zfbool ZFUIAlignFlagsToStringT (zfstring &s, ZFUIAlignFlags const &v, zfstring *errorHint=0)
 util method to convert ZFUIAlignFlags to string
 
zfstring ZFUIAlignFlagsToString (ZFUIAlignFlags const &v, zfstring *errorHint=0)
 util method to convert ZFUIAlignFlags to string
 
zfbool ZFUIAlignIsValid (const ZFUIAlignFlags &align)
 true if align is valid
 
void ZFUIAlignApply (ZFUIRect &ret, const ZFUIAlignFlags &align, const ZFUIRect &refRect, const ZFUISize &itemSize, const ZFUIMargin &margin=(ZFUIMarginZero()))
 apply align and calculate result, or ZFUIRectZero if error
 
ZFUIRect ZFUIAlignApply (const ZFUIAlignFlags &align, const ZFUIRect &refRect, const ZFUISize &itemSize, const ZFUIMargin &margin=(ZFUIMarginZero()))
 apply align and calculate result, or ZFUIRectZero if error
 
ZFUIAlignEnum ZFUIAlignGetX (const ZFUIAlignFlags &align)
 get horizontal align or ZFUIAlign::e_Center if invalid
 
ZFUIAlignEnum ZFUIAlignGetY (const ZFUIAlignFlags &align)
 get vertical align or ZFUIAlign::e_Center if invalid
 
zfbool ZFUIOrientationFromStringT (zfauto &ret, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 see ZFUIOrientation , return enum object if success
 
zfbool ZFUIOrientationToStringT (zfstring &ret, ZFUIOrientation *const &value, zfstring *errorHint=0)
 see ZFUIOrientation , return empty string if error
 
zfstring ZFUIOrientationToString (ZFUIOrientation *const &value, zfstring *errorHint=0)
 see ZFUIOrientation , return empty string if error
 
const zfcharZFTypeId_ZFUIOrientation (void)
 
zfbool ZFUIOrientationFromDataT (ZFUIOrientationEnum &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
ZFUIOrientationEnum ZFUIOrientationFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIOrientationToDataT (ZFSerializableData &serializableData, ZFUIOrientationEnum const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
ZFSerializableData ZFUIOrientationToData (ZFUIOrientationEnum const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIOrientationFromStringT (ZFUIOrientationEnum &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIOrientation from string
 
ZFUIOrientationEnum ZFUIOrientationFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIOrientation from string
 
zfbool ZFUIOrientationToStringT (zfstring &s, ZFUIOrientationEnum const &v, zfstring *errorHint=0)
 util method to convert ZFUIOrientation to string
 
zfstring ZFUIOrientationToString (ZFUIOrientationEnum const &v, zfstring *errorHint=0)
 util method to convert ZFUIOrientation to string
 
const zfcharZFTypeId_ZFUIOrientationFlags (void)
 
zfbool ZFUIOrientationFlagsFromDataT (ZFUIOrientationFlags &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
ZFUIOrientationFlags ZFUIOrientationFlagsFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIOrientationFlagsToDataT (ZFSerializableData &serializableData, ZFUIOrientationFlags const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
ZFSerializableData ZFUIOrientationFlagsToData (ZFUIOrientationFlags const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIOrientationFlagsFromStringT (ZFUIOrientationFlags &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIOrientationFlags from string
 
ZFUIOrientationFlags ZFUIOrientationFlagsFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIOrientationFlags from string
 
zfbool ZFUIOrientationFlagsToStringT (zfstring &s, ZFUIOrientationFlags const &v, zfstring *errorHint=0)
 util method to convert ZFUIOrientationFlags to string
 
zfstring ZFUIOrientationFlagsToString (ZFUIOrientationFlags const &v, zfstring *errorHint=0)
 util method to convert ZFUIOrientationFlags to string
 
ZFUIOrientationFlags const & ZFUIOrientationFlagsAll (void)
 (ZFUIOrientation::e_Left | ZFUIOrientation::e_Top | ZFUIOrientation::e_Right | ZFUIOrientation::e_Bottom)
 
ZFUIOrientationFlags const & ZFUIOrientationFlagsHorizontal (void)
 (ZFUIOrientation::e_Left | ZFUIOrientation::e_Right)
 
ZFUIOrientationFlags const & ZFUIOrientationFlagsVertical (void)
 (ZFUIOrientation::e_Top | ZFUIOrientation::e_Bottom)
 
zfbool ZFUIOrientationIsVertical (ZFUIOrientationEnum orientation)
 true if vertical orientation
 
zfbool ZFUIOrientationIsHorizontal (ZFUIOrientationEnum orientation)
 true if vertical orientation
 
ZFUIColor const & ZFUIColorZero (void)
 zero color
 
const zfcharZFTypeId_ZFUIColor (void)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIColorFromDataT (ZFUIColor &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
ZFUIColor ZFUIColorFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIColorToDataT (ZFSerializableData &serializableData, ZFUIColor const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
ZFSerializableData ZFUIColorToData (ZFUIColor const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIColorFromStringT (ZFUIColor &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIColor from string
 
ZFUIColor ZFUIColorFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIColor from string
 
zfbool ZFUIColorToStringT (zfstring &s, ZFUIColor const &v, zfstring *errorHint=0)
 util method to convert ZFUIColor to string
 
zfstring ZFUIColorToString (ZFUIColor const &v, zfstring *errorHint=0)
 util method to convert ZFUIColor to string
 
zfbool ZFUIColorIsEqual (ZFUIColor const &v0, ZFUIColor const &v1)
 true if two color is equal
 
ZFUIColor ZFUIColorMake (zffloat r, zffloat g, zffloat b, zffloat a=(1.0f))
 make a color
 
ZFUIColor ZFUIColorMakeARGB (zfuint argb)
 make a color for hex int
 
ZFUIColor ZFUIColorMakeRGB (zfuint rgb)
 make a color for hex int
 
ZFUIColor ZFUIColorWithA (ZFUIColor const &c, zffloat a)
 return a copy of color with changed alpha
 
ZFUIColor ZFUIColorWithR (ZFUIColor const &c, zffloat r)
 return a copy of color with changed red
 
ZFUIColor ZFUIColorWithG (ZFUIColor const &c, zffloat g)
 return a copy of color with changed green
 
ZFUIColor ZFUIColorWithB (ZFUIColor const &c, zffloat b)
 return a copy of color with changed blue
 
zffloat ZFUIColorGetA (ZFUIColor const &c)
 get alpha from a ZFUIColor as zffloat
 
zffloat ZFUIColorGetR (ZFUIColor const &c)
 get red from a ZFUIColor as zffloat
 
zffloat ZFUIColorGetG (ZFUIColor const &c)
 get green from a ZFUIColor as zffloat
 
zffloat ZFUIColorGetB (ZFUIColor const &c)
 get blue from a ZFUIColor as zffloat
 
ZFUIColorZFUIColorSetA (ZFUIColor &c, zffloat a)
 set alpha to a ZFUIColor
 
ZFUIColorZFUIColorSetR (ZFUIColor &c, zffloat r)
 set red from a ZFUIColor
 
ZFUIColorZFUIColorSetG (ZFUIColor &c, zffloat g)
 set green from a ZFUIColor
 
ZFUIColorZFUIColorSetB (ZFUIColor &c, zffloat b)
 set blue from a ZFUIColor
 
ZFUIColor ZFUIColorRandom (zffloat alpha=(1.0f))
 create a random color with specified alpha
 
zfbool ZFUITextAppearanceFromStringT (zfauto &ret, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 see ZFUITextAppearance , return enum object if success
 
zfbool ZFUITextAppearanceToStringT (zfstring &ret, ZFUITextAppearance *const &value, zfstring *errorHint=0)
 see ZFUITextAppearance , return empty string if error
 
zfstring ZFUITextAppearanceToString (ZFUITextAppearance *const &value, zfstring *errorHint=0)
 see ZFUITextAppearance , return empty string if error
 
const zfcharZFTypeId_ZFUITextAppearance (void)
 
zfbool ZFUITextAppearanceFromDataT (ZFUITextAppearanceEnum &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
ZFUITextAppearanceEnum ZFUITextAppearanceFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUITextAppearanceToDataT (ZFSerializableData &serializableData, ZFUITextAppearanceEnum const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
ZFSerializableData ZFUITextAppearanceToData (ZFUITextAppearanceEnum const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUITextAppearanceFromStringT (ZFUITextAppearanceEnum &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUITextAppearance from string
 
ZFUITextAppearanceEnum ZFUITextAppearanceFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUITextAppearance from string
 
zfbool ZFUITextAppearanceToStringT (zfstring &s, ZFUITextAppearanceEnum const &v, zfstring *errorHint=0)
 util method to convert ZFUITextAppearance to string
 
zfstring ZFUITextAppearanceToString (ZFUITextAppearanceEnum const &v, zfstring *errorHint=0)
 util method to convert ZFUITextAppearance to string
 
zfbool ZFUITextTruncateModeFromStringT (zfauto &ret, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 see ZFUITextTruncateMode , return enum object if success
 
zfbool ZFUITextTruncateModeToStringT (zfstring &ret, ZFUITextTruncateMode *const &value, zfstring *errorHint=0)
 see ZFUITextTruncateMode , return empty string if error
 
zfstring ZFUITextTruncateModeToString (ZFUITextTruncateMode *const &value, zfstring *errorHint=0)
 see ZFUITextTruncateMode , return empty string if error
 
const zfcharZFTypeId_ZFUITextTruncateMode (void)
 
zfbool ZFUITextTruncateModeFromDataT (ZFUITextTruncateModeEnum &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
ZFUITextTruncateModeEnum ZFUITextTruncateModeFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUITextTruncateModeToDataT (ZFSerializableData &serializableData, ZFUITextTruncateModeEnum const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
ZFSerializableData ZFUITextTruncateModeToData (ZFUITextTruncateModeEnum const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUITextTruncateModeFromStringT (ZFUITextTruncateModeEnum &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUITextTruncateMode from string
 
ZFUITextTruncateModeEnum ZFUITextTruncateModeFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUITextTruncateMode from string
 
zfbool ZFUITextTruncateModeToStringT (zfstring &s, ZFUITextTruncateModeEnum const &v, zfstring *errorHint=0)
 util method to convert ZFUITextTruncateMode to string
 
zfstring ZFUITextTruncateModeToString (ZFUITextTruncateModeEnum const &v, zfstring *errorHint=0)
 util method to convert ZFUITextTruncateMode to string
 
zfbool ZFUIContentScaleTypeFromStringT (zfauto &ret, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 see ZFUIContentScaleType , return enum object if success
 
zfbool ZFUIContentScaleTypeToStringT (zfstring &ret, ZFUIContentScaleType *const &value, zfstring *errorHint=0)
 see ZFUIContentScaleType , return empty string if error
 
zfstring ZFUIContentScaleTypeToString (ZFUIContentScaleType *const &value, zfstring *errorHint=0)
 see ZFUIContentScaleType , return empty string if error
 
const zfcharZFTypeId_ZFUIContentScaleType (void)
 
zfbool ZFUIContentScaleTypeFromDataT (ZFUIContentScaleTypeEnum &v, const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
ZFUIContentScaleTypeEnum ZFUIContentScaleTypeFromData (const ZFSerializableData &serializableData, zfstring *outErrorHint=0, ZFSerializableData *outErrorPos=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIContentScaleTypeToDataT (ZFSerializableData &serializableData, ZFUIContentScaleTypeEnum const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
ZFSerializableData ZFUIContentScaleTypeToData (ZFUIContentScaleTypeEnum const &v, zfstring *outErrorHint=0)
 see ZFTYPEID_DECLARE
 
zfbool ZFUIContentScaleTypeFromStringT (ZFUIContentScaleTypeEnum &v, const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIContentScaleType from string
 
ZFUIContentScaleTypeEnum ZFUIContentScaleTypeFromString (const zfchar *src, zfindex srcLen=((zfindex) -1), zfstring *errorHint=0)
 util method to convert ZFUIContentScaleType from string
 
zfbool ZFUIContentScaleTypeToStringT (zfstring &s, ZFUIContentScaleTypeEnum const &v, zfstring *errorHint=0)
 util method to convert ZFUIContentScaleType to string
 
zfstring ZFUIContentScaleTypeToString (ZFUIContentScaleTypeEnum const &v, zfstring *errorHint=0)
 util method to convert ZFUIContentScaleType to string
 
void ZFUIContentScaleTypeApply (ZFUIRect &ret, ZFUIContentScaleTypeEnum scaleType, const ZFUIRect &bounds, const ZFUISize &contentSize)
 apply scale for ZFUIContentScaleType
 
ZFUIRect ZFUIContentScaleTypeApply (ZFUIContentScaleTypeEnum scaleType, const ZFUIRect &bounds, const ZFUISize &contentSize)
 apply scale for ZFUIContentScaleType
 

Detailed Description

necessary header file for all ZFUIKit member

Typedef Documentation

◆ ZFUIColor

typedef _zft_ZFUIColor ZFUIColor

color with AARRGGBB format

note, color is ensured as POD type, but the actual color type is not ensured, use float to make and store a/r/g/b element, and use string converter (ZFUIColorToString) if necessary
for now, the color is 32bit integer with AARRGGBB format, but may extend to 64bit for future update

Function Documentation

◆ ZFTypeId_ZFUIPoint()

const zfchar * ZFTypeId_ZFUIPoint ( void )
inline

see ZFTYPEID_DECLARE

serializable data:

value="(0, 0)" // optional, 0 by default
/>
2D point
Definition ZFUITypeDef.h:62


◆ ZFTypeId_ZFUIMargin()

const zfchar * ZFTypeId_ZFUIMargin ( void )
inline

see ZFTYPEID_DECLARE

serializable data:

value="(0, 0, 0, 0)" // optional, 0 by default
/>
margin
Definition ZFUITypeDef.h:149


◆ ZFTypeId_ZFUISize()

const zfchar * ZFTypeId_ZFUISize ( void )
inline

see ZFTYPEID_DECLARE

serializable data:

value="(0, 0)" // optional, 0 by default
/>
2D size
Definition ZFUITypeDef.h:401


◆ ZFUISizeInvalid()

ZFUISize const & ZFUISizeInvalid ( void )
inline

(-1, -1)

since zero size is valid on some cases, we supply -1 as special size to indicate an invalid size

◆ ZFUISizeApplyRange() [1/2]

void ZFUISizeApplyRange ( ZFUISize & ret,
const ZFUISize & orgSize,
const ZFUISize & minSize,
const ZFUISize & maxSize )
inline

check and apply size range

return value in range [minSize, maxSize] if minSize < maxSize, or return value in range [minSize, infinite) minSize > maxSize

◆ ZFUISizeApplyRange() [2/2]

ZFUISize ZFUISizeApplyRange ( const ZFUISize & orgSize,
const ZFUISize & minSize,
const ZFUISize & maxSize )
inline

check and apply size range

return value in range [minSize, maxSize] if minSize < maxSize, or return value in range [minSize, infinite) minSize > maxSize

◆ ZFUISizeApplyAspectRatio() [1/2]

void ZFUISizeApplyAspectRatio ( ZFUISize & ret,
const ZFUISize & size,
const ZFUISize & refSize )
extern

scale size to fit refSize and keep aspect ratio

input size must be valid, while negative refSize means no limit

◆ ZFUISizeApplyAspectRatio() [2/2]

ZFUISize ZFUISizeApplyAspectRatio ( const ZFUISize & size,
const ZFUISize & refSize )
inline

scale size to fit refSize and keep aspect ratio

input size must be valid, while negative refSize means no limit

◆ ZFTypeId_ZFUIRect()

const zfchar * ZFTypeId_ZFUIRect ( void )
inline

see ZFTYPEID_DECLARE

serializable data:

value="(0, 0, 0, 0)" // optional, 0 by default
/>
2D rectangle
Definition ZFUITypeDef.h:615


◆ ZFUIRectIsEmpty()

zfbool ZFUIRectIsEmpty ( const ZFUIRect & rect)
inline

is rect empty

rect is empty if width or height <= 0

◆ ZFUIRectIsContainPoint()

zfbool ZFUIRectIsContainPoint ( const ZFUIRect & rect,
const ZFUIPoint & point,
const ZFUIMargin & margin )
inline

see ZFUIRectIsContainPoint

if margin is positive, rect's area is reduced by margin, if margin is negative, rect's area is increased by margin

◆ ZFUIRectIsContainRect()

zfbool ZFUIRectIsContainRect ( const ZFUIRect & rect1,
const ZFUIRect & rect2,
const ZFUIMargin & margin )
inline

see ZFUIRectIsContainRect

if margin is positive, rect's area is reduced by margin, if margin is negative, rect's area is increased by margin

◆ ZFTypeId_ZFUIAlign()

const zfchar * ZFTypeId_ZFUIAlign ( void )
inline


◆ ZFTypeId_ZFUIAlignFlags()

const zfchar * ZFTypeId_ZFUIAlignFlags ( void )
inline


◆ ZFUIAlignIsValid()

zfbool ZFUIAlignIsValid ( const ZFUIAlignFlags & align)
extern

true if align is valid

a align is valid only if:

  • only bits in ZFUIAlign are set
  • x or y align type must not conflict, i.e. "Left, LeftEdge, Right, RightEdge" could only exist at most one, "Top, TopEdge, Bottom, BottomEdge" could only exist at most one

◆ ZFTypeId_ZFUIOrientation()

const zfchar * ZFTypeId_ZFUIOrientation ( void )
inline


◆ ZFTypeId_ZFUIOrientationFlags()

const zfchar * ZFTypeId_ZFUIOrientationFlags ( void )
inline


◆ ZFTypeId_ZFUIColor()

const zfchar * ZFTypeId_ZFUIColor ( void )
inline

see ZFTYPEID_DECLARE

serializable data:

value="value" // optional, 0 by default
/>
_zft_ZFUIColor ZFUIColor
color with AARRGGBB format
Definition ZFUITypeDef.h:1100

valid value format:

  • "AARRGGBB"
  • "RRGGBB"
  • "ARGB"
  • "RGB"

valid prefix:

  • empty ("AARRGGBB")
  • "#" ("#AARRGGBB")
  • "0x" ("0xAARRGGBB")

when serialize back to string, it's ensured to use "#" as prefix, and will try to use the shortest form if available (e.g. "RGB" instead of "AARRGGBB")

◆ ZFTypeId_ZFUITextAppearance()

const zfchar * ZFTypeId_ZFUITextAppearance ( void )
inline


◆ ZFTypeId_ZFUITextTruncateMode()

const zfchar * ZFTypeId_ZFUITextTruncateMode ( void )
inline


◆ ZFTypeId_ZFUIContentScaleType()

const zfchar * ZFTypeId_ZFUIContentScaleType ( void )
inline