Tizen Native API
Edje Text Part

This group discusses functions that deal with parts of type text.

Remarks:
Text is an element type for parts. It's basic functionality is to display a string on the layout, but a lot more can be done with texts, like string selection, setting the cursor, and including an input panel, where one can set a virtual keyboard to handle keyboard entry easily.

Functions

void edje_object_text_change_cb_set (Evas_Object *obj, Edje_Text_Change_Cb func, void *data)
 Sets the object text callback.
Eina_Bool edje_object_part_text_set (Evas_Object *obj, const char *part, const char *text)
 Sets the text for an object part.
Eina_Bool edje_object_part_text_escaped_set (Evas_Object *obj, const char *part, const char *text)
 Sets the text for an object part, but converts HTML escapes to UTF8.
const char * edje_object_part_text_get (const Evas_Object *obj, const char *part)
 Gets the text of the object part.
void edje_object_part_text_style_user_push (Evas_Object *obj, const char *part, const char *style)
 Sets the style of the textblock part.
const char * edje_object_part_text_style_user_peek (const Evas_Object *obj, const char *part)
 Gets the text of the object part.
void edje_object_part_text_style_user_pop (Evas_Object *obj, const char *part)
 Deletes the top style form of the the user style stack.
Eina_Bool edje_object_part_text_unescaped_set (Evas_Object *obj, const char *part, const char *text_to_escape)
 Sets the raw (non escaped) text for an object part.
char * edje_object_part_text_unescaped_get (const Evas_Object *obj, const char *part)
 Gets the text of the object part, without escaping.
void edje_object_part_text_insert (Evas_Object *obj, const char *part, const char *text)
 Inserts text for an object part.
void edje_object_part_text_append (Evas_Object *obj, const char *part, const char *text)
 Inserts text for an object part.
const Eina_Listedje_object_part_text_anchor_list_get (const Evas_Object *obj, const char *part)
 Gets a list of char anchor names.
const Eina_Listedje_object_part_text_anchor_geometry_get (const Evas_Object *obj, const char *part, const char *anchor)
 Gets a list of Evas_Textblock_Rectangle anchor rectangles.
const Eina_Listedje_object_part_text_item_list_get (const Evas_Object *obj, const char *part)
 Gets a list of char item names.
Eina_Bool edje_object_part_text_item_geometry_get (const Evas_Object *obj, const char *part, const char *item, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
 Gets the item geometry.
void edje_object_part_text_user_insert (const Evas_Object *obj, const char *part, const char *text)
 Inserts text as if the user has inserted it.

Typedefs

typedef void(* Edje_Text_Change_Cb )(void *data, Evas_Object *obj, const char *part)
 Edje text change callback prototype.

Function Documentation

const Eina_List* edje_object_part_text_anchor_geometry_get ( const Evas_Object obj,
const char *  part,
const char *  anchor 
)

Gets a list of Evas_Textblock_Rectangle anchor rectangles.

This function returns a list of Evas_Textblock_Rectangle anchor rectangles.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]anchorThe anchor name
Returns:
The list of anchor rects (const Evas_Textblock_Rectangle *), do not modify them
Geometry is relative to the entry part.
const Eina_List* edje_object_part_text_anchor_list_get ( const Evas_Object obj,
const char *  part 
)

Gets a list of char anchor names.

This function returns a list of char anchor names.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
Returns:
The list of anchors (const char *), do not modify them
void edje_object_part_text_append ( Evas_Object obj,
const char *  part,
const char *  text 
)

Inserts text for an object part.

This function inserts the text for an object part at the end. It does not move the cursor.

Since (EFL) :
1.1
Since :
2.3.1
Parameters:
[in]objA valid Evas Object handle
[in]partThe part name
[in]textThe text string
Eina_Bool edje_object_part_text_escaped_set ( Evas_Object obj,
const char *  part,
const char *  text 
)

Sets the text for an object part, but converts HTML escapes to UTF8.

This converts the given string text to UTF8 assuming it contains HTML style escapes like "&" and "©", IF the part is of type TEXT, as opposed to TEXTBLOCK.

Since (EFL) :
1.2
Since :
2.3.1
Parameters:
[in]objA valid Evas Object handle
[in]partThe part name
[in]textThe text string
Returns:
EINA_TRUE on success, otherwise EINA_FALSE
const char* edje_object_part_text_get ( const Evas_Object obj,
const char *  part 
)

Gets the text of the object part.

This function returns the text associated with the object part.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
Returns:
The text string
See also:
edje_object_part_text_set()
void edje_object_part_text_insert ( Evas_Object obj,
const char *  part,
const char *  text 
)

Inserts text for an object part.

This function inserts the text for an object part just before the cursor position.

Since :
2.3.1
Parameters:
[in]objA valid Evas Object handle
[in]partThe part name
[in]textThe text string
Eina_Bool edje_object_part_text_item_geometry_get ( const Evas_Object obj,
const char *  part,
const char *  item,
Evas_Coord cx,
Evas_Coord cy,
Evas_Coord cw,
Evas_Coord ch 
)

Gets the item geometry.

This function returns a list of Evas_Textblock_Rectangle item rectangles.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]itemThe item name
[out]cxThe item's x coordinate (relative to the entry part)
[out]cyThe item's y coordinate (relative to the entry part)
[out]cwThe item width
[out]chThe item height
Returns:
1 if the item exists, otherwise 0 if it does not
const Eina_List* edje_object_part_text_item_list_get ( const Evas_Object obj,
const char *  part 
)

Gets a list of char item names.

This function returns a list of char item names.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
Returns:
The list of items (const char *), do not modify them
Eina_Bool edje_object_part_text_set ( Evas_Object obj,
const char *  part,
const char *  text 
)

Sets the text for an object part.

Since :
2.3.1
Parameters:
[in]objA valid Evas Object handle
[in]partThe part name
[in]textThe text string
Returns:
EINA_TRUE on success, otherwise EINA_FALSE
const char* edje_object_part_text_style_user_peek ( const Evas_Object obj,
const char *  part 
)

Gets the text of the object part.

This function returns the style associated with the textblock part.

Since (EFL) :
1.2.0
Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
Returns:
The text string
void edje_object_part_text_style_user_pop ( Evas_Object obj,
const char *  part 
)

Deletes the top style form of the the user style stack.

Since (EFL) :
1.2.0
Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
void edje_object_part_text_style_user_push ( Evas_Object obj,
const char *  part,
const char *  style 
)

Sets the style of the textblock part.

This function sets the style associated with the textblock part

Since :
2.3.1
Since (EFL) :
1.2.0
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]styleThe style to set (textblock conventions)
char* edje_object_part_text_unescaped_get ( const Evas_Object obj,
const char *  part 
)

Gets the text of the object part, without escaping.

This function is the counterpart of edje_object_part_text_unescaped_set(). Note that the result is newly allocated memory and should be released with free() when done.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
Returns:
The allocated text string without escaping, otherwise NULL on errors
See also:
edje_object_part_text_unescaped_set()
Eina_Bool edje_object_part_text_unescaped_set ( Evas_Object obj,
const char *  part,
const char *  text_to_escape 
)

Sets the raw (non escaped) text for an object part.

This funciton does escape for you if it is a TEXTBLOCK part, that is, if text contains tags, these tags are not interpreted/parsed by the TEXTBLOCK.

Since :
2.3.1
Parameters:
[in]objA valid Evas Object handle
[in]partThe part name
[in]text_to_escapeThe text string
Returns:
EINA_TRUE if success, otherwise EINA_FALSE
See also:
edje_object_part_text_unescaped_get()
void edje_object_part_text_user_insert ( const Evas_Object obj,
const char *  part,
const char *  text 
)

Inserts text as if the user has inserted it.

Since (EFL) :
1.2.0
Since :
2.3.1
Remarks:
This means it actually registers as a change and emits signals, triggers callbacks as appropriate.
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]textThe text string
void edje_object_text_change_cb_set ( Evas_Object obj,
Edje_Text_Change_Cb  func,
void *  data 
)

Sets the object text callback.

This function sets the callback to be called when the text changes.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]funcThe callback function to handle the text change
[in]dataThe data associated with the callback function