Etk
Main Page Object Hierarchy Data Structures Related Pages
Etk

Etk_Textblock


Detailed Description

TODO: Etk_Textblock: brief description.


Data Structures

struct  Etk_Textblock_Format
struct  Etk_Textblock_Node
struct  Etk_Textblock_Iter
 The structure of a textblock iterator. More...
struct  Etk_Textblock
 [Object] The structure of a textblock More...

Defines

#define ETK_TEXTBLOCK_TYPE   (etk_textblock_type_get())
#define ETK_TEXTBLOCK(obj)   (ETK_OBJECT_CAST((obj), ETK_TEXTBLOCK_TYPE, Etk_Textblock))
#define ETK_IS_TEXTBLOCK(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_TEXTBLOCK_TYPE))

Enumerations

enum  Etk_Textblock_Wrap {
  ETK_TEXTBLOCK_WRAP_NONE,
  ETK_TEXTBLOCK_WRAP_DEFAULT,
  ETK_TEXTBLOCK_WRAP_WORD,
  ETK_TEXTBLOCK_WRAP_CHAR
}
 The different types of wrapping to apply on a textblock object. More...
enum  Etk_Textblock_Node_Type {
  ETK_TEXTBLOCK_NODE_ROOT,
  ETK_TEXTBLOCK_NODE_PARAGRAPH,
  ETK_TEXTBLOCK_NODE_LINE,
  ETK_TEXTBLOCK_NODE_NORMAL
}
 The different types of node. More...
enum  Etk_Textblock_Tag_Type {
  ETK_TEXTBLOCK_TAG_DEFAULT,
  ETK_TEXTBLOCK_TAG_BOLD,
  ETK_TEXTBLOCK_TAG_ITALIC,
  ETK_TEXTBLOCK_TAG_UNDERLINE,
  ETK_TEXTBLOCK_TAG_STRIKETHROUGH,
  ETK_TEXTBLOCK_TAG_P,
  ETK_TEXTBLOCK_TAG_STYLE,
  ETK_TEXTBLOCK_TAG_FONT
}
 The different types of tag for a node. More...
enum  Etk_Textblock_Style_Type {
  ETK_TEXTBLOCK_STYLE_NONE,
  ETK_TEXTBLOCK_STYLE_OUTLINE,
  ETK_TEXTBLOCK_STYLE_SHADOW,
  ETK_TEXTBLOCK_STYLE_SOFT_OUTLINE,
  ETK_TEXTBLOCK_STYLE_GLOW,
  ETK_TEXTBLOCK_STYLE_OUTLINE_SHADOW,
  ETK_TEXTBLOCK_STYLE_FAR_SHADOW,
  ETK_TEXTBLOCK_STYLE_OUTLINE_SOFT_SHADOW,
  ETK_TEXTBLOCK_STYLE_SOFT_SHADOW,
  ETK_TEXTBLOCK_STYLE_FAR_SOFT_SHADOW
}
 The different types of style that can be applied on a text. More...
enum  Etk_Textblock_Underline_Type {
  ETK_TEXTBLOCK_UNDERLINE_NONE,
  ETK_TEXTBLOCK_UNDERLINE_SINGLE,
  ETK_TEXTBLOCK_UNDERLINE_DOUBLE
}
 The different type of underlining for a text. More...
enum  Etk_Textblock_Gravity

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.


Define Documentation

#define ETK_TEXTBLOCK_TYPE   (etk_textblock_type_get())

Gets the type of a textblock

Referenced by etk_textblock_new().

#define ETK_TEXTBLOCK ( obj   )     (ETK_OBJECT_CAST((obj), ETK_TEXTBLOCK_TYPE, Etk_Textblock))

Casts the object to an Etk_Textblock

Referenced by etk_textblock_new().

#define ETK_IS_TEXTBLOCK ( obj   )     (ETK_OBJECT_CHECK_TYPE((obj), ETK_TEXTBLOCK_TYPE))

Check if the object is an Etk_Textblock


Enumeration Type Documentation

enum Etk_Textblock_Wrap

The different types of wrapping to apply on a textblock object.

Enumerator:
ETK_TEXTBLOCK_WRAP_NONE  The text is not wrapped
ETK_TEXTBLOCK_WRAP_DEFAULT  TODOC
ETK_TEXTBLOCK_WRAP_WORD  The text is wrapped between the words (or between the chars if it's not sufficient)
ETK_TEXTBLOCK_WRAP_CHAR  The text is wrapped between the chars

enum Etk_Textblock_Node_Type

The different types of node.

Enumerator:
ETK_TEXTBLOCK_NODE_ROOT  The node is the root node
ETK_TEXTBLOCK_NODE_PARAGRAPH  The node is a paragraph node
ETK_TEXTBLOCK_NODE_LINE  The node is a line node
ETK_TEXTBLOCK_NODE_NORMAL  The node is a normal node (containing some text or a format)

enum Etk_Textblock_Tag_Type

The different types of tag for a node.

Enumerator:
ETK_TEXTBLOCK_TAG_DEFAULT  The default tag: no formatting
ETK_TEXTBLOCK_TAG_BOLD  The text is bold
ETK_TEXTBLOCK_TAG_ITALIC  The text is italic
ETK_TEXTBLOCK_TAG_UNDERLINE  The text is underlined
ETK_TEXTBLOCK_TAG_STRIKETHROUGH  The text is strikethrough
ETK_TEXTBLOCK_TAG_P  The tag describes a paragraph
ETK_TEXTBLOCK_TAG_STYLE  The tag describes the style of the text (normal, glow, ...)
ETK_TEXTBLOCK_TAG_FONT  The tag describes the font used by the text (face, size, ...)

enum Etk_Textblock_Style_Type

The different types of style that can be applied on a text.

Enumerator:
ETK_TEXTBLOCK_STYLE_NONE  No style is applied
ETK_TEXTBLOCK_STYLE_OUTLINE  The text is outlined
ETK_TEXTBLOCK_STYLE_SHADOW  The text has a sharp shadow
ETK_TEXTBLOCK_STYLE_SOFT_OUTLINE  The text has a soft outline
ETK_TEXTBLOCK_STYLE_GLOW  The text has a glow
ETK_TEXTBLOCK_STYLE_OUTLINE_SHADOW  The text is outlined and has a sharp shadow
ETK_TEXTBLOCK_STYLE_FAR_SHADOW  The text has a sharp far shadow
ETK_TEXTBLOCK_STYLE_OUTLINE_SOFT_SHADOW  The text is outlined and has a soft shadow
ETK_TEXTBLOCK_STYLE_SOFT_SHADOW  The text has a soft shadow
ETK_TEXTBLOCK_STYLE_FAR_SOFT_SHADOW  The text has a far soft shadow

enum Etk_Textblock_Underline_Type

The different type of underlining for a text.

Enumerator:
ETK_TEXTBLOCK_UNDERLINE_NONE  The text is not underlined
ETK_TEXTBLOCK_UNDERLINE_SINGLE  The text is underlined by a single line
ETK_TEXTBLOCK_UNDERLINE_DOUBLE  The text is underlined by two lines

enum Etk_Textblock_Gravity

TODOC


Function Documentation

Etk_Textblock * etk_textblock_new (  ) 

Creates a new textblock.

Returns:
Returns the new textblock

References etk_object_new(), ETK_TEXTBLOCK, and ETK_TEXTBLOCK_TYPE.

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.

Parameters:
tb a textblock
text the text to set
markup whether or not you want to apply markup and styling on the text. If markup is ETK_TRUE, you can use tags to format the text.
Note:
After that, the iterators with right gravity will be at the end of the textblock, and iterators with left gravity will be at the start of the textblock

References etk_textblock_clear(), etk_textblock_insert(), etk_textblock_insert_markup(), etk_textblock_iter_free(), and etk_textblock_iter_new().

Etk_String * etk_textblock_text_get ( Etk_Textblock *  tb,
Etk_Bool  markup 
)

Gets the text of the textblock.

Parameters:
tb a textblock
markup whether or not you want to have tags in the returned text
Returns:
Returns a string containing the text of the textblock
Note:
Once you no longer need the returned string, you should destroy it with etk_object_destroy()

References etk_string_new(), and root.

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.

Parameters:
tb a textblock
iter1 the first iterator
iter2 the second_iterator
markup whether or not you want to have tags in the returned text
Returns:
Returns a string containing the text of the textblock, between iter1 and iter2
Note:
Once you no longer need the returned string, you should destroy it with etk_object_destroy()

iter1 is not necessarily before iter2

References etk_string_new(), etk_textblock_iter_compare(), and root.

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.

Parameters:
tb a textblock
iter the iterator where to insert the text.
If the gravity of iter is left, the iter will be placed before the inserted text. Otherwise, the iterator will placed after the inserted text.
text the unicode-encoded text to insert
length the number of bytes to insert. If length is negative, the text will be entirely inserted

References etk_string_insert_sized(), etk_textblock_iter_copy(), etk_textblock_iter_free(), etk_textblock_iter_new(), Etk_Textblock_Iter::gravity, Etk_Textblock_Iter::index, iters, Etk_Textblock_Iter::node, Etk_Textblock_Iter::pos, Etk_Textblock_Node::text, and Etk_Textblock_Node::unicode_length.

Referenced by etk_textblock_insert_markup(), and etk_textblock_text_set().

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.

Parameters:
tb a textblock
iter the iterator where to insert the text.
If the gravity of iter is left, the iter will be placed before the inserted text. Otherwise, the iterator will placed after the inserted text.
text the unicode-encoded markup text to insert
length the number of bytes to insert. If length is negative, the text will be entirely inserted

References Etk_Textblock_Node::children, etk_textblock_insert(), etk_textblock_iter_copy(), etk_textblock_iter_free(), etk_textblock_iter_new(), ETK_TEXTBLOCK_NODE_LINE, Etk_Textblock_Iter::gravity, Etk_Textblock_Iter::node, Etk_Textblock_Node::parent, and Etk_Textblock_Node::type.

Referenced by etk_textblock_text_set().

void etk_textblock_clear ( Etk_Textblock *  tb  ) 

Clears the textblock: removes all the text and all the tags.

Parameters:
tb the textblock to clear

References Etk_Textblock_Node::children, etk_textblock_iter_backward_start(), ETK_TEXTBLOCK_NODE_LINE, ETK_TEXTBLOCK_NODE_PARAGRAPH, ETK_TEXTBLOCK_TAG_DEFAULT, ETK_TEXTBLOCK_TAG_P, evas_objects, iters, and root.

Referenced by etk_textblock_text_set().

void etk_textblock_delete_before ( Etk_Textblock *  tb,
Etk_Textblock_Iter *  iter 
)

Deletes the char before the iterator.

Parameters:
tb a textblock
iter the iterator where to delete the char

References etk_textblock_delete_range(), etk_textblock_iter_backward_char(), etk_textblock_iter_copy(), etk_textblock_iter_free(), and etk_textblock_iter_new().

void etk_textblock_delete_after ( Etk_Textblock *  tb,
Etk_Textblock_Iter *  iter 
)

Deletes the char after the iterator.

Parameters:
tb a textblock
iter the iterator where to delete the char

References etk_textblock_delete_range(), etk_textblock_iter_copy(), etk_textblock_iter_forward_char(), etk_textblock_iter_free(), and etk_textblock_iter_new().

void etk_textblock_delete_range ( Etk_Textblock *  tb,
Etk_Textblock_Iter *  iter1,
Etk_Textblock_Iter *  iter2 
)

Deletes the text between iter1 and iter2.

Parameters:
tb a textblock
iter1 the first iterator
iter2 the second iterator
Note:
iter1 is not necessarily before iter2

References Etk_Textblock_Node::children, etk_string_clear(), etk_string_delete(), etk_string_length_get(), etk_textblock_iter_compare(), etk_textblock_iter_copy(), ETK_TEXTBLOCK_NODE_LINE, ETK_TEXTBLOCK_NODE_NORMAL, ETK_TEXTBLOCK_NODE_PARAGRAPH, ETK_TEXTBLOCK_TAG_DEFAULT, Etk_Textblock_Iter::index, iters, Etk_Textblock_Node::last_child, Etk_Textblock_Node::next, Etk_Textblock_Iter::node, Etk_Textblock_Node::parent, Etk_Textblock_Iter::pos, Etk_Textblock_Node::text, Etk_Textblock_Node::type, and Etk_Textblock_Node::unicode_length.

Referenced by etk_textblock_delete_after(), and etk_textblock_delete_before().

Etk_Textblock_Iter * etk_textblock_iter_new ( Etk_Textblock *  tb  ) 

Creates a new iterator for the textblock.

Parameters:
tb a textblock
Returns:
Returns the new iterator, placed at the start of the first node of the textblock

References etk_textblock_iter_backward_start(), Etk_Textblock_Iter::gravity, Etk_Textblock_Iter::index, iters, Etk_Textblock_Iter::node, Etk_Textblock_Iter::pos, root, and Etk_Textblock_Iter::tb.

Referenced by etk_textblock_delete_after(), etk_textblock_delete_before(), etk_textblock_insert(), etk_textblock_insert_markup(), etk_textblock_object_add(), and etk_textblock_text_set().

void etk_textblock_iter_free ( Etk_Textblock_Iter *  iter  ) 

Destroys an iterator of the textblock.

Parameters:
iter the iterator to destroy

References iters, and Etk_Textblock_Iter::tb.

Referenced by etk_textblock_delete_after(), etk_textblock_delete_before(), etk_textblock_insert(), etk_textblock_insert_markup(), and etk_textblock_text_set().

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.

Parameters:
iter an iterator
gravity the gravity to set to the iterator

References Etk_Textblock_Iter::gravity.

Etk_Textblock_Gravity etk_textblock_iter_gravity_get ( Etk_Textblock_Iter *  iter  ) 

Gets the gravity of the iterator.

Parameters:
iter an iterator
Returns:
Returns the gravity of the iterator (ETK_TEXTBLOCK_GRAVITY_RIGHT by default)

References Etk_Textblock_Iter::gravity.

void etk_textblock_iter_backward_start ( Etk_Textblock_Iter *  iter  ) 

Moves the iterator to the start of the textblock.

Parameters:
iter an iterator

References Etk_Textblock_Node::children, Etk_Textblock_Iter::index, Etk_Textblock_Iter::node, Etk_Textblock_Iter::pos, root, and Etk_Textblock_Iter::tb.

Referenced by etk_textblock_clear(), and etk_textblock_iter_new().

void etk_textblock_iter_forward_end ( Etk_Textblock_Iter *  iter  ) 

Moves the iterator to the end of the textblock.

Parameters:
iter an iterator

References Etk_Textblock_Node::children, etk_string_length_get(), Etk_Textblock_Iter::index, Etk_Textblock_Node::last_child, Etk_Textblock_Iter::node, Etk_Textblock_Iter::pos, root, Etk_Textblock_Iter::tb, Etk_Textblock_Node::text, and Etk_Textblock_Node::unicode_length.

Etk_Bool etk_textblock_iter_backward_char ( Etk_Textblock_Iter *  iter  ) 

Moves the iterator backward by one character offset.

Parameters:
iter an iterator
Returns:
Returns ETK_FALSE if the movement was not possible (i.e. the iterator is already before the first character of the textblock)

References etk_string_get(), etk_string_length_get(), Etk_Textblock_Iter::index, Etk_Textblock_Iter::node, Etk_Textblock_Iter::pos, Etk_Textblock_Node::text, and Etk_Textblock_Node::unicode_length.

Referenced by etk_textblock_delete_before().

Etk_Bool etk_textblock_iter_forward_char ( Etk_Textblock_Iter *  iter  ) 

Moves the iterator forward by one character offset.

Parameters:
iter an iterator
Returns:
Returns ETK_FALSE if the movement was not possible (i.e. the iterator is already after the last character of the textblock)

References etk_string_get(), Etk_Textblock_Iter::index, Etk_Textblock_Iter::node, Etk_Textblock_Iter::pos, Etk_Textblock_Node::text, and Etk_Textblock_Node::unicode_length.

Referenced by etk_textblock_delete_after().

void etk_textblock_iter_copy ( Etk_Textblock_Iter *  dest,
const Etk_Textblock_Iter *  src 
)

Copies the iterator src to the iterator dest.

Parameters:
dest the destination iterator
src the source iterator

References Etk_Textblock_Iter::gravity, Etk_Textblock_Iter::index, Etk_Textblock_Iter::node, Etk_Textblock_Iter::pos, and Etk_Textblock_Iter::tb.

Referenced by etk_textblock_delete_after(), etk_textblock_delete_before(), etk_textblock_delete_range(), etk_textblock_insert(), and etk_textblock_insert_markup().

int etk_textblock_iter_compare ( Etk_Textblock_Iter *  iter1,
Etk_Textblock_Iter *  iter2 
)

Compares two iterators.

Parameters:
iter1 the first iterator
iter2 the second iterator
Returns:
Returns -1 if iter1 is before iter2, 1 if iter1 is after iter2 and 0 if iter1 is equal to iter2

References Etk_Textblock_Iter::node, Etk_Textblock_Iter::pos, and Etk_Textblock_Iter::tb.

Referenced by etk_textblock_delete_range(), and etk_textblock_range_text_get().

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.

Parameters:
tb the textblock whose content will be displayed by the evas object
evas the evas to which the object will be added
Returns:
Returns a new evas object that display the content of the textblock

References Etk_Textblock_Node::children, etk_textblock_iter_new(), evas_objects, Etk_Textblock_Node::next, and root.

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

Parameters:
tbo a textblock object
wrap the wrap mode. Here, ETK_TEXTBLOCK_WRAP_DEFAULT is equivalent to ETK_TEXTBLOCK_WRAP_WORD

References ETK_TEXTBLOCK_NODE_PARAGRAPH, ETK_TEXTBLOCK_WRAP_CHAR, ETK_TEXTBLOCK_WRAP_DEFAULT, and ETK_TEXTBLOCK_WRAP_WORD.

Etk_Textblock_Wrap etk_textblock_object_wrap_get ( Evas_Object *  tbo  ) 

Gets the default wrap mode of the textblock object.

Parameters:
tbo a textblock object
Returns:
Returns the wrap mode of the textblock object

References ETK_TEXTBLOCK_WRAP_WORD.

Etk_Textblock_Iter * etk_textblock_object_cursor_get ( Evas_Object *  tbo  ) 

Gets the cursor's iterator of the textblock object.

Parameters:
tbo a textblock object
Returns:
Returns the cursor's iterator of the textblock object
Warning:
You should not free the returned iterator

Referenced by etk_text_view_cursor_get().

Etk_Textblock_Iter * etk_textblock_object_selection_bound_get ( Evas_Object *  tbo  ) 

Gets the selection bound's iterator of the textblock object.

Parameters:
tbo a textblock object
Returns:
Returns the selection bound's iterator of the textblock object
Warning:
You should not free the returned iterator

Referenced by etk_text_view_selection_bound_get().

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.

Parameters:
tbo a textblock object
visible ETK_TRUE to show the cursor, ETK_FALSE to hide it

Etk_Bool etk_textblock_object_cursor_visible_get ( Evas_Object *  tbo  ) 

Gets whether the cursor of the textblock object is visible or not.

Parameters:
tbo a textblock object
Returns:
Returns ETK_TRUE if the cursor is visible, ETK_FALSE otherwise

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.

Parameters:
unicode_string a unicode-encoded string
Returns:
Returns the unicode length of unicode_string

Etk_Bool etk_textblock_is_white_char ( int  c  ) 

Gets whether or not the unicode char is a white char.

Parameters:
c a unicode char
Returns:
Returns ETK_TRUE if c is a white char, ETK_FALSE otherwise

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.

Parameters:
evas an evas
font_face the face of the font to use
font_size the size of the font to use
w the location where to store the average width of a character
h the location where to store the average height of a character

void etk_textblock_printf ( Etk_Textblock *  tb  ) 

Prints the textblock hierarchy for debug TODO: etk_textblock_printf(): Remove this function.

References etk_string_get(), evas_objects, and root.