description { state: "default" 0.0;
text {
style: "entry_single_textblock_style";
- repch: "●";
+ repch: "*";
min: 1 1;
}
}
elm_entry_entry_set(en, "This is a single line");
evas_object_size_hint_weight_set(en, 1.0, 0.0);
evas_object_size_hint_align_set(en, -1.0, 0.0);
+ elm_entry_select_all(en);
elm_scroller_content_set(sc, en);
evas_object_show(en);
EAPI void elm_entry_entry_insert(Evas_Object *obj, const char *entry);
EAPI void elm_entry_line_wrap_set(Evas_Object *obj, Evas_Bool wrap);
EAPI void elm_entry_editable_set(Evas_Object *obj, Evas_Bool editable);
+ EAPI void elm_entry_select_none(Evas_Object *obj);
+ EAPI void elm_entry_select_all(Evas_Object *obj);
+
/* smart callbacks called:
* "changed" - the text content changed
* "selection,start" - the user started selecting text
////////////////////////
//
//// (bugs - high priority)
-// * single line entry on scale change adds newlines
// * scale change for hover doesnt seem to do new size alloc nicely
-// * left/right arrow broken with password mode for entry
+// * left/right arrow broken with password mode for entry + utf8 chars...
//
//// (incomplete - medium priority)
// * disabled not supported
// * tab widget focusing (not useful for touchscreen tho...)
-// * entry needs to support setting selection to all, or clearing
// * bubble should allow style (left/right + top/bottom)
// * need to get toplevel object (win)
// * entry needs to set vkbd properties/hint (as does win)
-// * entry selection conflicts with finger scroll
+// * entry selection conflicts with finger scroll (make selection start/stop work on signals?)
// * on the fly theme changes - test (should work)
+// * entry doesnt talk with x copy & paste at all
//
//// (more widgets/features - medium priority)
// * toolbar widget (edje + box + button + separators)
static void _signal_entry_cut_notify(void *data, Evas_Object *obj, const char *emission, const char *source);
static void _signal_cursor_changed(void *data, Evas_Object *obj, const char *emission, const char *source);
+static Eina_List *entries = NULL;
+
static void
_del_hook(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
+ entries = eina_list_remove(entries, obj);
if (wd->deferred_recalc_job) ecore_job_del(wd->deferred_recalc_job);
free(wd);
}
_signal_selection_start(void *data, Evas_Object *obj, const char *emission, const char *source)
{
Widget_Data *wd = elm_widget_data_get(data);
+ Eina_List *l;
evas_object_smart_callback_call(data, "selection,start", NULL);
+ for (l = entries; l; l = l->next)
+ {
+ if (l->data != data) elm_entry_select_none(l->data);
+ }
// FIXME: x clipboard/copy & paste - do
}
edje_object_part_text_set(wd->ent, "elm.text", "<br>");
elm_widget_resize_object_set(obj, wd->ent);
_sizing_eval(obj);
+ entries = eina_list_prepend(entries, obj);
return obj;
}
if (t) free(t);
_sizing_eval(obj);
}
+
+EAPI void
+elm_entry_select_none(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ edje_object_part_text_select_none(wd->ent, "elm.text");
+}
+
+EAPI void
+elm_entry_select_all(Evas_Object *obj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ edje_object_part_text_select_all(wd->ent, "elm.text");
+}