*/
EAPI void elm_naviframe_item_pop_to(Elm_Object_Item *it) EINA_ARG_NONNULL(1);
/**
+ * Promote an item already in the naviframe stack to the top of the stack
+ *
+ * @param it The naviframe item
+ *
+ * This will take the indicated item and promote it to the top of the stack
+ * as if it had been pushed there. The item must already be inside the
+ * naviframe stack to work.
+ *
+ */
+ EAPI void elm_naviframe_item_promote(Elm_Object_Item *it) EINA_ARG_NONNULL(1);
+ /**
* @brief Delete the given item instantly.
*
* @param it The naviframe item
if (!wd) return;
EINA_INLIST_REVERSE_FOREACH(wd->stack, it)
- _item_del(it);
+ {
+ wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(it));
+ _item_del(it);
+ }
free(wd);
}
eina_stringshare_del(it->style);
- wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(it));
-
elm_widget_item_del(it);
}
if (wd->stack->last->prev)
prev_it = EINA_INLIST_CONTAINER_GET(wd->stack->last->prev,
Elm_Naviframe_Item);
+ wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(it));
if (prev_it)
{
if (wd->freeze_events)
if (EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item) ==
((Elm_Naviframe_Item *) it)) break;
prev_l = l->prev;
+ wd->stack = eina_inlist_remove(wd->stack, l);
_item_del(EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item));
l = prev_l;
}
}
EAPI void
+elm_naviframe_item_promote(Elm_Object_Item *it)
+{
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
+ Elm_Naviframe_Item *prev_it = NULL;
+ Widget_Data *wd = elm_widget_data_get(navi_it->base.widget);
+ if (it == elm_naviframe_top_item_get(navi_it->base.widget)) return;
+ wd->stack = eina_inlist_demote(wd->stack, EINA_INLIST_GET(navi_it));
+ prev_it = EINA_INLIST_CONTAINER_GET(wd->stack->last->prev,
+ Elm_Naviframe_Item);
+ if (wd->freeze_events)
+ {
+ evas_object_show(wd->rect);
+ //FIXME:
+ evas_object_pass_events_set(wd->base, EINA_TRUE);
+ }
+ edje_object_signal_emit(prev_it->base.view,
+ "elm,state,cur,pushed",
+ "elm");
+ evas_object_show(navi_it->base.view);
+ evas_object_raise(navi_it->base.view);
+ edje_object_signal_emit(navi_it->base.view,
+ "elm,state,new,pushed",
+ "elm");
+
+}
+
+EAPI void
elm_naviframe_item_del(Elm_Object_Item *it)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Widget_Data *wd = elm_widget_data_get(WIDGET(navi_it));
if (it == elm_naviframe_top_item_get(WIDGET(navi_it)))
{
+ wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(navi_it));
_item_del(navi_it);
navi_it = EINA_INLIST_CONTAINER_GET(wd->stack->last,
Elm_Naviframe_Item);
edje_object_signal_emit(VIEW(navi_it), "elm,state,visible", "elm");
}
else
- _item_del(navi_it);
+ {
+ wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(navi_it));
+ _item_del(navi_it);
+ }
}
EAPI void