Ewl_Entry: A text entry widget
Detailed Description
This widget provides all text entry needs, from single to multiline
- Remarks:
- Inherits from Ewl_Text.
Tutorial
The Ewl_Entry provides a widget for editing single line or multi-line text. Since the entry widget inherits from Ewl_Text, all operations that can be performed on text can be used on the entry, including programmatic control of formatting, selections and text contents.
Ewl_Widget *entry; entry = ewl_entry_new(); ewl_text_text_set(EWL_TEXT(entry), "Text to display"); ewl_widget_show(entry);
Almost all manipulation of the entry widget is performed through the Ewl_Text API, with some minor exceptions. Since the entry widget takes user input, it requires an API to enable or disable the editing capability.
void ewl_entry_editable_set(Ewl_Entry *e, unsigned int editable); unsigned int ewl_entry_editable_get(Ewl_Entry *e);
It is also important to be able to indicate if the text entry can contain multiple lines of text, as the reaction to the Enter/Return keys changes. When multiline is enabled, Enter will insert a carriage return in the text, otherwise it raises an EWL_CALLBACK_VALUE_CHANGED callback on the entry widget.
void ewl_entry_multiline_set(Ewl_Entry *e, unsigned int multiline); unsigned int ewl_entry_multiline_get(Ewl_Entry *e);
By inheriting from Ewl_Text, the capabalities of Ewl_Entry are expanded to the full API available for text manipulation. This reduces the number of calls for the user to learn without sacrificing functionality.
Data Structures | |
struct | Ewl_Entry |
Inherits from Ewl_Text and extends to allow editing of the text. More... | |
struct | Ewl_Entry_Cursor |
Inherit from Ewl_Widget and extend for the Entry cursor. More... | |
Defines | |
#define | EWL_ENTRY(entry) ((Ewl_Entry *) entry) |
#define | EWL_ENTRY_CURSOR(cursor) ((Ewl_Entry_Cursor *) cursor) |
#define | EWL_ENTRY_CURSOR_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_ENTRY_CURSOR_TYPE)) |
#define | EWL_ENTRY_CURSOR_TYPE "cursor" |
#define | EWL_ENTRY_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_ENTRY_TYPE)) |
#define | EWL_ENTRY_TYPE "entry" |
Typedefs | |
typedef struct Ewl_Entry | Ewl_Entry |
typedef struct Ewl_Entry_Cursor | Ewl_Entry_Cursor |
Functions | |
void | ewl_entry_cb_configure (Ewl_Widget *w, void *ev, void *data) |
void | ewl_entry_cb_disable (Ewl_Widget *w, void *ev, void *data) |
void | ewl_entry_cb_dnd_data (Ewl_Widget *w, void *ev, void *data) |
void | ewl_entry_cb_dnd_position (Ewl_Widget *w, void *ev, void *data) |
void | ewl_entry_cb_enable (Ewl_Widget *w, void *ev, void *data) |
void | ewl_entry_cb_focus_in (Ewl_Widget *w, void *ev, void *data) |
void | ewl_entry_cb_focus_out (Ewl_Widget *w, void *ev, void *data) |
void | ewl_entry_cb_key_down (Ewl_Widget *w, void *ev, void *data) |
void | ewl_entry_cb_mouse_down (Ewl_Widget *w, void *ev, void *data) |
void | ewl_entry_cb_mouse_move (Ewl_Widget *w, void *ev, void *data) |
void | ewl_entry_cb_mouse_up (Ewl_Widget *w, void *ev, void *data) |
int | ewl_entry_cursor_init (Ewl_Entry_Cursor *c, Ewl_Entry *parent) |
Initializes an Ewl_Entry_Cursor to default values. | |
void | ewl_entry_cursor_move_down (Ewl_Entry *e) |
Moves the cursor down one line from its current position. | |
void | ewl_entry_cursor_move_left (Ewl_Entry *e) |
Moves the cursor to the left of it's current position. | |
void | ewl_entry_cursor_move_right (Ewl_Entry *e) |
Moves the cursor to the right of its current position. | |
void | ewl_entry_cursor_move_up (Ewl_Entry *e) |
Moves the cursor up one line from its current position. | |
Ewl_Widget * | ewl_entry_cursor_new (Ewl_Entry *parent) |
Creates and initializes a new Ewl_Entry_Cursor widget. | |
unsigned int | ewl_entry_cursor_position_get (Ewl_Entry_Cursor *c) |
Retrieves the current position of the Ewl_Entry_Cursor. | |
void | ewl_entry_cursor_position_set (Ewl_Entry_Cursor *c, unsigned int pos) |
Set the current cursor position. | |
void | ewl_entry_delete_left (Ewl_Entry *e) |
Deletes the character to the left of the cursor. | |
void | ewl_entry_delete_right (Ewl_Entry *e) |
Deletes the character to the right of the cursor. | |
unsigned int | ewl_entry_editable_get (Ewl_Entry *e) |
Retrieve if the entry is editable or not. | |
void | ewl_entry_editable_set (Ewl_Entry *e, unsigned int editable) |
Set if the entry is editable or not. | |
int | ewl_entry_init (Ewl_Entry *e) |
Initializes an Ewl_Entry widget to default values. | |
unsigned int | ewl_entry_multiline_get (Ewl_Entry *e) |
Retrieve if the entry is multiline or not. | |
void | ewl_entry_multiline_set (Ewl_Entry *e, unsigned int multiline) |
Set if the entry is multiline or not. | |
Ewl_Widget * | ewl_entry_new (void) |
Create and return a new Ewl_Entry widget. | |
unsigned int | ewl_entry_selection_clear (Ewl_Entry *e) |
Clear the current selection in the entry. | |
Ewl_View * | ewl_entry_view_get (void) |
Creates and returns a view to be used by Ewl_Entry widgets. | |
Ewl_Widget * | ewl_password_new (void) |
Allocate and initialize a new password widget. |
Define Documentation
#define EWL_ENTRY | ( | entry | ) | ((Ewl_Entry *) entry) |
Typecast a pointer to an Ewl_Entry
Referenced by ewl_entry_cb_configure(), ewl_entry_cb_disable(), ewl_entry_cb_dnd_data(), ewl_entry_cb_dnd_position(), ewl_entry_cb_enable(), ewl_entry_cb_focus_in(), ewl_entry_cb_focus_out(), ewl_entry_cb_key_down(), ewl_entry_cb_mouse_down(), ewl_entry_cb_mouse_up(), ewl_entry_new(), and ewl_spinner_cb_key_down().
#define EWL_ENTRY_CURSOR | ( | cursor | ) | ((Ewl_Entry_Cursor *) cursor) |
Typecast a pointer to an Ewl_Entry_Cursor pointer
Referenced by ewl_entry_cb_configure(), ewl_entry_cb_key_down(), ewl_entry_cb_mouse_down(), ewl_entry_cursor_move_down(), ewl_entry_cursor_move_left(), ewl_entry_cursor_move_right(), ewl_entry_cursor_move_up(), ewl_entry_cursor_new(), and ewl_entry_delete_left().
#define EWL_ENTRY_CURSOR_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_ENTRY_CURSOR_TYPE)) |
Returns TRUE if the widget is an Ewl_Entry_Cursor, FALSE otherwise
#define EWL_ENTRY_CURSOR_TYPE "cursor" |
The type name for the Ewl_Entry_Cursor widget
Referenced by ewl_entry_cursor_init(), ewl_entry_cursor_position_get(), and ewl_entry_cursor_position_set().
#define EWL_ENTRY_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_ENTRY_TYPE)) |
Returns TRUE if the widget is an Ewl_Entry, FALSE otherwise
#define EWL_ENTRY_TYPE "entry" |
The type name for the Ewl_Entry widget
Referenced by ewl_entry_cursor_init(), ewl_entry_cursor_move_down(), ewl_entry_cursor_move_left(), ewl_entry_cursor_move_right(), ewl_entry_cursor_move_up(), ewl_entry_delete_left(), ewl_entry_delete_right(), ewl_entry_editable_get(), ewl_entry_editable_set(), ewl_entry_init(), ewl_entry_multiline_get(), ewl_entry_multiline_set(), ewl_entry_selection_clear(), and ewl_password_new().
Typedef Documentation
typedef struct Ewl_Entry_Cursor Ewl_Entry_Cursor |
The Ewl_Entry_Cursor widget
Function Documentation
void ewl_entry_cb_configure | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References CURRENT_H, CURRENT_W, CURRENT_X, CURRENT_Y, cursor, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, editable, EWL_ENTRY, EWL_ENTRY_CURSOR, ewl_entry_cursor_position_get(), EWL_OBJECT, ewl_object_geometry_request(), EWL_TEXT, ewl_text_index_geometry_map(), ewl_text_offsets_set(), and EWL_WIDGET_TYPE.
Referenced by ewl_entry_init().
void ewl_entry_cb_disable | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_ENTRY, ewl_entry_editable_set(), and EWL_WIDGET_TYPE.
Referenced by ewl_entry_init().
void ewl_entry_cb_dnd_data | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References Ewl_Event_Dnd_Data_Received::data, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DISABLED, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_ENTRY, EWL_TEXT, ewl_text_cursor_position_get(), ewl_text_text_insert(), EWL_WIDGET_TYPE, IF_FREE, and Ewl_Event_Dnd_Data_Received::type.
Referenced by ewl_entry_init().
void ewl_entry_cb_dnd_position | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DISABLED, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_ENTRY, EWL_TEXT, ewl_text_coord_index_map(), ewl_text_cursor_position_set(), ewl_widget_focus_send(), EWL_WIDGET_TYPE, Ewl_Event_Dnd_Position::x, and Ewl_Event_Dnd_Position::y.
Referenced by ewl_entry_init().
void ewl_entry_cb_enable | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_ENTRY, ewl_entry_editable_set(), and EWL_WIDGET_TYPE.
Referenced by ewl_entry_init().
void ewl_entry_cb_focus_in | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References cursor, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, editable, EWL_ENTRY, ewl_widget_show(), EWL_WIDGET_TYPE, and VISIBLE.
Referenced by ewl_entry_init().
void ewl_entry_cb_focus_out | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References cursor, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, editable, EWL_ENTRY, ewl_widget_hide(), EWL_WIDGET_TYPE, and VISIBLE.
Referenced by ewl_entry_init().
void ewl_entry_cb_key_down | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References cursor, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, ewl_callback_call(), EWL_CALLBACK_VALUE_CHANGED, EWL_ENTRY, EWL_ENTRY_CURSOR, ewl_entry_cursor_move_down(), ewl_entry_cursor_move_left(), ewl_entry_cursor_move_right(), ewl_entry_cursor_move_up(), ewl_entry_cursor_position_get(), ewl_entry_delete_left(), ewl_entry_delete_right(), ewl_entry_selection_clear(), EWL_KEY_MODIFIER_CTRL, EWL_STATE_PERSISTENT, EWL_TEXT, ewl_text_text_insert(), EWL_WIDGET, ewl_widget_state_set(), EWL_WIDGET_TYPE, Ewl_Event_Key::keyname, Ewl_Event_Key::modifiers, and multiline.
Referenced by ewl_entry_editable_set(), and ewl_spinner_init().
void ewl_entry_cb_mouse_down | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References cursor, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_callback_append(), EWL_CALLBACK_MOUSE_MOVE, EWL_ENTRY, ewl_entry_cb_mouse_move(), EWL_ENTRY_CURSOR, ewl_entry_cursor_position_set(), EWL_TEXT, ewl_text_coord_index_map(), ewl_widget_configure(), EWL_WIDGET_TYPE, in_select_mode, Ewl_Event_Mouse::x, and Ewl_Event_Mouse::y.
Referenced by ewl_entry_init().
void ewl_entry_cb_mouse_move | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, and EWL_WIDGET_TYPE.
Referenced by ewl_entry_cb_mouse_down(), and ewl_entry_cb_mouse_up().
void ewl_entry_cb_mouse_up | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_callback_del(), EWL_CALLBACK_MOUSE_MOVE, EWL_ENTRY, ewl_entry_cb_mouse_move(), EWL_WIDGET_TYPE, and in_select_mode.
Referenced by ewl_entry_init().
int ewl_entry_cursor_init | ( | Ewl_Entry_Cursor * | c, | |
Ewl_Entry * | parent | |||
) |
Initializes an Ewl_Entry_Cursor to default values.
- Parameters:
-
c,: The Ewl_Entry_Cursor to initialize parent,: The parent Ewl_Text widget
- Returns:
- Returns TRUE on success or FALSE on failure
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_ENTRY_CURSOR_TYPE, EWL_ENTRY_TYPE, EWL_WIDGET, ewl_widget_appearance_set(), ewl_widget_focusable_set(), ewl_widget_inherit(), ewl_widget_init(), and Ewl_Entry_Cursor::parent.
Referenced by ewl_entry_cursor_new().
void ewl_entry_cursor_move_down | ( | Ewl_Entry * | e | ) |
Moves the cursor down one line from its current position.
- Parameters:
-
e,: The Ewl_Entry to work with
- Returns:
- Returns no value.
References cursor, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_ENTRY_CURSOR, ewl_entry_cursor_position_set(), EWL_ENTRY_TYPE, EWL_TEXT, ewl_text_cursor_position_line_down_get(), EWL_WIDGET, and ewl_widget_configure().
Referenced by ewl_entry_cb_key_down().
void ewl_entry_cursor_move_left | ( | Ewl_Entry * | e | ) |
Moves the cursor to the left of it's current position.
- Parameters:
-
e,: The Ewl_Entry to work with
- Returns:
- Returns no value
References cursor, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_ENTRY_CURSOR, ewl_entry_cursor_position_get(), ewl_entry_cursor_position_set(), EWL_ENTRY_TYPE, EWL_WIDGET, and ewl_widget_configure().
Referenced by ewl_entry_cb_key_down(), and ewl_spinner_cb_key_down().
void ewl_entry_cursor_move_right | ( | Ewl_Entry * | e | ) |
Moves the cursor to the right of its current position.
- Parameters:
-
e,: The Ewl_Entry to work with
- Returns:
- Returns no value.
References cursor, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_ENTRY_CURSOR, ewl_entry_cursor_position_get(), ewl_entry_cursor_position_set(), EWL_ENTRY_TYPE, EWL_TEXT, ewl_text_length_get(), EWL_WIDGET, and ewl_widget_configure().
Referenced by ewl_entry_cb_key_down(), and ewl_spinner_cb_key_down().
void ewl_entry_cursor_move_up | ( | Ewl_Entry * | e | ) |
Moves the cursor up one line from its current position.
- Parameters:
-
e,: The Ewl_Entry to work with
- Returns:
- Returns no value.
References cursor, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_ENTRY_CURSOR, ewl_entry_cursor_position_set(), EWL_ENTRY_TYPE, EWL_TEXT, ewl_text_cursor_position_line_up_get(), EWL_WIDGET, and ewl_widget_configure().
Referenced by ewl_entry_cb_key_down().
Ewl_Widget* ewl_entry_cursor_new | ( | Ewl_Entry * | parent | ) |
Creates and initializes a new Ewl_Entry_Cursor widget.
- Parameters:
-
parent,: The parent Ewl_Entry widget
- Returns:
- Returns a new Ewl_Entry_Cursor on success or NULL on failure
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_ENTRY_CURSOR, ewl_entry_cursor_init(), ewl_widget_destroy(), and NEW.
Referenced by ewl_entry_init().
unsigned int ewl_entry_cursor_position_get | ( | Ewl_Entry_Cursor * | c | ) |
Retrieves the current position of the Ewl_Entry_Cursor.
- Parameters:
-
c,: The cursor to get the position from
- Returns:
- Returns the current position of the cursor
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_ENTRY_CURSOR_TYPE, EWL_TEXT, ewl_text_cursor_position_get(), and Ewl_Entry_Cursor::parent.
Referenced by ewl_entry_cb_configure(), ewl_entry_cb_key_down(), ewl_entry_cursor_move_left(), ewl_entry_cursor_move_right(), and ewl_entry_delete_left().
void ewl_entry_cursor_position_set | ( | Ewl_Entry_Cursor * | c, | |
unsigned int | pos | |||
) |
Set the current cursor position.
- Parameters:
-
c,: The cursor to work with pos,: The position to set the cursor too
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_ENTRY_CURSOR_TYPE, EWL_TEXT, ewl_text_cursor_position_set(), and Ewl_Entry_Cursor::parent.
Referenced by ewl_entry_cb_mouse_down(), ewl_entry_cursor_move_down(), ewl_entry_cursor_move_left(), ewl_entry_cursor_move_right(), ewl_entry_cursor_move_up(), and ewl_entry_delete_left().
void ewl_entry_delete_left | ( | Ewl_Entry * | e | ) |
Deletes the character to the left of the cursor.
- Parameters:
-
e,: The Ewl_Entry to work with
- Returns:
- Returns no value.
References cursor, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_ENTRY_CURSOR, ewl_entry_cursor_position_get(), ewl_entry_cursor_position_set(), EWL_ENTRY_TYPE, EWL_TEXT, and ewl_text_text_delete().
Referenced by ewl_entry_cb_key_down(), and ewl_spinner_cb_key_down().
void ewl_entry_delete_right | ( | Ewl_Entry * | e | ) |
Deletes the character to the right of the cursor.
- Parameters:
-
e,: The Ewl_Entry to work with
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_ENTRY_TYPE, EWL_TEXT, and ewl_text_text_delete().
Referenced by ewl_entry_cb_key_down(), and ewl_spinner_cb_key_down().
unsigned int ewl_entry_editable_get | ( | Ewl_Entry * | e | ) |
Retrieve if the entry is editable or not.
- Parameters:
-
e,: The Ewl_Entry to get the editable status from
- Returns:
- Returns the editable status of the entry
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, editable, and EWL_ENTRY_TYPE.
void ewl_entry_editable_set | ( | Ewl_Entry * | e, | |
unsigned int | editable | |||
) |
Set if the entry is editable or not.
- Parameters:
-
e,: The Ewl_Entry to set the editable status of editable,: The value to set for the editable flag
- Returns:
- Returns no value
References cursor, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, editable, ewl_callback_append(), ewl_callback_del(), EWL_CALLBACK_KEY_DOWN, ewl_entry_cb_key_down(), EWL_ENTRY_TYPE, EWL_FLAG_STATE_FOCUSED, EWL_OBJECT, ewl_object_state_has, EWL_STATE_PERSISTENT, EWL_WIDGET, ewl_widget_hide(), ewl_widget_show(), and ewl_widget_state_set().
Referenced by ewl_entry_cb_disable(), ewl_entry_cb_enable(), and ewl_entry_init().
int ewl_entry_init | ( | Ewl_Entry * | e | ) |
Initializes an Ewl_Entry widget to default values.
- Parameters:
-
e,: The Ewl_Entry to initialize
- Returns:
- Returns TRUE on success or FALSE on failure
References cursor, DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, ewl_attach_mouse_cursor_set, ewl_callback_append(), EWL_CALLBACK_CONFIGURE, EWL_CALLBACK_DND_DATA_RECEIVED, EWL_CALLBACK_DND_POSITION, EWL_CALLBACK_FOCUS_IN, EWL_CALLBACK_FOCUS_OUT, EWL_CALLBACK_MOUSE_DOWN, EWL_CALLBACK_MOUSE_UP, ewl_callback_prepend(), EWL_CALLBACK_WIDGET_DISABLE, EWL_CALLBACK_WIDGET_ENABLE, EWL_CONTAINER, ewl_container_callback_intercept(), ewl_container_child_append(), ewl_dnd_accepted_types_set(), ewl_entry_cb_configure(), ewl_entry_cb_disable(), ewl_entry_cb_dnd_data(), ewl_entry_cb_dnd_position(), ewl_entry_cb_enable(), ewl_entry_cb_focus_in(), ewl_entry_cb_focus_out(), ewl_entry_cb_mouse_down(), ewl_entry_cb_mouse_up(), ewl_entry_cursor_new(), ewl_entry_editable_set(), ewl_entry_multiline_set(), EWL_ENTRY_TYPE, EWL_FLAG_FILL_HFILL, EWL_FLAG_FILL_HSHRINK, EWL_FLAG_FILL_VFILL, EWL_MOUSE_CURSOR_XTERM, EWL_OBJECT, ewl_object_fill_policy_set(), EWL_TEXT, ewl_text_init(), ewl_text_selectable_set(), EWL_WIDGET, ewl_widget_appearance_set(), ewl_widget_focusable_set(), ewl_widget_inherit(), and ewl_widget_internal_set().
Referenced by ewl_entry_new().
unsigned int ewl_entry_multiline_get | ( | Ewl_Entry * | e | ) |
Retrieve if the entry is multiline or not.
- Parameters:
-
e,: The Ewl_Entry to get the multiline status from
- Returns:
- Returns the multline status of the widget
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_ENTRY_TYPE, and multiline.
void ewl_entry_multiline_set | ( | Ewl_Entry * | e, | |
unsigned int | multiline | |||
) |
Set if the entry is multiline or not.
- Parameters:
-
e,: The Ewl_Entry to set the multiline status multiline,: The multiline status to set
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_ENTRY_TYPE, and multiline.
Referenced by ewl_entry_init().
Ewl_Widget* ewl_entry_new | ( | void | ) |
Create and return a new Ewl_Entry widget.
- Returns:
- Returns a new Ewl_Widget on success or NULL on failure
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_ENTRY, ewl_entry_init(), ewl_widget_destroy(), and NEW.
Referenced by ewl_filepicker_init(), ewl_password_new(), and ewl_spinner_init().
unsigned int ewl_entry_selection_clear | ( | Ewl_Entry * | e | ) |
Clear the current selection in the entry.
- Parameters:
-
e,: The entry to clear the selection of
- Returns:
- Returns TRUE if a selection was cleared, FALSE otherwise.
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_ENTRY_TYPE, EWL_TEXT, ewl_text_cursor_position_set(), ewl_text_selection_get(), ewl_text_text_delete(), EWL_TEXT_TRIGGER, ewl_text_trigger_length_get(), ewl_text_trigger_length_set(), and ewl_text_trigger_start_pos_get().
Referenced by ewl_entry_cb_key_down(), and ewl_spinner_cb_key_down().
Ewl_View* ewl_entry_view_get | ( | void | ) |
Creates and returns a view to be used by Ewl_Entry widgets.
- Returns:
- Returns a view that can be used to display Ewl_Entry widgets
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_view_header_fetch_set(), ewl_view_new(), and ewl_view_widget_fetch_set().
Ewl_Widget* ewl_password_new | ( | void | ) |
Allocate and initialize a new password widget.
- Returns:
- Returns a new password widget on success, NULL on failure. A password widget is an entry with a set obscure character. The default is a star (*)
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_entry_new(), EWL_ENTRY_TYPE, EWL_TEXT, ewl_text_obscure_set(), and ewl_widget_appearance_set().