*/
EAPI Eina_Bool elm_entry_input_panel_enabled_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
- EINA_DEPRECATED EAPI void elm_entry_background_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a);
EAPI void elm_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool autocap);
EAPI void elm_entry_autoperiod_set(Evas_Object *obj, Eina_Bool autoperiod);
EAPI void elm_entry_autoenable_returnkey_set(Evas_Object *obj, Eina_Bool on);
EAPI void elm_editfield_guide_text_set(Evas_Object *obj, const char *text);
EAPI const char *elm_editfield_guide_text_get(Evas_Object *obj);
EAPI Evas_Object *elm_editfield_entry_get(Evas_Object *obj);
-// EAPI Evas_Object *elm_editfield_clear_button_show(Evas_Object *obj, Eina_Bool show);
- EINA_DEPRECATED EAPI void elm_editfield_right_icon_set(Evas_Object *obj, Evas_Object *icon);
- EINA_DEPRECATED EAPI Evas_Object *elm_editfield_right_icon_get(Evas_Object *obj);
- EINA_DEPRECATED EAPI void elm_editfield_left_icon_set(Evas_Object *obj, Evas_Object *icon);
- EINA_DEPRECATED EAPI Evas_Object *elm_editfield_left_icon_get(Evas_Object *obj);
EAPI void elm_editfield_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line);
EAPI Eina_Bool elm_editfield_entry_single_line_get(Evas_Object *obj);
EAPI void elm_editfield_eraser_set(Evas_Object *obj, Eina_Bool visible);
* @defgroup Editfield Editfield
* @ingroup Elementary
*
- * This is a editfield. It can contain a simple label and icon objects.
+ * This is an editfield. It supports guide text and eraser feature.
*
* Smart callbacks that you can add are:
*
{
Evas_Object *base;
Evas_Object *entry;
- Evas_Object *ricon;
- Evas_Object *licon;
const char *label;
const char *guide_text;
Eina_Bool needs_size_calc:1;
}
}
}
- if(wd->ricon)
- edje_object_part_swallow(wd->base, "right_icon", wd->ricon);
- if(wd->licon)
- edje_object_part_swallow(wd->base, "left_icon", wd->licon);
_sizing_eval(obj);
}
{
wd->label = eina_stringshare_add(label);
edje_object_signal_emit(wd->base, "elm,state,text,visible", "elm");
- edje_object_signal_emit(wd->base, "elm,state,left,icon,hide", "elm");
}
else
{
wd->label = NULL;
edje_object_signal_emit(wd->base, "elm,state,text,hidden", "elm");
- edje_object_signal_emit(wd->base, "elm,state,left,icon,show", "elm");
}
edje_object_message_signal_process(wd->base);
edje_object_part_text_set(wd->base, "elm.text", label);
}
/**
- * Set the left side icon.
- *
- * @param obj The editfield object
- * @param icon The icon object
- *
- * @ingroup Editfield
- */
-EINA_DEPRECATED EAPI void
-elm_editfield_left_icon_set(Evas_Object *obj, Evas_Object *icon)
-{
- Widget_Data *wd = elm_widget_data_get(obj);
- ELM_CHECK_WIDTYPE(obj, widtype) ;
- if (!wd || !wd->base || !icon) return;
- if ((wd->licon != icon) && (wd->licon))
- elm_widget_sub_object_del(obj, wd->licon);
- if (icon)
- {
- edje_object_part_swallow(wd->base, "left_icon", icon);
- wd->licon = icon;
- elm_widget_sub_object_add(obj, icon);
- evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints, obj);
- edje_object_signal_emit(wd->base, "elm,state,left,icon,show", "elm");
- edje_object_signal_emit(wd->base, "elm,state,text,hidden", "elm");
- _sizing_eval(obj);
- }
-}
-
-/**
- * Get the left side icon
- *
- * @param obj The editfield object
- * @return icon object
- *
- * @ingroup Editfield
- */
-EINA_DEPRECATED EAPI Evas_Object *
-elm_editfield_left_icon_get(Evas_Object *obj)
-{
- Widget_Data *wd = elm_widget_data_get(obj);
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- if (!wd || !wd->base || !wd->licon) return NULL;
- return wd->licon;
-}
-
-/**
- * Set the right side icon.
- *
- * @param obj The editfield object
- * @param icon The icon object
- *
- * @ingroup Editfield
- */
-EINA_DEPRECATED EAPI void
-elm_editfield_right_icon_set(Evas_Object *obj, Evas_Object *icon)
-{
- Widget_Data *wd = elm_widget_data_get(obj);
- ELM_CHECK_WIDTYPE(obj, widtype) ;
- if (!wd || !wd->base || !icon) return;
- if ((wd->ricon != icon) && (wd->ricon))
- elm_widget_sub_object_del(obj, wd->ricon);
- if (icon)
- {
- edje_object_part_swallow(wd->base, "right_icon", icon);
- wd->ricon = icon;
- elm_widget_sub_object_add(obj, icon);
- evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _changed_size_hints, obj);
- edje_object_signal_emit(wd->base, "elm,state,right,icon,show", "elm");
- _sizing_eval(obj);
- }
-}
-
-/**
- * Get the right side icon
- *
- * @param obj The editfield object
- * @return icon object
- *
- * @ingroup Editfield
- */
-EINA_DEPRECATED EAPI Evas_Object *
-elm_editfield_right_icon_get(Evas_Object *obj)
-{
- Widget_Data *wd = elm_widget_data_get(obj);
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- if (!wd || !wd->base || !wd->ricon) return NULL;
- return wd->ricon;
-}
-
-/**
* Set entry object style as single-line or multi-line.
*
* @param obj The editfield object
struct _Widget_Data
{
Evas_Object *ent, *scroller, *end, *icon;
- Evas_Object *bg;
Evas_Object *hoversel;
Evas_Object *hover;
Evas_Object *layout;
Eina_Bool context_menu : 1;
Eina_Bool magnifier_enabled : 1;
Eina_Bool drag_selection_asked : 1;
- Eina_Bool bgcolor : 1;
Eina_Bool can_write : 1;
Eina_Bool autosave : 1;
Eina_Bool usedown : 1;
if (wd->cut_sel) eina_stringshare_del(wd->cut_sel);
if (wd->text) eina_stringshare_del(wd->text);
if (wd->password_text) eina_stringshare_del(wd->password_text);
- if (wd->bg) evas_object_del(wd->bg);
if (wd->deferred_recalc_job) ecore_job_del(wd->deferred_recalc_job);
if (wd->region_get_job) ecore_job_del(wd->region_get_job);
if (wd->append_text_idler)
if (wrap) elm_entry_line_wrap_set(obj, ELM_WRAP_CHAR);
}
-EINA_DEPRECATED EAPI void
-elm_entry_background_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a)
-{
- ELM_CHECK_WIDTYPE(obj, widtype);
- Widget_Data *wd = elm_widget_data_get(obj);
- evas_object_color_set(wd->bg, r, g, b, a);
-
- if (wd->bgcolor == EINA_FALSE)
- {
- wd->bgcolor = 1;
- edje_object_part_swallow(wd->ent, "entry.swallow.background", wd->bg);
- }
-}
-
EAPI void
elm_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool autocap)
{