Etk
Main Page Object Hierarchy Data Structures Related Pages
Etk

etk_textblock.c File Reference


Detailed Description


Functions

Etk_Textblock * etk_textblock_new ()
 Creates a new textblock.
void etk_textblock_text_set (Etk_Textblock *tb, const char *text, Etk_Bool markup)
 Sets the text of the textblock. The current text will be replaced by text.
Etk_String * etk_textblock_text_get (Etk_Textblock *tb, Etk_Bool markup)
 Gets the text of the textblock.
Etk_String * etk_textblock_range_text_get (Etk_Textblock *tb, Etk_Textblock_Iter *iter1, Etk_Textblock_Iter *iter2, Etk_Bool markup)
 Gets the text of the textblock, between iter1 and iter2.
void etk_textblock_insert (Etk_Textblock *tb, Etk_Textblock_Iter *iter, const char *text, int length)
 Inserts length bytes of text at iter in the textblock. If you want to use tags to format the text to insert, use etk_textblock_insert_markup() instead.
void etk_textblock_insert_markup (Etk_Textblock *tb, Etk_Textblock_Iter *iter, const char *markup_text, int length)
 Inserts length bytes of text at iter in the textblock. You can use tags to format the text to insert.
void etk_textblock_clear (Etk_Textblock *tb)
 Clears the textblock: removes all the text and all the tags.
void etk_textblock_delete_before (Etk_Textblock *tb, Etk_Textblock_Iter *iter)
 Deletes the char before the iterator.
void etk_textblock_delete_after (Etk_Textblock *tb, Etk_Textblock_Iter *iter)
 Deletes the char after the iterator.
void etk_textblock_delete_range (Etk_Textblock *tb, Etk_Textblock_Iter *iter1, Etk_Textblock_Iter *iter2)
 Deletes the text between iter1 and iter2.
Etk_Textblock_Iter * etk_textblock_iter_new (Etk_Textblock *tb)
 Creates a new iterator for the textblock.
void etk_textblock_iter_free (Etk_Textblock_Iter *iter)
 Destroys an iterator of the textblock.
void etk_textblock_iter_gravity_set (Etk_Textblock_Iter *iter, Etk_Textblock_Gravity gravity)
 Sets the gravity of the iterator. The gravity describes how the iterator should be placed when text is inserted at the iterator's position.
Etk_Textblock_Gravity etk_textblock_iter_gravity_get (Etk_Textblock_Iter *iter)
 Gets the gravity of the iterator.
void etk_textblock_iter_backward_start (Etk_Textblock_Iter *iter)
 Moves the iterator to the start of the textblock.
void etk_textblock_iter_forward_end (Etk_Textblock_Iter *iter)
 Moves the iterator to the end of the textblock.
Etk_Bool etk_textblock_iter_backward_char (Etk_Textblock_Iter *iter)
 Moves the iterator backward by one character offset.
Etk_Bool etk_textblock_iter_forward_char (Etk_Textblock_Iter *iter)
 Moves the iterator forward by one character offset.
void etk_textblock_iter_copy (Etk_Textblock_Iter *dest, const Etk_Textblock_Iter *src)
 Copies the iterator src to the iterator dest.
int etk_textblock_iter_compare (Etk_Textblock_Iter *iter1, Etk_Textblock_Iter *iter2)
 Compares two iterators.
Evas_Object * etk_textblock_object_add (Etk_Textblock *tb, Evas *evas)
 Creates a new evas object that will display the content of the textblock.
A textblock can have several evas objects which display its content. All the evas objects are automatically updated when the textblock's content is changed.
void etk_textblock_object_wrap_set (Evas_Object *tbo, Etk_Textblock_Wrap wrap)
 Sets how the text of the textblock object should be wrapped by default (a paragraph can override this setting).
Etk_Textblock_Wrap etk_textblock_object_wrap_get (Evas_Object *tbo)
 Gets the default wrap mode of the textblock object.
Etk_Textblock_Iter * etk_textblock_object_cursor_get (Evas_Object *tbo)
 Gets the cursor's iterator of the textblock object.
Etk_Textblock_Iter * etk_textblock_object_selection_bound_get (Evas_Object *tbo)
 Gets the selection bound's iterator of the textblock object.
void etk_textblock_object_cursor_visible_set (Evas_Object *tbo, Etk_Bool visible)
 Sets whether the cursor of the textblock object is visible or not.
Etk_Bool etk_textblock_object_cursor_visible_get (Evas_Object *tbo)
 Gets whether the cursor of the textblock object is visible or not.
int etk_textblock_unicode_length_get (const char *unicode_string)
 Gets the length of a unicode-encoded string. It's not always the number of bytes of the string since a character can be encoded with several bytes in unicode.
Etk_Bool etk_textblock_is_white_char (int c)
 Gets whether or not the unicode char is a white char.
void etk_textblock_char_size_get (Evas *evas, const char *font_face, int font_size, int *w, int *h)
 Gets the average size of a character written with font font_name.
void etk_textblock_printf (Etk_Textblock *tb)
 Prints the textblock hierarchy for debug TODO: etk_textblock_printf(): Remove this function.