Functions that deal with Text Classes. More...
Functions | |
Eina_Bool | edje_text_class_set (const char *text_class, const char *font, Evas_Font_Size size) |
Set the Edje text class. More... | |
void | edje_text_class_del (const char *text_class) |
Delete the text class. More... | |
Eina_List * | edje_text_class_list (void) |
List text classes. More... | |
#define | edje_obj_text_class_set(text_class, font, size, ret) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_TEXT_CLASS_SET), EO_TYPECHECK(const char *, text_class), EO_TYPECHECK(const char *, font), EO_TYPECHECK(Evas_Font_Size, size), EO_TYPECHECK(Eina_Bool *, ret) |
Sets Edje text class. More... | |
Eina_Bool | edje_object_text_class_set (Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size) |
Sets Edje text class. More... | |
Functions that deal with Text Classes.
Sometimes we want to change the text of two or more parts equally and that's when we use text classes.
If one or more parts are assigned with a text class, when we set font attributes to this class will update all these parts with the new font attributes. Setting values to a text class at a process level will affect all parts with that text class, while at object level will affect only the parts inside an specified object.
#define edje_obj_text_class_set | ( | text_class, | |
font, | |||
size, | |||
ret | |||
) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_TEXT_CLASS_SET), EO_TYPECHECK(const char *, text_class), EO_TYPECHECK(const char *, font), EO_TYPECHECK(Evas_Font_Size, size), EO_TYPECHECK(Eina_Bool *, ret) |
Sets Edje text class.
[in] | text_class | |
[in] | font | |
[in] | size | |
[out] | ret |
Referenced by edje_object_text_class_set().
Eina_Bool edje_text_class_set | ( | const char * | text_class, |
const char * | font, | ||
Evas_Font_Size | size | ||
) |
Set the Edje text class.
text_class | The text class name |
font | The font name |
size | The font size |
EINA_TRUE
, on success or EINA_FALSE
, on errorThis function updates all Edje members at the process level which belong to this text class with the new font attributes. If the size
is 0 then the font size will be kept with the previous size. If the size
is less then 0 then the font size will be calculated in the percentage. For example, if the size
is -50, then the font size will be scaled to half of the original size and if the size
is -10 then the font size will be scaled as much as 0.1x.
References EINA_FALSE, eina_hash_add(), eina_hash_find(), eina_hash_string_superfast_new(), eina_list_data_get(), eina_list_next(), eina_stringshare_add(), eina_stringshare_replace(), and EINA_TRUE.
void edje_text_class_del | ( | const char * | text_class | ) |
Delete the text class.
text_class | The text class name string |
This function deletes any values at the process level for the specified text class.
References eina_hash_del(), eina_hash_find(), eina_list_data_get(), eina_list_next(), eina_stringshare_del(), and EINA_TRUE.
Eina_List* edje_text_class_list | ( | void | ) |
List text classes.
This function lists all text classes known about by the current process.
References eina_hash_foreach().
Eina_Bool edje_object_text_class_set | ( | Evas_Object * | obj, |
const char * | text_class, | ||
const char * | font, | ||
Evas_Font_Size | size | ||
) |
Sets Edje text class.
obj | A valid Evas_Object handle |
text_class | The text class name |
font | Font name |
size | Font Size |
EINA_TRUE
, on success or EINA_FALSE
, on errorThis function sets the text class for the Edje.
References edje_obj_text_class_set, and EINA_FALSE.