styleable element that can apply style from another object More...
#include <ZFStyleable.h>
Public Member Functions | |
| virtual zfautoT< ZFStyleable > | copy (void) |
| return a copy of this object | |
| virtual void | copyFrom (ZFObject *anotherStyleable) |
| copy from another object | |
| virtual zfanyT< ZFStyleable > | defaultStyle (void) |
| return default style of this instance | |
| 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 | |
| zfbool | progressUpdate (ZFStyleable *from, ZFStyleable *to, zffloat progress) |
| update object according to progress | |
| Public Member Functions inherited from ZFInterface | |
| virtual const ZFClass * | classData (void)=0 |
| get instance's class info | |
| virtual ZFObject * | toObject (void)=0 |
| convert to ZFObject type | |
Static Public Member Functions | |
| static const ZFClass * | ClassData (void) |
| get class info | |
| Static Public Member Functions inherited from ZFInterface | |
| static const ZFClass * | ClassData (void) |
| get class info | |
Protected Types | |
| typedef ZFInterface | zfsuper |
| typedef for super (always ZFInterface for an interface type) | |
| typedef ZFStyleable | zfself |
| typedef for self | |
| Protected Types inherited from ZFInterface | |
| typedef _ZFP_ObjI_Base | zfsuper |
| typedef for super (always ZFInterface for an interface type) | |
| typedef ZFInterface | zfself |
| typedef for self | |
Protected Member Functions | |
| virtual void | styleableOnCopyPropertyFrom (ZFObject *anotherStyleable, const ZFProperty *property) |
| copy property with styleable logic | |
| virtual void | styleableOnCopyFrom (ZFObject *anotherStyleable) |
| for subclass to achieve custom style copy step, called by copyFrom, see ZFStyleable | |
| virtual zfbool | progressOnUpdate (ZFStyleable *from, ZFStyleable *to, zffloat progress) |
| see progressUpdate | |
styleable element that can apply style from another object
a styleable typically is a serializable, while serializable process data from and to ZFSerializableData, a styleable process data from and to other styleable object
to use styleable, simply implement from ZFStyleable, if all of your properties are declared as ZFProperty, then every thing's done, and style can be copied by ZFStyleable::copyFrom
for how styleable would be copied, see styleableOnCopyPropertyFrom
|
virtual |
copy from another object
do nothing if type mismatch
|
virtual |
return default style of this instance
note this method use reflection to find the default style (see ZFSTYLE_DEFAULT_DECLARE), cache it first if necessary
|
protectedvirtual |
for subclass to achieve custom style copy step, called by copyFrom, see ZFStyleable
Reimplemented in ZFContainer, ZFEnum, ZFRegExp, ZFTextTemplateRunFilter, ZFTime, ZFTypeIdWrapper, ZFUIAutoLayout, ZFUIAutoLayoutParam, ZFUIImage, and ZFUIView.
| zfbool ZFStyleable::progressUpdate | ( | ZFStyleable * | from, |
| ZFStyleable * | to, | ||
| zffloat | progress ) |
update object according to progress
progress usually ranged in [0.0, 1.0], but may exceed range such as bouncing
|
inlineprotectedvirtual |
see progressUpdate
Reimplemented in v_ZFArgs, v_ZFBezier, v_zfbool, v_zfbyte, v_ZFCallback, v_ZFCallbackType, v_ZFCallerInfo, v_zfchar, v_ZFClass, v_ZFClassDataUpdateData, v_ZFClassDataUpdateType, v_ZFClassInstanceObserverAddParam, v_ZFCompareResult, v_zfdouble, v_ZFDynamic, v_zfflags, v_zffloat, v_ZFFrameworkState, v_ZFFuncAddrType, v_zfidentity, v_ZFIdentityGenerator, v_zfindex, v_ZFIndexRange, v_zfint, v_ZFIOFindData, v_zfiter, v_ZFJson, v_ZFJsonOutputToken, v_ZFLevel, v_zflong, v_ZFMethod, v_ZFMethodAccessType, v_ZFMethodDynamicRegisterParam, v_ZFMethodGenericInvoker, v_ZFMethodType, v_ZFMP, v_ZFObjectInstanceState, v_ZFObserver, v_ZFObserverGroup, v_ZFPathInfo, v_ZFProperty, v_ZFPropertyCallbackDynamicRegisterInitValueGetter, v_ZFPropertyDynamicRegisterParam, v_ZFProtocol, v_ZFProtocolImplInfo, v_zfptr, v_ZFRegExpResult, v_ZFSDOutputToken, v_ZFSeekPos, v_ZFSerializableData, v_ZFSerializablePropertyType, v_zfstring, v_ZFTextTemplateIndexData, v_ZFTextTemplateParam, v_ZFTimeInfo, v_zftimet, v_ZFTimeValue, v_ZFTokenForContainer, v_ZFTokenForKeyValueContainer, v_ZFUdpAddr, v_ZFUIAutoLayoutRule, v_ZFUICellUpdaterParam, v_ZFUIColor, v_ZFUIMargin, v_zfuint, v_ZFUIPoint, v_ZFUIRect, v_ZFUISize, v_ZFUISizeParam, v_ZFUIViewBlinkParam, v_ZFUIViewFocusNextParam, v_zfulong, v_zfweak, v_zfwrap, v_ZFXml, v_ZFXmlOutputToken, and ZFStruct.