Ui text interactive: add select_none

This is intended for Ui.Text to clear the selection on selection loss.
This commit is contained in:
Daniel Hirt 2018-09-07 12:36:26 +03:00
parent 294040c86e
commit 5b29de0388
3 changed files with 11 additions and 0 deletions

View File

@ -43,6 +43,9 @@ interface Efl.Text_Interactive (Efl.Text, Efl.Text_Font,
if not, the entry is read-only and no user input is allowed.]] if not, the entry is read-only and no user input is allowed.]]
} }
} }
select_none {
[[Clears the selection.]]
}
} }
events { events {
selection,changed: void; [[The selection on the object has changed. Query using @.selection_cursors]] selection,changed: void; [[The selection on the object has changed. Query using @.selection_cursors]]

View File

@ -582,6 +582,13 @@ _sel_clear(Evas_Object *o EINA_UNUSED, Efl_Ui_Internal_Text_Interactive_Data *en
} }
} }
static void
_efl_ui_internal_text_interactive_efl_text_interactive_select_none(
Eo *obj, Efl_Ui_Internal_Text_Interactive_Data *en)
{
_sel_clear(obj, en);
}
static void static void
_range_del_emit(Evas_Object *obj, Efl_Text_Cursor_Cursor *cur1, Efl_Text_Cursor_Cursor *cur2) _range_del_emit(Evas_Object *obj, Efl_Text_Cursor_Cursor *cur1, Efl_Text_Cursor_Cursor *cur2)
{ {

View File

@ -10,5 +10,6 @@ class Efl.Ui.Internal.Text.Interactive (Efl.Canvas.Text, Efl.Text_Interactive)
Efl.Text_Interactive.selection_allowed { get; set; } Efl.Text_Interactive.selection_allowed { get; set; }
Efl.Text_Interactive.selection_cursors { get; } Efl.Text_Interactive.selection_cursors { get; }
Efl.Text_Interactive.editable { get; set; } Efl.Text_Interactive.editable { get; set; }
Efl.Text_Interactive.select_none;
} }
} }