parent
9ab21d9587
commit
034f736160
|
@ -2950,7 +2950,7 @@ collections {
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
text {
|
text {
|
||||||
style: "entry_single_textblock_style";
|
style: "entry_single_textblock_style";
|
||||||
repch: "●";
|
repch: "*";
|
||||||
min: 1 1;
|
min: 1 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -769,6 +769,7 @@ my_bt_14(void *data, Evas_Object *obj, void *event_info)
|
||||||
elm_entry_entry_set(en, "This is a single line");
|
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_weight_set(en, 1.0, 0.0);
|
||||||
evas_object_size_hint_align_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);
|
elm_scroller_content_set(sc, en);
|
||||||
evas_object_show(en);
|
evas_object_show(en);
|
||||||
|
|
||||||
|
|
|
@ -200,6 +200,9 @@ extern "C" {
|
||||||
EAPI void elm_entry_entry_insert(Evas_Object *obj, const char *entry);
|
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_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_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:
|
/* smart callbacks called:
|
||||||
* "changed" - the text content changed
|
* "changed" - the text content changed
|
||||||
* "selection,start" - the user started selecting text
|
* "selection,start" - the user started selecting text
|
||||||
|
@ -285,19 +288,18 @@ extern "C" {
|
||||||
////////////////////////
|
////////////////////////
|
||||||
//
|
//
|
||||||
//// (bugs - high priority)
|
//// (bugs - high priority)
|
||||||
// * single line entry on scale change adds newlines
|
|
||||||
// * scale change for hover doesnt seem to do new size alloc nicely
|
// * 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)
|
//// (incomplete - medium priority)
|
||||||
// * disabled not supported
|
// * disabled not supported
|
||||||
// * tab widget focusing (not useful for touchscreen tho...)
|
// * 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)
|
// * bubble should allow style (left/right + top/bottom)
|
||||||
// * need to get toplevel object (win)
|
// * need to get toplevel object (win)
|
||||||
// * entry needs to set vkbd properties/hint (as does 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)
|
// * on the fly theme changes - test (should work)
|
||||||
|
// * entry doesnt talk with x copy & paste at all
|
||||||
//
|
//
|
||||||
//// (more widgets/features - medium priority)
|
//// (more widgets/features - medium priority)
|
||||||
// * toolbar widget (edje + box + button + separators)
|
// * toolbar widget (edje + box + button + separators)
|
||||||
|
|
|
@ -30,10 +30,13 @@ static void _signal_entry_copy_notify(void *data, Evas_Object *obj, const char *
|
||||||
static void _signal_entry_cut_notify(void *data, Evas_Object *obj, const char *emission, const char *source);
|
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 void _signal_cursor_changed(void *data, Evas_Object *obj, const char *emission, const char *source);
|
||||||
|
|
||||||
|
static Eina_List *entries = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_del_hook(Evas_Object *obj)
|
_del_hook(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(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);
|
if (wd->deferred_recalc_job) ecore_job_del(wd->deferred_recalc_job);
|
||||||
free(wd);
|
free(wd);
|
||||||
}
|
}
|
||||||
|
@ -165,7 +168,12 @@ static void
|
||||||
_signal_selection_start(void *data, Evas_Object *obj, const char *emission, const char *source)
|
_signal_selection_start(void *data, Evas_Object *obj, const char *emission, const char *source)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(data);
|
Widget_Data *wd = elm_widget_data_get(data);
|
||||||
|
Eina_List *l;
|
||||||
evas_object_smart_callback_call(data, "selection,start", NULL);
|
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
|
// FIXME: x clipboard/copy & paste - do
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,6 +360,7 @@ elm_entry_add(Evas_Object *parent)
|
||||||
edje_object_part_text_set(wd->ent, "elm.text", "<br>");
|
edje_object_part_text_set(wd->ent, "elm.text", "<br>");
|
||||||
elm_widget_resize_object_set(obj, wd->ent);
|
elm_widget_resize_object_set(obj, wd->ent);
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
|
entries = eina_list_prepend(entries, obj);
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -459,3 +468,17 @@ elm_entry_editable_set(Evas_Object *obj, Evas_Bool editable)
|
||||||
if (t) free(t);
|
if (t) free(t);
|
||||||
_sizing_eval(obj);
|
_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");
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue