Edje Class: Text

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_Listedje_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...
 

Detailed Description

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.

Macro Definition Documentation

#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.

Since
1.8
Parameters
[in]text_class
[in]font
[in]size
[out]ret
See also
edje_object_text_class_set

Referenced by edje_object_text_class_set().

Function Documentation

Eina_Bool edje_text_class_set ( const char *  text_class,
const char *  font,
Evas_Font_Size  size 
)

Set the Edje text class.

Parameters
text_classThe text class name
fontThe font name
sizeThe font size
Returns
EINA_TRUE, on success or EINA_FALSE, on error

This 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.

See also
edje_text_class_get().

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.

Parameters
text_classThe 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.

Returns
A list of text class names (strings). These strings are stringshares and the list must be free()'d by the caller.

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.

Parameters
objA valid Evas_Object handle
text_classThe text class name
fontFont name
sizeFont Size
Returns
EINA_TRUE, on success or EINA_FALSE, on error

This function sets the text class for the Edje.

References edje_obj_text_class_set, and EINA_FALSE.