styleable element that can apply style from another object More...
#include <ZFStyleable.h>
Public Member Functions | |
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 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 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 | |
![]() | |
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 styleableCopyFrom, see ZFStyleable | |
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::styleableCopyFrom
for how styleable would be copied, see styleableOnCopyPropertyFrom
|
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
void ZFStyleable::styleableCopyFrom | ( | ZFObject * | anotherStyleable | ) |
copy style from another styleable, see ZFStyleable
usually you should not override this method, override styleableOnCopyFrom instead
|
protectedvirtual |
for subclass to achieve custom style copy step, called by styleableCopyFrom, see ZFStyleable
Reimplemented in ZFTypeIdWrapper, ZFUIAutoLayout, ZFUIAutoLayoutParam, ZFUIImage, and ZFUIView.