EAPI void elm_scrolled_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v);
EAPI void elm_scrolled_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
EAPI void elm_scrolled_entry_icon_set(Evas_Object *obj, Evas_Object *icon);
+ EAPI const Evas_Object *elm_scrolled_entry_icon_get(Evas_Object *obj);
+ EAPI Evas_Object *elm_scrolled_entry_icon_unset(Evas_Object *obj);
EAPI void elm_scrolled_entry_icon_visible_set(Evas_Object *obj, Eina_Bool setting);
EAPI void elm_scrolled_entry_end_set(Evas_Object *obj, Evas_Object *end);
+ EAPI const Evas_Object *elm_scrolled_entry_end_get(Evas_Object *obj);
+ EAPI Evas_Object *elm_scrolled_entry_end_unset(Evas_Object *obj);
EAPI void elm_scrolled_entry_end_visible_set(Evas_Object *obj, Eina_Bool setting);
EAPI Evas_Object *elm_conformant_add(Evas_Object *parent);
*
* @param obj The scrolled entry object
* @param left_obj The widget to display on the left side of the scrolled entry.
- * If it is NULL, and there is already an widget on the left-side, it will be destroyed.
- * If it isn't NULL, and there were another widget on the left-side already, the old
- * widget will be destroyed.
+ * The old widget will be destroyed.
*
* @ingroup Scrolled_Entry
* @see elm_scrolled_entry_end_set
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
+ if (!wd || !icon) return;
if (wd->icon) evas_object_del(wd->icon);
- if (icon)
+ wd->icon = icon;
+ elm_box_pack_before(wd->box, wd->icon, wd->scroller);
+ _sizing_eval(obj);
+}
+
+/**
+ * Gets the leftmost widget of the scrolled entry. This object is owned by the scrolled
+ * entry and should not be modified.
+ *
+ * @param obj The scrolled entry object
+ *
+ * @ingroup Scrolled_Entry
+ */
+EAPI const Evas_Object *
+elm_scrolled_entry_icon_get(Evas_Object *obj)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ return wd->icon;
+}
+
+/**
+ * Unsets the leftmost widget of the scrolled entry. Unparents and return the leftmost widget.
+ *
+ * @param obj The scrolled entry object
+ *
+ * @ingroup Scrolled_Entry
+ */
+EAPI Evas_Object *
+elm_scrolled_entry_icon_unset(Evas_Object *obj)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *ret = NULL;
+ if (!wd) return NULL;
+ if (wd->icon)
{
- wd->icon = icon;
- elm_box_pack_before(wd->box, wd->icon, wd->scroller);
+ ret = wd->icon;
+ elm_box_unpack(wd->box, wd->icon);
+ _sizing_eval(obj);
}
- _sizing_eval(obj);
+ return ret;
}
/**
* This sets a widget to be displayed to the end of a scrolled entry.
*
* @param obj The scrolled entry object
- * @param left_obj The widget to display on the right side of the scrolled entry.
- * If it is NULL, and there is already an widget on the right-side, it will be destroyed.
- * If it isn't NULL, and there were another widget on the right-side already, the old
- * widget will be destroyed.
+ * @param end The widget to display on the right side of the scrolled entry.
+ * The old widget will be destroyed.
*
* @ingroup Scrolled_Entry
* @see elm_scrolled_entry_icon_set
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return;
+ if (!wd || !end) return;
if (wd->end) evas_object_del(wd->end);
- if (end)
+ wd->end = end;
+ elm_box_pack_after(wd->box, wd->end, wd->scroller);
+ _sizing_eval(obj);
+}
+
+/**
+ * Gets the endmost widget of the scrolled entry. This object is owned by the scrolled
+ * entry and should not be modified.
+ *
+ * @param obj The scrolled entry object
+ *
+ * @ingroup Scrolled_Entry
+ */
+EAPI const Evas_Object *
+elm_scrolled_entry_end_get(Evas_Object *obj)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ return wd->end;
+}
+
+/**
+ * Unsets the endmost widget of the scrolled entry. Unparents and return the endmost widget.
+ *
+ * @param obj The scrolled entry object
+ *
+ * @ingroup Scrolled_Entry
+ */
+EAPI Evas_Object *
+elm_scrolled_entry_end_unset(Evas_Object *obj)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *ret = NULL;
+ if (!wd) return NULL;
+ if (wd->end)
{
- wd->end = end;
- elm_box_pack_after(wd->box, wd->end, wd->scroller);
+ ret = wd->end;
+ elm_box_unpack(wd->box, wd->end);
+ _sizing_eval(obj);
}
- _sizing_eval(obj);
+ return ret;
}
/**