2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @defgroup Naviframe Naviframe
|
|
|
|
* @ingroup Elementary
|
|
|
|
*
|
2012-06-05 15:41:21 -07:00
|
|
|
* @image html naviframe_inheritance_tree.png
|
|
|
|
* @image latex naviframe_inheritance_tree.eps
|
|
|
|
*
|
2012-06-01 14:56:09 -07:00
|
|
|
* @brief Naviframe stands for navigation frame. It's a views manager
|
|
|
|
* for applications.
|
2011-12-29 23:20:48 -08:00
|
|
|
*
|
2012-06-01 14:56:09 -07:00
|
|
|
* A naviframe holds views (or pages) as its items. Those items are
|
|
|
|
* organized in a stack, so that new items get pushed on top of the
|
|
|
|
* old, and only the topmost view is displayed at one time. The
|
|
|
|
* transition between views is animated, depending on the theme
|
|
|
|
* applied to the widget.
|
2011-12-29 23:20:48 -08:00
|
|
|
*
|
2012-06-01 14:56:09 -07:00
|
|
|
* Naviframe views hold spaces to various elements, which are:
|
|
|
|
* - back button, used to navigate to previous views,
|
|
|
|
* - next button, used to navigate to next views in the stack,
|
|
|
|
* - title label,
|
|
|
|
* - sub-title label,
|
|
|
|
* - title icon and
|
|
|
|
* - content area.
|
2012-03-28 02:02:22 -07:00
|
|
|
*
|
2012-06-01 14:56:09 -07:00
|
|
|
* This widget inherits from the @ref Layout one, so that all the
|
|
|
|
* functions acting on it also work for naviframe objects.
|
2012-03-28 02:02:22 -07:00
|
|
|
*
|
2013-02-19 18:33:02 -08:00
|
|
|
* Because this widget is a layout, one places content on those areas
|
2012-06-01 14:56:09 -07:00
|
|
|
* by using elm_layout_content_set() on the right swallow part names
|
|
|
|
* expected for each, which are:
|
|
|
|
* @li @c "default" - The main content of the current page
|
|
|
|
* @li @c "icon" - An icon in the title area of the current page
|
|
|
|
* @li @c "prev_btn" - A button of the current page to go to the
|
|
|
|
* previous page
|
|
|
|
* @li @c "next_btn" - A button of the current page to go to the next
|
|
|
|
* page
|
2012-02-16 21:00:22 -08:00
|
|
|
*
|
2012-06-01 14:56:09 -07:00
|
|
|
* For text, elm_layout_text_set() will work here on:
|
|
|
|
* @li @c "default" - Title label in the title area of the current
|
|
|
|
* page
|
|
|
|
* @li @c "subtitle" - Sub-title label in the title area of the
|
|
|
|
* current page
|
2011-12-29 23:20:48 -08:00
|
|
|
*
|
2012-06-01 14:56:09 -07:00
|
|
|
* Most of those content objects can be passed at the time of an item
|
|
|
|
* creation (see elm_naviframe_item_push()).
|
2011-12-29 23:20:48 -08:00
|
|
|
*
|
2012-06-01 14:56:09 -07:00
|
|
|
* Naviframe items can have different styles, which affect the
|
|
|
|
* transition between views, for example. On the default theme, two of
|
|
|
|
* them are supported:
|
2012-06-03 11:36:06 -07:00
|
|
|
* - @c "basic" - views are switched sliding horizontally, one after
|
2012-06-01 14:56:09 -07:00
|
|
|
* the other
|
|
|
|
* - @c "overlap" - like the previous one, but the previous view stays
|
2013-02-19 18:33:02 -08:00
|
|
|
* at its place and is overlapped by the new
|
2011-12-29 23:20:48 -08:00
|
|
|
*
|
|
|
|
*
|
2012-06-01 14:56:09 -07:00
|
|
|
* This widget emits the following signals, besides the ones sent from
|
|
|
|
* @ref Layout:
|
|
|
|
* @li @c "transition,finished" - When the transition is finished in
|
|
|
|
* changing the item
|
|
|
|
* @li @c "title,clicked" - User clicked title area
|
|
|
|
*
|
|
|
|
* All the parts, for content and text, described here will also be
|
|
|
|
* reachable by naviframe @b items direct calls:
|
2012-04-17 13:33:59 -07:00
|
|
|
* @li @ref elm_object_item_part_text_set
|
|
|
|
* @li @ref elm_object_item_part_text_get
|
|
|
|
* @li @ref elm_object_item_part_content_set
|
|
|
|
* @li @ref elm_object_item_part_content_get
|
|
|
|
* @li @ref elm_object_item_part_content_unset
|
|
|
|
* @li @ref elm_object_item_signal_emit
|
2012-06-01 14:56:09 -07:00
|
|
|
*
|
|
|
|
* What happens is that the topmost item of a naviframe will be the
|
|
|
|
* widget's target layout, when accessed directly. Items lying below
|
|
|
|
* the top one can be interacted with this way.
|
2011-12-29 23:20:48 -08:00
|
|
|
*/
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
#define ELM_OBJ_NAVIFRAME_CLASS elm_obj_naviframe_class_get()
|
|
|
|
|
|
|
|
const Eo_Class *elm_obj_naviframe_class_get(void) EINA_CONST;
|
|
|
|
|
|
|
|
extern EAPI Eo_Op ELM_OBJ_NAVIFRAME_BASE_ID;
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_ITEM_PUSH,
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_ITEM_INSERT_BEFORE,
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_ITEM_INSERT_AFTER,
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_ITEM_POP,
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_ITEM_SIMPLE_PROMOTE,
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_CONTENT_PRESERVE_ON_POP_SET,
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_CONTENT_PRESERVE_ON_POP_GET,
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_TOP_ITEM_GET,
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_BOTTOM_ITEM_GET,
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_PREV_BTN_AUTO_PUSHED_SET,
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_PREV_BTN_AUTO_PUSHED_GET,
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_ITEMS_GET,
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_EVENT_ENABLED_SET,
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_EVENT_ENABLED_GET,
|
|
|
|
ELM_OBJ_NAVIFRAME_SUB_ID_LAST
|
|
|
|
};
|
|
|
|
|
|
|
|
#define ELM_OBJ_NAVIFRAME_ID(sub_id) (ELM_OBJ_NAVIFRAME_BASE_ID + sub_id)
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def elm_obj_naviframe_item_push
|
|
|
|
* @since 1.8
|
|
|
|
*
|
|
|
|
* @brief Push a new item to the top of the naviframe stack (and show it).
|
|
|
|
*
|
|
|
|
* @param[in] title_label
|
|
|
|
* @param[in] prev_btn
|
|
|
|
* @param[in] next_btn
|
|
|
|
* @param[in] content
|
|
|
|
* @param[in] item_style
|
|
|
|
* @param[out] ret
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_item_push
|
|
|
|
*/
|
|
|
|
#define elm_obj_naviframe_item_push(title_label, prev_btn, next_btn, content, item_style, ret) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_ITEM_PUSH), EO_TYPECHECK(const char *, title_label), EO_TYPECHECK(Evas_Object *, prev_btn), EO_TYPECHECK(Evas_Object *, next_btn), EO_TYPECHECK(Evas_Object *, content), EO_TYPECHECK(const char *, item_style), EO_TYPECHECK(Elm_Object_Item **, ret)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def elm_obj_naviframe_item_insert_before
|
|
|
|
* @since 1.8
|
|
|
|
*
|
|
|
|
* @brief Insert a new item into the naviframe before item before.
|
|
|
|
*
|
|
|
|
* @param[in] before
|
|
|
|
* @param[in] title_label
|
|
|
|
* @param[in] prev_btn
|
|
|
|
* @param[in] next_btn
|
|
|
|
* @param[in] content
|
|
|
|
* @param[in] item_style
|
|
|
|
* @param[out] ret
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_item_insert_before
|
|
|
|
*/
|
|
|
|
#define elm_obj_naviframe_item_insert_before(before, title_label, prev_btn, next_btn, content, item_style, ret) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_ITEM_INSERT_BEFORE), EO_TYPECHECK(Elm_Object_Item *, before), EO_TYPECHECK(const char *, title_label), EO_TYPECHECK(Evas_Object *, prev_btn), EO_TYPECHECK(Evas_Object *, next_btn), EO_TYPECHECK(Evas_Object *, content), EO_TYPECHECK(const char *, item_style), EO_TYPECHECK(Elm_Object_Item **, ret)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def elm_obj_naviframe_item_insert_after
|
|
|
|
* @since 1.8
|
|
|
|
*
|
|
|
|
* @brief Insert a new item into the naviframe after item after.
|
|
|
|
*
|
|
|
|
* @param[in] after
|
|
|
|
* @param[in] title_label
|
|
|
|
* @param[in] prev_btn
|
|
|
|
* @param[in] next_btn
|
|
|
|
* @param[in] content
|
|
|
|
* @param[in] item_style
|
|
|
|
* @param[out] ret
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_item_insert_after
|
|
|
|
*/
|
|
|
|
#define elm_obj_naviframe_item_insert_after(after, title_label, prev_btn, next_btn, content, item_style, ret) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_ITEM_INSERT_AFTER), EO_TYPECHECK(Elm_Object_Item *, after), EO_TYPECHECK(const char *, title_label), EO_TYPECHECK(Evas_Object *, prev_btn), EO_TYPECHECK(Evas_Object *, next_btn), EO_TYPECHECK(Evas_Object *, content), EO_TYPECHECK(const char *, item_style), EO_TYPECHECK(Elm_Object_Item **, ret)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def elm_obj_naviframe_item_pop
|
|
|
|
* @since 1.8
|
|
|
|
*
|
|
|
|
* @brief Pop an item that is on top of the stack
|
|
|
|
*
|
|
|
|
* @param[out] ret
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_item_pop
|
|
|
|
*/
|
|
|
|
#define elm_obj_naviframe_item_pop(ret) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_ITEM_POP), EO_TYPECHECK(Evas_Object **, ret)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def elm_obj_naviframe_item_simple_promote
|
|
|
|
* @since 1.8
|
|
|
|
*
|
|
|
|
* @brief Simple version of item_promote.
|
|
|
|
*
|
|
|
|
* @param[in] content
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_item_simple_promote
|
|
|
|
*/
|
|
|
|
#define elm_obj_naviframe_item_simple_promote(content) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_ITEM_SIMPLE_PROMOTE), EO_TYPECHECK(Evas_Object *, content)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def elm_obj_naviframe_content_preserve_on_pop_set
|
|
|
|
* @since 1.8
|
|
|
|
*
|
|
|
|
* @brief preserve the content objects when items are popped.
|
|
|
|
*
|
|
|
|
* @param[in] preserve
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_content_preserve_on_pop_set
|
|
|
|
*/
|
|
|
|
#define elm_obj_naviframe_content_preserve_on_pop_set(preserve) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_CONTENT_PRESERVE_ON_POP_SET), EO_TYPECHECK(Eina_Bool, preserve)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def elm_obj_naviframe_content_preserve_on_pop_get
|
|
|
|
* @since 1.8
|
|
|
|
*
|
|
|
|
* @brief Get a value whether preserve mode is enabled or not.
|
|
|
|
*
|
|
|
|
* @param[out] ret
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_content_preserve_on_pop_get
|
|
|
|
*/
|
|
|
|
#define elm_obj_naviframe_content_preserve_on_pop_get(ret) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_CONTENT_PRESERVE_ON_POP_GET), EO_TYPECHECK(Eina_Bool *, ret)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def elm_obj_naviframe_top_item_get
|
|
|
|
* @since 1.8
|
|
|
|
*
|
|
|
|
* @brief Get a top item on the naviframe stack
|
|
|
|
*
|
|
|
|
* @param[out] ret
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_top_item_get
|
|
|
|
*/
|
|
|
|
#define elm_obj_naviframe_top_item_get(ret) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_TOP_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def elm_obj_naviframe_bottom_item_get
|
|
|
|
* @since 1.8
|
|
|
|
*
|
|
|
|
* @brief Get a bottom item on the naviframe stack
|
|
|
|
*
|
|
|
|
* @param[out] ret
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_bottom_item_get
|
|
|
|
*/
|
|
|
|
#define elm_obj_naviframe_bottom_item_get(ret) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_BOTTOM_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def elm_obj_naviframe_prev_btn_auto_pushed_set
|
|
|
|
* @since 1.8
|
|
|
|
*
|
|
|
|
* @brief Set creating prev button automatically or not
|
|
|
|
*
|
|
|
|
* @param[in] auto_pushed
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_prev_btn_auto_pushed_set
|
|
|
|
*/
|
|
|
|
#define elm_obj_naviframe_prev_btn_auto_pushed_set(auto_pushed) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_PREV_BTN_AUTO_PUSHED_SET), EO_TYPECHECK(Eina_Bool, auto_pushed)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def elm_obj_naviframe_prev_btn_auto_pushed_get
|
|
|
|
* @since 1.8
|
|
|
|
*
|
|
|
|
* @brief Get a value whether prev button(back button) will be auto pushed or
|
|
|
|
*
|
|
|
|
* @param[out] ret
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_prev_btn_auto_pushed_get
|
|
|
|
*/
|
|
|
|
#define elm_obj_naviframe_prev_btn_auto_pushed_get(ret) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_PREV_BTN_AUTO_PUSHED_GET), EO_TYPECHECK(Eina_Bool *, ret)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def elm_obj_naviframe_items_get
|
|
|
|
* @since 1.8
|
|
|
|
*
|
|
|
|
* @brief Get a list of all the naviframe items.
|
|
|
|
*
|
|
|
|
* @param[out] ret
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_items_get
|
|
|
|
*/
|
|
|
|
#define elm_obj_naviframe_items_get(ret) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_ITEMS_GET), EO_TYPECHECK(Eina_List **, ret)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def elm_obj_naviframe_event_enabled_set
|
|
|
|
* @since 1.8
|
|
|
|
*
|
|
|
|
* @brief Set the event enabled when pushing/popping items
|
|
|
|
*
|
|
|
|
* @param[in] enabled
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_event_enabled_set
|
|
|
|
*/
|
|
|
|
#define elm_obj_naviframe_event_enabled_set(enabled) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_EVENT_ENABLED_SET), EO_TYPECHECK(Eina_Bool, enabled)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def elm_obj_naviframe_event_enabled_get
|
|
|
|
* @since 1.8
|
|
|
|
*
|
|
|
|
* @brief Get the value of event enabled status.
|
|
|
|
*
|
|
|
|
* @param[out] ret
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_event_enabled_get
|
|
|
|
*/
|
|
|
|
#define elm_obj_naviframe_event_enabled_get(ret) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_EVENT_ENABLED_GET), EO_TYPECHECK(Eina_Bool *, ret)
|
|
|
|
|
2013-03-07 04:28:03 -08:00
|
|
|
/**
|
|
|
|
* @typedef Elm_Naviframe_Item_Pop_Cb
|
|
|
|
*
|
|
|
|
* Pop callback called when @c it is going to be popped. @c data is user
|
2013-03-22 03:04:12 -07:00
|
|
|
* specific data. If it returns the @c EINA_FALSE in the callback, item popping
|
|
|
|
* will be cancelled.
|
2013-03-07 04:28:03 -08:00
|
|
|
*
|
|
|
|
* @see elm_naviframe_item_pop_cb_set()
|
|
|
|
*
|
|
|
|
* @since 1.8
|
|
|
|
*/
|
2013-03-22 03:04:12 -07:00
|
|
|
typedef Eina_Bool (*Elm_Naviframe_Item_Pop_Cb)(void *data, Elm_Object_Item *it);
|
2013-03-07 04:28:03 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @addtogroup Naviframe
|
|
|
|
* @{
|
|
|
|
*/
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Add a new Naviframe object to the parent.
|
|
|
|
*
|
|
|
|
* @param parent Parent object
|
|
|
|
* @return New object or @c NULL, if it cannot be created
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI Evas_Object *elm_naviframe_add(Evas_Object *parent);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Push a new item to the top of the naviframe stack (and show it).
|
|
|
|
*
|
|
|
|
* @param obj The naviframe object
|
|
|
|
* @param title_label The label in the title area. The name of the title
|
|
|
|
* label part is "elm.text.title"
|
|
|
|
* @param prev_btn The button to go to the previous item. If it is NULL,
|
|
|
|
* then naviframe will create a back button automatically. The name of
|
|
|
|
* the prev_btn part is "elm.swallow.prev_btn"
|
|
|
|
* @param next_btn The button to go to the next item. Or It could be just an
|
|
|
|
* extra function button. The name of the next_btn part is
|
|
|
|
* "elm.swallow.next_btn"
|
|
|
|
* @param content The main content object. The name of content part is
|
|
|
|
* "elm.swallow.content"
|
|
|
|
* @param item_style The current item style name. @c NULL would be default.
|
|
|
|
* @return The created item or @c NULL upon failure.
|
|
|
|
*
|
|
|
|
* The item pushed becomes one page of the naviframe, this item will be
|
|
|
|
* deleted when it is popped.
|
|
|
|
*
|
|
|
|
* @see also elm_naviframe_item_style_set()
|
|
|
|
* @see also elm_naviframe_item_insert_before()
|
|
|
|
* @see also elm_naviframe_item_insert_after()
|
|
|
|
*
|
|
|
|
* The following styles are available for this item:
|
|
|
|
* @li @c "default"
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI Elm_Object_Item *elm_naviframe_item_push(Evas_Object *obj, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Insert a new item into the naviframe before item @p before.
|
|
|
|
*
|
2012-03-07 08:52:22 -08:00
|
|
|
* @param obj The naviframe object
|
2011-12-29 23:20:48 -08:00
|
|
|
* @param before The naviframe item to insert before.
|
|
|
|
* @param title_label The label in the title area. The name of the title
|
|
|
|
* label part is "elm.text.title"
|
|
|
|
* @param prev_btn The button to go to the previous item. If it is NULL,
|
|
|
|
* then naviframe will create a back button automatically. The name of
|
|
|
|
* the prev_btn part is "elm.swallow.prev_btn"
|
|
|
|
* @param next_btn The button to go to the next item. Or It could be just an
|
|
|
|
* extra function button. The name of the next_btn part is
|
|
|
|
* "elm.swallow.next_btn"
|
|
|
|
* @param content The main content object. The name of content part is
|
|
|
|
* "elm.swallow.content"
|
|
|
|
* @param item_style The current item style name. @c NULL would be default.
|
|
|
|
* @return The created item or @c NULL upon failure.
|
|
|
|
*
|
|
|
|
* The item is inserted into the naviframe straight away without any
|
|
|
|
* transition operations. This item will be deleted when it is popped.
|
|
|
|
*
|
|
|
|
* @see also elm_naviframe_item_style_set()
|
|
|
|
* @see also elm_naviframe_item_push()
|
|
|
|
* @see also elm_naviframe_item_insert_after()
|
|
|
|
*
|
|
|
|
* The following styles are available for this item:
|
|
|
|
* @li @c "default"
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2012-03-07 08:52:22 -08:00
|
|
|
EAPI Elm_Object_Item *elm_naviframe_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Insert a new item into the naviframe after item @p after.
|
|
|
|
*
|
2012-03-07 08:52:22 -08:00
|
|
|
* @param obj The naviframe object
|
2011-12-29 23:20:48 -08:00
|
|
|
* @param after The naviframe item to insert after.
|
|
|
|
* @param title_label The label in the title area. The name of the title
|
|
|
|
* label part is "elm.text.title"
|
|
|
|
* @param prev_btn The button to go to the previous item. If it is NULL,
|
|
|
|
* then naviframe will create a back button automatically. The name of
|
|
|
|
* the prev_btn part is "elm.swallow.prev_btn"
|
|
|
|
* @param next_btn The button to go to the next item. Or It could be just an
|
|
|
|
* extra function button. The name of the next_btn part is
|
|
|
|
* "elm.swallow.next_btn"
|
|
|
|
* @param content The main content object. The name of content part is
|
|
|
|
* "elm.swallow.content"
|
|
|
|
* @param item_style The current item style name. @c NULL would be default.
|
|
|
|
* @return The created item or @c NULL upon failure.
|
|
|
|
*
|
|
|
|
* The item is inserted into the naviframe straight away without any
|
|
|
|
* transition operations. This item will be deleted when it is popped.
|
|
|
|
*
|
|
|
|
* @see also elm_naviframe_item_style_set()
|
|
|
|
* @see also elm_naviframe_item_push()
|
|
|
|
* @see also elm_naviframe_item_insert_before()
|
|
|
|
*
|
|
|
|
* The following styles are available for this item:
|
|
|
|
* @li @c "default"
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2012-03-07 08:52:22 -08:00
|
|
|
EAPI Elm_Object_Item *elm_naviframe_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Pop an item that is on top of the stack
|
|
|
|
*
|
|
|
|
* @param obj The naviframe object
|
|
|
|
* @return @c NULL or the content object(if the
|
|
|
|
* elm_naviframe_content_preserve_on_pop_get is true).
|
|
|
|
*
|
|
|
|
* This pops an item that is on the top(visible) of the naviframe, makes it
|
|
|
|
* disappear, then deletes the item. The item that was underneath it on the
|
|
|
|
* stack will become visible.
|
|
|
|
*
|
|
|
|
* @see also elm_naviframe_content_preserve_on_pop_get()
|
2013-03-07 04:28:03 -08:00
|
|
|
* @see also elm_naviframe_item_pop_cb_set()
|
2011-12-29 23:20:48 -08:00
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI Evas_Object *elm_naviframe_item_pop(Evas_Object *obj);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Pop the items between the top and the above one on the given item.
|
|
|
|
*
|
|
|
|
* @param it The naviframe item
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI void elm_naviframe_item_pop_to(Elm_Object_Item *it);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI void elm_naviframe_item_promote(Elm_Object_Item *it);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief preserve the content objects when items are popped.
|
|
|
|
*
|
|
|
|
* @param obj The naviframe object
|
|
|
|
* @param preserve Enable the preserve mode if EINA_TRUE, disable otherwise
|
|
|
|
*
|
|
|
|
* @see also elm_naviframe_content_preserve_on_pop_get()
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI void elm_naviframe_content_preserve_on_pop_set(Evas_Object *obj, Eina_Bool preserve);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Get a value whether preserve mode is enabled or not.
|
|
|
|
*
|
|
|
|
* @param obj The naviframe object
|
|
|
|
* @return If @c EINA_TRUE, preserve mode is enabled
|
|
|
|
*
|
|
|
|
* @see also elm_naviframe_content_preserve_on_pop_set()
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI Eina_Bool elm_naviframe_content_preserve_on_pop_get(const Evas_Object *obj);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Get a top item on the naviframe stack
|
|
|
|
*
|
|
|
|
* @param obj The naviframe object
|
|
|
|
* @return The top item on the naviframe stack or @c NULL, if the stack is
|
|
|
|
* empty
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI Elm_Object_Item *elm_naviframe_top_item_get(const Evas_Object *obj);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Get a bottom item on the naviframe stack
|
|
|
|
*
|
|
|
|
* @param obj The naviframe object
|
|
|
|
* @return The bottom item on the naviframe stack or @c NULL, if the stack is
|
|
|
|
* empty
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI Elm_Object_Item *elm_naviframe_bottom_item_get(const Evas_Object *obj);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Set an item style
|
|
|
|
*
|
2011-12-29 23:41:47 -08:00
|
|
|
* @param it The naviframe item
|
2011-12-29 23:20:48 -08:00
|
|
|
* @param item_style The current item style name. @c NULL would be default
|
|
|
|
*
|
|
|
|
* The following styles are available for this item:
|
|
|
|
* @li @c "default"
|
|
|
|
*
|
|
|
|
* @see also elm_naviframe_item_style_get()
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI void elm_naviframe_item_style_set(Elm_Object_Item *it, const char *item_style);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Get an item style
|
|
|
|
*
|
2011-12-29 23:41:47 -08:00
|
|
|
* @param it The naviframe item
|
2011-12-29 23:20:48 -08:00
|
|
|
* @return The current item style name
|
|
|
|
*
|
|
|
|
* @see also elm_naviframe_item_style_set()
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI const char *elm_naviframe_item_style_get(const Elm_Object_Item *it);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Show/Hide the title area
|
|
|
|
*
|
|
|
|
* @param it The naviframe item
|
|
|
|
* @param visible If @c EINA_TRUE, title area will be visible, hidden
|
|
|
|
* otherwise
|
|
|
|
*
|
|
|
|
* When the title area is invisible, then the controls would be hidden so as * to expand the content area to full-size.
|
|
|
|
*
|
|
|
|
* @see also elm_naviframe_item_title_visible_get()
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI void elm_naviframe_item_title_visible_set(Elm_Object_Item *it, Eina_Bool visible);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Get a value whether title area is visible or not.
|
|
|
|
*
|
|
|
|
* @param it The naviframe item
|
|
|
|
* @return If @c EINA_TRUE, title area is visible
|
|
|
|
*
|
|
|
|
* @see also elm_naviframe_item_title_visible_set()
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI Eina_Bool elm_naviframe_item_title_visible_get(const Elm_Object_Item *it);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2013-03-07 04:28:03 -08:00
|
|
|
/**
|
|
|
|
* @brief Set a function to be called when @c it of the naviframe is going to be
|
|
|
|
* popped.
|
|
|
|
*
|
|
|
|
* @param it The item to set the callback on
|
|
|
|
* @param func the callback function.
|
|
|
|
*
|
|
|
|
* @warning Don't set "clicked" callback to the prev button additionally if the
|
|
|
|
* function does a exact same logic with this @c func. When hardware back key is
|
|
|
|
* pressed then both callbacks will be called.
|
|
|
|
*
|
|
|
|
* @since 1.8
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
|
|
|
EAPI void elm_naviframe_item_pop_cb_set(Elm_Object_Item *it, Elm_Naviframe_Item_Pop_Cb func, void *data);
|
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @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()
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI void elm_naviframe_prev_btn_auto_pushed_set(Evas_Object *obj, Eina_Bool auto_pushed);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @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()
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI Eina_Bool elm_naviframe_prev_btn_auto_pushed_get(const Evas_Object *obj);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Get a list of all the naviframe items.
|
|
|
|
*
|
|
|
|
* @param obj The naviframe object
|
2012-02-15 08:27:34 -08:00
|
|
|
* @return An Eina_List of naviframe items, #Elm_Object_Item,
|
2011-12-29 23:20:48 -08:00
|
|
|
* or @c NULL on failure.
|
2012-03-04 16:22:54 -08:00
|
|
|
* @note The returned list MUST be freed.
|
2011-12-29 23:20:48 -08:00
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2012-02-15 08:27:34 -08:00
|
|
|
EAPI Eina_List *elm_naviframe_items_get(const Evas_Object *obj) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Set the event enabled when pushing/popping items
|
|
|
|
*
|
|
|
|
* If @c enabled is EINA_TRUE, the contents of the naviframe item will
|
|
|
|
* receives events from mouse and keyboard during view changing such as
|
|
|
|
* item push/pop.
|
|
|
|
*
|
|
|
|
* @param obj The naviframe object
|
|
|
|
* @param enabled Events are received when enabled is @c EINA_TRUE, and
|
|
|
|
* ignored otherwise.
|
|
|
|
*
|
|
|
|
* @warning Events will be blocked by calling evas_object_freeze_events_set()
|
|
|
|
* internally. So don't call the API whiling pushing/popping items.
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_event_enabled_get()
|
|
|
|
* @see evas_object_freeze_events_set()
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI void elm_naviframe_event_enabled_set(Evas_Object *obj, Eina_Bool enabled);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @brief Get the value of event enabled status.
|
|
|
|
*
|
|
|
|
* @param obj The naviframe object
|
|
|
|
* @return EINA_TRUE, when event is enabled
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_event_enabled_set()
|
|
|
|
*
|
|
|
|
* @ingroup Naviframe
|
|
|
|
*/
|
2011-12-30 01:48:46 -08:00
|
|
|
EAPI Eina_Bool elm_naviframe_event_enabled_get(const Evas_Object *obj);
|
2011-12-29 22:49:28 -08:00
|
|
|
|
2012-02-16 01:26:30 -08:00
|
|
|
/**
|
|
|
|
* @brief Simple version of item_push.
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_item_push
|
|
|
|
*/
|
2012-02-16 13:20:45 -08:00
|
|
|
static inline Elm_Object_Item *
|
|
|
|
elm_naviframe_item_simple_push(Evas_Object *obj, Evas_Object *content)
|
|
|
|
{
|
|
|
|
Elm_Object_Item *it;
|
|
|
|
it = elm_naviframe_item_push(obj, NULL, NULL, NULL, content, NULL);
|
|
|
|
elm_naviframe_item_title_visible_set(it, EINA_FALSE);
|
|
|
|
return it;
|
2012-02-16 01:26:30 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Simple version of item_promote.
|
|
|
|
*
|
|
|
|
* @see elm_naviframe_item_promote
|
|
|
|
*/
|
|
|
|
EAPI void elm_naviframe_item_simple_promote(Evas_Object *obj, Evas_Object *content);
|
|
|
|
|
2011-12-29 23:20:48 -08:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|