* @see also elm_naviframe_item_title_visible_set()
*/
EAPI Eina_Bool elm_naviframe_item_title_visible_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Set creating prev button automatically or not
+ *
+ * @param obj The naviframe object
+ * @param auto_pushed If @c EINA_TRUE, the previous button(back button) will
+ * be created internally when you pass the @c NULL to the prev_btn
+ * parameter in elm_naviframe_item_push
+ *
+ * @see also elm_naviframe_item_push()
+ */
+ EAPI void elm_naviframe_prev_btn_auto_pushed_set(Evas_Object *obj, Eina_Bool auto_pushed) EINA_ARG_NONNULL(1);
+ /**
+ * @brief Get a value whether prev button(back button) will be auto pushed or
+ * not.
+ *
+ * @param obj The naviframe object
+ * @return If @c EINA_TRUE, prev button will be auto pushed.
+ *
+ * @see also elm_naviframe_item_push()
+ * elm_naviframe_prev_btn_auto_pushed_set()
+ */
+ EAPI Eina_Bool elm_naviframe_prev_btn_auto_pushed_get(const Evas_Object *obj); EINA_ARG_NONNULL(1);
/* Control Bar */
#define CONTROLBAR_SYSTEM_ICON_ALBUMS "controlbar_albums"
Evas_Object *base;
Evas_Object *rect;
Eina_Bool preserve: 1;
+ Eina_Bool auto_pushed: 1;
Eina_Bool pass_events: 1;
};
elm_widget_resize_object_set(obj, wd->base);
_elm_theme_object_set(obj, wd->base, "naviframe", "base", "default");
- //rect:
+ //rect
wd->rect = evas_object_rectangle_add(e);
evas_object_color_set(wd->rect, 0, 0, 0, 0);
elm_widget_sub_object_add(obj, wd->rect);
evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _hide, obj);
evas_object_smart_callbacks_descriptions_set(obj, _signals);
+ wd->auto_pushed = EINA_TRUE;
wd->pass_events = EINA_TRUE;
return obj;
_item_text_set_hook(ELM_CAST(it), "elm.text.title", title_label);
//title buttons
- if ((!prev_btn) && (eina_list_count(wd->stack)))
+ if ((!prev_btn) && wd->auto_pushed && eina_list_count(wd->stack))
{
prev_btn = _back_btn_new(obj);
_title_prev_btn_set(it, prev_btn, EINA_TRUE);
return navi_it->title_visible;
}
+EAPI void
+elm_naviframe_prev_btn_auto_pushed_set(Evas_Object *obj, Eina_Bool auto_pushed)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ wd->auto_pushed = !!auto_pushed;
+}
+
+EAPI Eina_Bool
+elm_naviframe_prev_btn_auto_pushed_get(const Evas_Object *obj)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ return wd->auto_pushed;
+}
+