Download

Support

lib/ewl_text.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


Data Structures

struct  Ewl_Text
 Inherits from the Ewl_Container class and extends it to provide text layout and formatting. More...

Defines

#define EWL_TEXT(x)   ((Ewl_Text *)x)
#define EWL_TEXT_IS(w)   (ewl_widget_type_is(EWL_WIDGET(w), EWL_TEXT_TYPE))
#define EWL_TEXT_SELECTION_IS(w)   (ewl_widget_type_is(EWL_WIDGET(w), EWL_TEXT_SELECTION_TYPE))
#define EWL_TEXT_SELECTION_TYPE   "selection"
#define EWL_TEXT_TYPE   "text"

Typedefs

typedef struct Ewl_Text Ewl_Text

Functions

void ewl_text_align_apply (Ewl_Text *t, unsigned int align, unsigned int char_len)
 This will set the given alignment from the current cursor position for the given length of text.
unsigned int ewl_text_align_get (Ewl_Text *t, unsigned int char_idx)
 Retrieves the alignment value from the given index.
void ewl_text_align_set (Ewl_Text *t, unsigned int align)
 Set the current alignment value of the text.
void ewl_text_all_select (Ewl_Text *t)
 Select the whole text.
void ewl_text_bg_color_apply (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a, unsigned int char_len)
 This will set the bg colour of the text from the current cursor position to the given length.
void ewl_text_bg_color_get (Ewl_Text *t, unsigned int *r, unsigned int *g, unsigned int *b, unsigned int *a, unsigned int char_idx)
 Get the text background colour at the given index.
void ewl_text_bg_color_set (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a)
 Set the background colour at the cursor.
void ewl_text_cb_child_add (Ewl_Container *c, Ewl_Widget *w)
void ewl_text_cb_child_remove (Ewl_Container *c, Ewl_Widget *w, int idx)
void ewl_text_cb_configure (Ewl_Widget *w, void *ev, void *data)
void ewl_text_cb_destroy (Ewl_Widget *w, void *ev, void *data)
void ewl_text_cb_hide (Ewl_Widget *w, void *ev, void *data)
void ewl_text_cb_mouse_down (Ewl_Widget *w, void *ev, void *data)
void ewl_text_cb_mouse_move (Ewl_Widget *w, void *ev, void *data)
void ewl_text_cb_mouse_up (Ewl_Widget *w, void *ev, void *data)
void ewl_text_cb_obscure (Ewl_Widget *w, void *ev, void *data)
void ewl_text_cb_reveal (Ewl_Widget *w, void *ev, void *data)
void ewl_text_cb_show (Ewl_Widget *w, void *ev, void *data)
void ewl_text_clear (Ewl_Text *t)
 Clear the text widget.
void ewl_text_color_apply (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a, unsigned int char_len)
 This will set the given colour from the current cursor position for the specified length.
void ewl_text_color_get (Ewl_Text *t, unsigned int *r, unsigned int *g, unsigned int *b, unsigned int *a, unsigned int char_idx)
 Retrives the text colour at the given index.
void ewl_text_color_set (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a)
 Set the text colour at the cursor.
unsigned int ewl_text_coord_index_map (Ewl_Text *t, int x, int y)
 Map the given coordinate into an index into the text widget.
unsigned int ewl_text_cursor_position_get (Ewl_Text *t)
 Retrieve the cursor position from the text widget.
unsigned int ewl_text_cursor_position_line_down_get (Ewl_Text *t)
 Get the index if we were to move the cursor down one line.
unsigned int ewl_text_cursor_position_line_up_get (Ewl_Text *t)
 Get the index if we were to move the cursor up one line.
void ewl_text_cursor_position_set (Ewl_Text *t, unsigned int char_pos)
 Set the cursor position in the text widget.
void ewl_text_double_underline_color_apply (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a, unsigned int char_len)
 This will set the double_underline colour of the text from the current cursor position to the given length.
void ewl_text_double_underline_color_get (Ewl_Text *t, unsigned int *r, unsigned int *g, unsigned int *b, unsigned int *a, unsigned int char_idx)
 Retrieve the double underline colour at the given index.
void ewl_text_double_underline_color_set (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a)
 Set the double underline colour at the cursor.
void ewl_text_font_apply (Ewl_Text *t, const char *font, unsigned int char_len)
 This will apply the specfied font from the current cursor position to the length specified.
char * ewl_text_font_get (Ewl_Text *t, unsigned int char_idx)
 This will retrive the font used at the specified index in the text.
void ewl_text_font_set (Ewl_Text *t, const char *font)
 This will set the current font to be used when we insert more text.
void ewl_text_font_size_apply (Ewl_Text *t, unsigned int size, unsigned int char_len)
 This will apply the font size to the text from the current cursor position for the given length.
unsigned int ewl_text_font_size_get (Ewl_Text *t, unsigned int char_idx)
 Retrieve the font size at the given index.
void ewl_text_font_size_set (Ewl_Text *t, unsigned int size)
 Set the font size to use when inserting new text.
void ewl_text_font_source_apply (Ewl_Text *t, const char *source, const char *font, unsigned int char_len)
 This will apply the specfied font from the current cursor position to the length specified.
char * ewl_text_font_source_get (Ewl_Text *t, unsigned int char_idx)
 This will retrive the font source used at the specified index in the text.
void ewl_text_font_source_set (Ewl_Text *t, const char *source, const char *font)
 This will set the current font to be used when we insert more text.
void ewl_text_glow_color_apply (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a, unsigned int char_len)
 This will set the glow colour of the text from the current cursor position to the given length.
void ewl_text_glow_color_get (Ewl_Text *t, unsigned int *r, unsigned int *g, unsigned int *b, unsigned int *a, unsigned int char_idx)
 Get the glow colour at the given index.
void ewl_text_glow_color_set (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a)
 Set the glow colour at the cursor.
unsigned int ewl_text_has_selection (Ewl_Text *t)
 Check if anything is selected in the text widget.
void ewl_text_index_geometry_map (Ewl_Text *t, unsigned int char_idx, int *x, int *y, int *w, int *h)
 Map the given character index into a position in the text widget.
int ewl_text_init (Ewl_Text *t)
 Initializes an Ewl_Text widget to default values.
unsigned int ewl_text_length_get (Ewl_Text *t)
 Retrieve the character length of the text.
unsigned int ewl_text_length_maximum_get (Ewl_Text *t)
 Retrieve if maximum number of characters.
void ewl_text_length_maximum_set (Ewl_Text *t, unsigned int char_num)
 Set the maximum number of characters.
Ewl_Widgetewl_text_new (void)
 Creates a new Ewl_Text widget.
void ewl_text_obscure_set (Ewl_Text *t, const char *utf8_character)
 Sets the character used to obscure the text for a password. Every character will be replaced by this character on the output.
void ewl_text_offsets_get (Ewl_Text *t, int *x, int *y)
 Retrieve the current layout offsets of the text.
void ewl_text_offsets_set (Ewl_Text *t, int x, int y)
 Set the current layout offsets of the text.
void ewl_text_outline_color_apply (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a, unsigned int char_len)
 This will set the outline colour of the text from the current cursor position to the given length.
void ewl_text_outline_color_get (Ewl_Text *t, unsigned int *r, unsigned int *g, unsigned int *b, unsigned int *a, unsigned int char_idx)
 Get the outline colour at the given index.
void ewl_text_outline_color_set (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a)
 Set the outline colour at the cursor.
void ewl_text_select (Ewl_Text *t, unsigned int char_idx, unsigned int char_len)
 Select the text.
unsigned int ewl_text_selectable_get (Ewl_Text *t)
 Get the selectable state of the text.
void ewl_text_selectable_set (Ewl_Text *t, unsigned int selectable)
 Set if the text is selectable.
Ewl_Widgetewl_text_selection_get (Ewl_Text *t)
 Get the current text selection.
char * ewl_text_selection_text_get (Ewl_Text *t)
 Gets the current text of the selection.
void ewl_text_shadow_color_apply (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a, unsigned int char_len)
 This will set the shadow colour of the text from the current cursor position to the given length.
void ewl_text_shadow_color_get (Ewl_Text *t, unsigned int *r, unsigned int *g, unsigned int *b, unsigned int *a, unsigned int char_idx)
 Retrieve the shadow colour at the given index.
void ewl_text_shadow_color_set (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a)
 Set the shadow colour at the cursor.
void ewl_text_strikethrough_color_apply (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a, unsigned int char_len)
 This will set the strikethrough colour of the text from the current cursor position to the given length.
void ewl_text_strikethrough_color_get (Ewl_Text *t, unsigned int *r, unsigned int *g, unsigned int *b, unsigned int *a, unsigned int char_idx)
 Retrieve the strikethrough colour at the given index.
void ewl_text_strikethrough_color_set (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a)
 Set the strikethrough colour at the cursor.
void ewl_text_style_add (Ewl_Text *t, Ewl_Text_Style sytle, unsigned int char_len)
 This will add the given style to the text from the cursor up to length characters.
void ewl_text_style_del (Ewl_Text *t, Ewl_Text_Style style, unsigned int char_len)
 This will delete the given style from the text starting at the cursor up to length characters.
unsigned int ewl_text_style_has (Ewl_Text *t, Ewl_Text_Style style, unsigned int char_idx)
 Check if the given style is set at the given index in the text.
void ewl_text_style_invert (Ewl_Text *t, Ewl_Text_Style style, unsigned int char_len)
 This will invert the given style in the text starting at the cursor up to length characters.
void ewl_text_styles_apply (Ewl_Text *t, unsigned int styles, unsigned int char_len)
 This will set the given style from the current cursor position for the given length of text.
unsigned int ewl_text_styles_get (Ewl_Text *t, unsigned int char_idx)
 Retrives the styles in use at the given index.
void ewl_text_styles_set (Ewl_Text *t, unsigned int styles)
 Sets the given styles into the text at the cursor.
void ewl_text_text_append (Ewl_Text *t, const char *text)
 Append the text into the text widget.
void ewl_text_text_delete (Ewl_Text *t, unsigned int length)
 This will delete the specified length of text from the current cursor position.
char * ewl_text_text_get (Ewl_Text *t)
 Retrieve the text from the text widget.
void ewl_text_text_insert (Ewl_Text *t, const char *text, unsigned int char_idx)
 Insert the given text into the text widget.
char * ewl_text_text_next_char (const char *text, unsigned int *idx)
void ewl_text_text_prepend (Ewl_Text *t, const char *text)
 Prepend the given text into the text widget.
void ewl_text_text_set (Ewl_Text *t, const char *text)
 Set the text in the text widget.
void ewl_text_trigger_cb_destroy (Ewl_Widget *w, void *ev, void *data)
void ewl_text_underline_color_apply (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a, unsigned int char_len)
 This will set the underline colour of the text from the current cursor position to the given length.
void ewl_text_underline_color_get (Ewl_Text *t, unsigned int *r, unsigned int *g, unsigned int *b, unsigned int *a, unsigned int char_idx)
 Retrieve the underline colour at the given index.
void ewl_text_underline_color_set (Ewl_Text *t, unsigned int r, unsigned int g, unsigned int b, unsigned int a)
 Set the underline colour at the cursor.
void ewl_text_wrap_apply (Ewl_Text *t, Ewl_Text_Wrap wrap, unsigned int char_len)
 This will apply the given wrap value from the current cursor position for the given length of text.
Ewl_Text_Wrap ewl_text_wrap_get (Ewl_Text *t, unsigned int char_idx)
 Retrives the text wrap value at the given index.
void ewl_text_wrap_set (Ewl_Text *t, Ewl_Text_Wrap wrap)
 Sets the wrap value of the text at the given index.

Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sat May 17 16:50:48 2008