Exemple #1
0
/**
 * Selects all the text of the editable object. The selection bound will be
 * moved to the start of the editable object and the cursor will be moved to
 * the end
 *
 * @param editable an editable object
 */
EAPI void
e_editable_select_all(Evas_Object *editable)
{
   if (!editable) return;
   e_editable_selection_move_to_start(editable);
   e_editable_cursor_move_to_end(editable);
}
/**
 * Selects all the text of the editable object. The selection bound will be
 * moved to the start of the editable object and the cursor will be moved to
 * the end
 *
 * @param editable an editable object
 */
EAPI void
e_editable_select_all(Evas_Object *editable)
{
   if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR();
   e_editable_selection_move_to_start(editable);
   e_editable_cursor_move_to_end(editable);
}
/**
 * Focuses the entry object. It will receives keyboard events and the user could
 * then type some text (the entry should also be enabled. The cursor and the
 * selection will be shown
 *
 * @param entry the entry to focus
 */
EAPI void
e_entry_focus(Evas_Object *entry)
{
   E_Entry_Smart_Data *sd;
   
   if (evas_object_smart_smart_get(entry) != _e_entry_smart) SMARTERRNR();
   if ((!entry) || (!(sd = evas_object_smart_data_get(entry))))
     return;
   if (sd->focused)
      return;
   
   evas_object_focus_set(entry, 1);
   edje_object_signal_emit(sd->entry_object, "e,state,focused", "e");
   if (!sd->selection_dragging)
     {
        _e_entry_imf_context_reset(entry);
        e_editable_cursor_move_to_end(sd->editable_object);
        _e_entry_imf_cursor_info_set(entry);

        e_editable_selection_move_to_end(sd->editable_object);
     }
   if (sd->enabled)
      e_editable_cursor_show(sd->editable_object);
   e_editable_selection_show(sd->editable_object);
#ifdef HAVE_ECORE_IMF
   if (sd->imf_context)
     ecore_imf_context_focus_in(sd->imf_context);
#endif
   sd->focused = 1;
}