#include <fbproperties.h>
A property is a holder for function callbacks into the internals of the application.
You cannot instantiate FBProperty objects. To reference a property:
myProp = myObject.PropertyList.Find( 'Visibility' )
if myProp: myProp.Data = True
Definition at line 171 of file fbproperties.h.
Public Member Functions |
|
FBProperty () | |
Constructor. |
|
IObject_Declare (Implementation) | |
IObject_Declare Interface to IObject. |
|
FBProperty * | InitInternal (KProperty *pProperty) |
Initialize internal pointer. |
|
KProperty * | GetInternal () const |
Get property. |
|
void * | GetValuePtr () const |
Get property value. |
|
FBProperty * | CreateInternal (FBComponent *pParent, char *pName, fbExternalGetSetHandler pGet=NULL, fbExternalGetSetHandler pSet=NULL) |
Creation of internal property. |
|
void | SetInternal (KProperty *pInternal) |
Set internal property. |
|
void | SetEnable (bool pValue) |
Set property enable status. |
|
char * | GetName () |
Get the property's name. |
|
void | SetName (char *pName) |
Set the property's name. |
|
virtual FBPropertyType | GetPropertyType () |
Get the property's type. |
|
char * | GetPropertyTypeName () |
Get the property's type name. |
|
virtual KDataType * | GetDataType () |
Get the property datatype pointer. |
|
int | AsInt () |
Get the property as an integer. |
|
bool | SetInt (int pInt) |
Set the property from an integer. |
|
virtual char * | AsString () |
Get the property as a string. |
|
virtual bool | SetString (char *pString) |
Set the property from a string. |
|
bool | IsMinClamp () |
Indicate if minimum value clamping will be
applied on user input value. |
|
bool | IsMaxClamp () |
Indicate if maximum value clamping will be
applied on user input value. |
|
bool | IsTemporaryProperty () |
Indicate if a property was created on
retrieve because it didn't exist. |
|
bool | AcceptTemporaryProperty (const char *pEnumList[]=NULL, fbExternalGetSetHandler pGet=NULL, fbExternalGetSetHandler pSet=NULL) |
Accept a temporary property as a dynamic
property. |
|
bool | IsObjectList () |
Indicate if is an instance of FBPropertyListObject. |
|
virtual bool | IsReadOnly () |
Is property read-only? |
|
virtual char * | EnumList (int pIndex) |
Return the string of an enum value. |
|
FBStringList * | GetEnumStringList (bool pCreateIt=false) |
String list for enum properties. |
|
void | NotifyEnumStringListChanged () |
Notify system that the enum list was
modified. |
|
void | ModifyPropertyFlag (FBPropertyFlag pFlag, bool pValue) |
ModifyPropertyFlag. |
|
FBPropertyFlag | GetPropertyFlags () |
GetPropertyFlags. |
|
bool | GetPropertyFlag (FBPropertyFlag pFlag) |
GetPropertyFlag. |
|
void | SetMinMax (double pMin, double pMax, bool pForceMinClamp=false, bool pForceMaxClamp=false) |
SetMinMax. |
|
void | SetMin (double pMin, bool pForceMinClamp=false) |
SetMin. |
|
void | SetMax (double pMax, bool pForceMaxClamp=false) |
SetMax. |
|
double | GetMin () |
GetMin. |
|
double | GetMax () |
GetMax. |
|
void * | GetParent () |
Get the parent of the object. |
|
virtual void | SetData (void *pData) |
Set the value of the property, passing the
type as an argument. |
|
virtual void | GetData (void *pData, int pSize, FBEvaluateInfo *pEvalInfo=NULL) const |
Get the value of a property. |
|
virtual bool | IsList () |
Verify if property is of this type. |
|
virtual bool | IsAnimatable () |
Verify if property is of this type. |
|
bool | IsInternal () const |
Verify if property is of this type. |
|
bool | IsUserProperty () |
Verify if property is of this type. |
|
bool | IsReferenceProperty () |
Verify if property is of this type. |
|
Protected Attributes |
|
FBString | mName |
void * | mParent |
FBProperty | ( | ) |
Constructor.
FBProperty* InitInternal | ( | KProperty * | pProperty | ) |
Initialize internal pointer.
KProperty* GetInternal | ( | ) | const |
Get property.
void* GetValuePtr | ( | ) | const |
Get property value.
FBProperty* CreateInternal | ( | FBComponent * | pParent, | |
char * | pName, | |||
fbExternalGetSetHandler | pGet = NULL , |
|||
fbExternalGetSetHandler | pSet = NULL |
|||
) |
Creation of internal property.
void SetInternal | ( | KProperty * | pInternal | ) |
Set internal property.
void SetEnable | ( | bool | pValue | ) |
Set property enable status.
char* GetName | ( | ) |
Get the property's name.
void SetName | ( | char * | pName | ) |
Set the property's name.
pName | New name for the property. |
virtual FBPropertyType GetPropertyType | ( | ) | [virtual] |
Get the property's type.
Reimplemented in FBPropertyListComponentBase, FBPropertyEvent, FBPropertyBase, FBPropertyStringList, FBPropertyBaseAnimatable, FBPropertyBase< tType, kFBPT_object >, FBPropertyBase< tType, kFBPT_enum >, FBPropertyBase< bool, kFBPT_Action >, and FBPropertyBaseAnimatable< int, kFBPT_enum >.
char* GetPropertyTypeName | ( | ) |
Get the property's type name.
virtual KDataType* GetDataType | ( | ) | [virtual] |
Get the property datatype pointer.
Reimplemented in FBPropertyAnimatable.
virtual void SetData | ( | void * | pData | ) | [virtual] |
Set the value of the property, passing the type as an argument.
pData | Value to affect property with. |
Reimplemented in FBPropertyBase, FBPropertyAnimatable, FBPropertyBase< tType, kFBPT_object >, FBPropertyBase< tType, kFBPT_enum >, and FBPropertyBase< bool, kFBPT_Action >.
Referenced by FBPropertyBase< bool, kFBPT_Action >::SetData().
virtual void GetData | ( | void * | pData, | |
int | pSize, | |||
FBEvaluateInfo * | pEvalInfo = NULL |
|||
) | const [virtual] |
Get the value of a property.
pData | Value to fill with property's current value. |
pSize | Size of pData buffer | |
pEvalInfo | Used only with animated properties |
Reimplemented in FBPropertyBase, FBPropertyBase< tType, kFBPT_object >, FBPropertyBase< tType, kFBPT_enum >, and FBPropertyBase< bool, kFBPT_Action >.
Referenced by FBPropertyBase< bool, kFBPT_Action >::GetData().
int AsInt | ( | ) |
Get the property as an integer.
Referenced by FBPropertyBaseEnum::AsString().
bool SetInt | ( | int | pInt | ) |
Set the property from an integer.
pInt | Int to set property from. |
virtual char* AsString | ( | ) | [virtual] |
Get the property as a string.
Reimplemented in FBPropertyBaseEnum, FBPropertyStringList, and FBPropertyBaseAnimatableEnum.
virtual bool SetString | ( | char * | pString | ) | [virtual] |
Set the property from a string.
pString | String to set property from. |
Reimplemented in FBPropertyBaseEnum, FBPropertyStringList, and FBPropertyBaseAnimatableEnum.
virtual bool IsList | ( | ) | [virtual] |
Verify if property is of this type.
Reimplemented in FBPropertyBasicList, and FBPropertyStringList.
virtual bool IsAnimatable | ( | ) | [virtual] |
Verify if property is of this type.
Reimplemented in FBPropertyAnimatable.
bool IsInternal | ( | ) | const |
Verify if property is of this type.
Referenced by FBPropertyBaseEnum::EnumList().
bool IsUserProperty | ( | ) |
Verify if property is of this type.
bool IsReferenceProperty | ( | ) |
Verify if property is of this type.
bool IsMinClamp | ( | ) |
Indicate if minimum value clamping will be applied on user input value.
bool IsMaxClamp | ( | ) |
Indicate if maximum value clamping will be applied on user input value.
bool IsTemporaryProperty | ( | ) |
Indicate if a property was created on retrieve because it didn't exist.
bool AcceptTemporaryProperty | ( | const char * | pEnumList[] =
NULL , |
|
fbExternalGetSetHandler | pGet = NULL , |
|||
fbExternalGetSetHandler | pSet = NULL |
|||
) |
Accept a temporary property as a dynamic property.
bool IsObjectList | ( | ) |
Indicate if is an instance of FBPropertyListObject.
virtual bool IsReadOnly | ( | ) | [virtual] |
Is property read-only?
Reimplemented in FBPropertyBase, FBPropertyBase< tType, kFBPT_object >, FBPropertyBase< tType, kFBPT_enum >, and FBPropertyBase< bool, kFBPT_Action >.
Referenced by FBPropertyBase< bool, kFBPT_Action >::IsReadOnly().
virtual char* EnumList | ( | int | pIndex | ) | [virtual] |
Return the string of an enum value.
pIndex | Enum value to get string for. |
pIndex
.Reimplemented in FBPropertyBaseEnum, and FBPropertyBaseAnimatableEnum.
Referenced by FBPropertyBaseAnimatableEnum::EnumList(), and FBPropertyBaseEnum::EnumList().
FBStringList* GetEnumStringList | ( | bool | pCreateIt = false |
) |
String list for enum properties.
pCreateIt | Create a new list if necessary. |
void NotifyEnumStringListChanged | ( | ) |
Notify system that the enum list was modified.
void ModifyPropertyFlag | ( | FBPropertyFlag | pFlag, | |
bool | pValue | |||
) |
ModifyPropertyFlag.
pFlag | The flag to switch to True or False. | |
pValue | The value to set about this flag. |
FBPropertyFlag GetPropertyFlags | ( | ) |
GetPropertyFlags.
bool GetPropertyFlag | ( | FBPropertyFlag | pFlag | ) |
GetPropertyFlag.
pFlag | Flag to test if it is True or False. |
void SetMinMax | ( | double | pMin, | |
double | pMax, | |||
bool | pForceMinClamp =
false , |
|||
bool | pForceMaxClamp =
false |
|||
) |
SetMinMax.
pMin | Minimum value of the property. | |
pMax | Maximum value of the property. | |
pForceMinClamp | Force clamping to minimum value of the property. | |
pForceMaxClamp | Force clamping to maximum value of the property. |
void SetMin | ( | double | pMin, | |
bool | pForceMinClamp =
false |
|||
) |
SetMin.
pMin | Minimum value of the property. | |
pForceMinClamp | Force clamping to minimum value of the property. |
void SetMax | ( | double | pMax, | |
bool | pForceMaxClamp =
false |
|||
) |
SetMax.
pMax | Maximum value of the property. | |
pForceMaxClamp | Force clamping to maximum value of the property. |
double GetMin | ( | ) |
GetMin.
double GetMax | ( | ) |
GetMax.
void* GetParent | ( | ) | [inline] |
Get the parent of the object.
Definition at line 382 of file fbproperties.h.
mName Property unique name.
Definition at line 177 of file fbproperties.h.
void* mParent
[protected] |
mParent Parent of the property.
Definition at line 179 of file fbproperties.h.