EAPI void elm_box_pack_before(Evas_Object *obj, Evas_Object *subobj, Evas_Object *before);
EAPI void elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after);
EAPI void elm_box_clear(Evas_Object *obj);
- EAPI void elm_box_unpack(Evas_Object *obj);
+ EAPI void elm_box_unpack(Evas_Object *obj, Evas_Object *subobj);
+ EAPI void elm_box_unpack_all(Evas_Object *obj);
/* smart callbacks called:
*/
}
/**
- * This unpacks an item from the box
+ * This unpack a box item
*
- * This unpacks a single Evas_Object from the box.
+ * This unpack the selected member from the box object, but does not delete
+ * the box itself or the packed items.
*
- * @param obj The box item
+ * @param obj The box object
+ *
+ * @ingroup Box
+ */
+EAPI void
+elm_box_unpack(Evas_Object *obj, Evas_Object *subobj)
+{
+ Widget_Data *wd = elm_widget_data_get(obj);
+ _els_smart_box_unpack(wd->box, subobj);
+}
+
+/**
+ * This unpack the box items
+ *
+ * This unpack all members from the box object, but does not delete
+ * the box itself or the packed items.
+ *
+ * @param obj The box object
*
* @ingroup Box
*/
EAPI void
-elm_box_unpack(Evas_Object *obj)
+elm_box_unpack_all(Evas_Object *obj)
{
- _els_smart_box_unpack(obj);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ _els_smart_box_unpack_all(wd->box);
}
}
void
-_els_smart_box_unpack(Evas_Object *obj)
+_els_smart_box_unpack(Evas_Object *obj, Evas_Object *child)
{
Smart_Data *sd;
if (!obj) return;
- sd = evas_object_smart_data_get(evas_object_smart_parent_get(obj));
+ sd = evas_object_smart_data_get(obj);
if (!sd) return;
- sd->items = eina_list_remove(sd->items, obj);
- _smart_disown(obj);
+ sd->items = eina_list_remove(sd->items, child);
+ elm_widget_sub_object_del(obj, child);
+ _smart_disown(child);
if (!sd->deleting)
{
if (!evas_object_clipees_get(sd->clip))
}
void
+_els_smart_box_unpack_all(Evas_Object *obj)
+{
+ Smart_Data *sd;
+
+ sd = evas_object_smart_data_get(obj);
+ if (!sd) return;
+ while (sd->items)
+ {
+ Evas_Object *child = sd->items->data;
+ _els_smart_box_unpack(obj, child);
+ }
+}
+
+void
_els_smart_box_clear(Evas_Object *obj)
{
Smart_Data *sd;
static void
_smart_item_del_hook(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
- _els_smart_box_unpack(obj);
+ _els_smart_box_unpack(evas_object_smart_parent_get(obj), obj);
}
static void
Evas_Object *child;
child = sd->items->data;
- _els_smart_box_unpack(child);
+ _els_smart_box_unpack(obj, child);
}
evas_object_del(sd->clip);
free(sd);
int _els_smart_box_pack_end (Evas_Object *obj, Evas_Object *child);
int _els_smart_box_pack_before (Evas_Object *obj, Evas_Object *child, Evas_Object *before);
int _els_smart_box_pack_after (Evas_Object *obj, Evas_Object *child, Evas_Object *after);
-void _els_smart_box_unpack (Evas_Object *obj);
+void _els_smart_box_unpack (Evas_Object *obj, Evas_Object *child);
+void _els_smart_box_unpack_all (Evas_Object *obj);
void _els_smart_box_clear (Evas_Object *obj);