Attribute Environment
[Control SDK]
Detailed Description
- The attributes that are not stored at the control, are stored in a hash table (see Hash Table).
- As a general rule use:
- IupGetAttribute, IupSetAttribute, ... : when care about control implementation, inheritance, hash table and default value
- iupAttribGetStr, iupAttribSetStr, ... : when NOT care, ONLY access the hash table
- iupAttribGetStrDefault : same as iupAttribGetStr, but checks the default value These different functions have very different performances and results. So use them wiselly.
- See iup_attrib.h
Functions | |
int | iupAttribIsInternal (const char *name) |
int | iupAttribIsPointer (const char *name) |
int | iupAttribIsInheritable (const char *name) |
void | iupAttribSetStr (Ihandle *ih, const char *name, char *value) |
void | iupAttribStoreStr (Ihandle *ih, const char *name, const char *value) |
void | iupAttribSetStrf (Ihandle *ih, const char *name, const char *format,...) |
void | iupAttribSetInt (Ihandle *ih, const char *name, int num) |
void | iupAttribSetFloat (Ihandle *ih, const char *name, float num) |
char * | iupAttribGetStr (Ihandle *ih, const char *name) |
char * | iupAttribGetStrDefault (Ihandle *ih, const char *name) |
int | iupAttribGetInt (Ihandle *ih, const char *name) |
int | iupAttribGetIntDefault (Ihandle *ih, const char *name) |
float | iupAttribGetFloat (Ihandle *ih, const char *name) |
float | iupAttribGetFloatDefault (Ihandle *ih, const char *name) |
Function Documentation
|
Returns true if the attribute name if in the internal format "_IUP...". |
|
Returns true if the attribute name is a known pointer. |
|
Returns true if the attribute is inheritable. valid only for a small group of common attributes. Not used internally. The inheritance in handled directly by the Attribute Function registration in the Base Class. |
|
Sets the attribute only in the attribute environment as a pointer. It ignores children. |
|
Sets the attribute only in the attribute environment as a string. The string is internally duplicated. It ignores children. |
|
Sets the attribute only in the attribute environment as a string. The string is internally duplicated. Use same format as sprintf. It ignores children. |
|
Sets an integer attribute only in the attribute environment. It will be stored as a string. It ignores children. |
|
Sets an floating point attribute only in the attribute environment. It will be stored as a string. It ignores children. |
|
Returns the attribute from the attribute environment. It ignores inheritance. |
|
Returns the attribute from the attribute environment, but if not defined then returns the registered default value if any. It ignores inheritance. |
|
Returns the attribute from the attribute environment as an integer. It ignores inheritance. |
|
Returns the attribute from the attribute environment as an integer, but if not defined then returns the registered default value if any. It ignores inheritance. |
|
Returns the attribute from the attribute environment as a floating point. It ignores inheritance. |
|
Returns the attribute from the attribute environment as a floating point, but if not defined then returns the registered default value if any. It ignores inheritance. |