2 * @defgroup Naviframe Naviframe
5 * @brief Naviframe is a kind of view manager for the applications.
7 * Naviframe provides functions to switch different pages with stack
8 * mechanism. It means if one page(item) needs to be changed to the new one,
9 * then naviframe would push the new page to it's internal stack. Of course,
10 * it can be back to the previous page by popping the top page. Naviframe
11 * provides some transition effect while the pages are switching (same as
14 * Since each item could keep the different styles, users could keep the
15 * same look & feel for the pages or different styles for the items in it's
18 * Signals that you can add callback for are:
19 * @li "transition,finished" - When the transition is finished in changing
21 * @li "title,clicked" - User clicked title area
23 * Default contents parts of the naviframe items that you can use for are:
24 * @li "default" - A main content of the page
25 * @li "icon" - An icon in the title area
26 * @li "prev_btn" - A button to go to the previous page
27 * @li "next_btn" - A button to go to the next page
29 * Default text parts of the naviframe items that you can use for are:
30 * @li "default" - Title label in the title area
31 * @li "subtitle" - Sub-title label in the title area
33 * Supported elm_object common APIs.
34 * @li elm_object_signal_emit
36 * Supported elm_object_item common APIs.
37 * @li elm_object_item_part_text_set
38 * @li elm_object_item_part_text_get
39 * @li elm_object_item_part_content_set
40 * @li elm_object_item_part_content_get
41 * @li elm_object_item_part_content_unset
42 * @li elm_object_item_signal_emit
46 * @addtogroup Naviframe
51 * @brief Add a new Naviframe object to the parent.
53 * @param parent Parent object
54 * @return New object or @c NULL, if it cannot be created
58 EAPI Evas_Object *elm_naviframe_add(Evas_Object *parent);
61 * @brief Push a new item to the top of the naviframe stack (and show it).
63 * @param obj The naviframe object
64 * @param title_label The label in the title area. The name of the title
65 * label part is "elm.text.title"
66 * @param prev_btn The button to go to the previous item. If it is NULL,
67 * then naviframe will create a back button automatically. The name of
68 * the prev_btn part is "elm.swallow.prev_btn"
69 * @param next_btn The button to go to the next item. Or It could be just an
70 * extra function button. The name of the next_btn part is
71 * "elm.swallow.next_btn"
72 * @param content The main content object. The name of content part is
73 * "elm.swallow.content"
74 * @param item_style The current item style name. @c NULL would be default.
75 * @return The created item or @c NULL upon failure.
77 * The item pushed becomes one page of the naviframe, this item will be
78 * deleted when it is popped.
80 * @see also elm_naviframe_item_style_set()
81 * @see also elm_naviframe_item_insert_before()
82 * @see also elm_naviframe_item_insert_after()
84 * The following styles are available for this item:
89 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);
92 * @brief Insert a new item into the naviframe before item @p before.
94 * @param before The naviframe item to insert before.
95 * @param title_label The label in the title area. The name of the title
96 * label part is "elm.text.title"
97 * @param prev_btn The button to go to the previous item. If it is NULL,
98 * then naviframe will create a back button automatically. The name of
99 * the prev_btn part is "elm.swallow.prev_btn"
100 * @param next_btn The button to go to the next item. Or It could be just an
101 * extra function button. The name of the next_btn part is
102 * "elm.swallow.next_btn"
103 * @param content The main content object. The name of content part is
104 * "elm.swallow.content"
105 * @param item_style The current item style name. @c NULL would be default.
106 * @return The created item or @c NULL upon failure.
108 * The item is inserted into the naviframe straight away without any
109 * transition operations. This item will be deleted when it is popped.
111 * @see also elm_naviframe_item_style_set()
112 * @see also elm_naviframe_item_push()
113 * @see also elm_naviframe_item_insert_after()
115 * The following styles are available for this item:
120 EAPI Elm_Object_Item *elm_naviframe_item_insert_before(Elm_Object_Item *before, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style);
123 * @brief Insert a new item into the naviframe after item @p after.
125 * @param after The naviframe item to insert after.
126 * @param title_label The label in the title area. The name of the title
127 * label part is "elm.text.title"
128 * @param prev_btn The button to go to the previous item. If it is NULL,
129 * then naviframe will create a back button automatically. The name of
130 * the prev_btn part is "elm.swallow.prev_btn"
131 * @param next_btn The button to go to the next item. Or It could be just an
132 * extra function button. The name of the next_btn part is
133 * "elm.swallow.next_btn"
134 * @param content The main content object. The name of content part is
135 * "elm.swallow.content"
136 * @param item_style The current item style name. @c NULL would be default.
137 * @return The created item or @c NULL upon failure.
139 * The item is inserted into the naviframe straight away without any
140 * transition operations. This item will be deleted when it is popped.
142 * @see also elm_naviframe_item_style_set()
143 * @see also elm_naviframe_item_push()
144 * @see also elm_naviframe_item_insert_before()
146 * The following styles are available for this item:
151 EAPI Elm_Object_Item *elm_naviframe_item_insert_after(Elm_Object_Item *after, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style);
154 * @brief Pop an item that is on top of the stack
156 * @param obj The naviframe object
157 * @return @c NULL or the content object(if the
158 * elm_naviframe_content_preserve_on_pop_get is true).
160 * This pops an item that is on the top(visible) of the naviframe, makes it
161 * disappear, then deletes the item. The item that was underneath it on the
162 * stack will become visible.
164 * @see also elm_naviframe_content_preserve_on_pop_get()
168 EAPI Evas_Object *elm_naviframe_item_pop(Evas_Object *obj);
171 * @brief Pop the items between the top and the above one on the given item.
173 * @param it The naviframe item
177 EAPI void elm_naviframe_item_pop_to(Elm_Object_Item *it);
180 * Promote an item already in the naviframe stack to the top of the stack
182 * @param it The naviframe item
184 * This will take the indicated item and promote it to the top of the stack
185 * as if it had been pushed there. The item must already be inside the
186 * naviframe stack to work.
189 EAPI void elm_naviframe_item_promote(Elm_Object_Item *it);
192 * @brief preserve the content objects when items are popped.
194 * @param obj The naviframe object
195 * @param preserve Enable the preserve mode if EINA_TRUE, disable otherwise
197 * @see also elm_naviframe_content_preserve_on_pop_get()
201 EAPI void elm_naviframe_content_preserve_on_pop_set(Evas_Object *obj, Eina_Bool preserve);
204 * @brief Get a value whether preserve mode is enabled or not.
206 * @param obj The naviframe object
207 * @return If @c EINA_TRUE, preserve mode is enabled
209 * @see also elm_naviframe_content_preserve_on_pop_set()
213 EAPI Eina_Bool elm_naviframe_content_preserve_on_pop_get(const Evas_Object *obj);
216 * @brief Get a top item on the naviframe stack
218 * @param obj The naviframe object
219 * @return The top item on the naviframe stack or @c NULL, if the stack is
224 EAPI Elm_Object_Item *elm_naviframe_top_item_get(const Evas_Object *obj);
227 * @brief Get a bottom item on the naviframe stack
229 * @param obj The naviframe object
230 * @return The bottom item on the naviframe stack or @c NULL, if the stack is
235 EAPI Elm_Object_Item *elm_naviframe_bottom_item_get(const Evas_Object *obj);
238 * @brief Set an item style
240 * @param it The naviframe item
241 * @param item_style The current item style name. @c NULL would be default
243 * The following styles are available for this item:
246 * @see also elm_naviframe_item_style_get()
250 EAPI void elm_naviframe_item_style_set(Elm_Object_Item *it, const char *item_style);
253 * @brief Get an item style
255 * @param it The naviframe item
256 * @return The current item style name
258 * @see also elm_naviframe_item_style_set()
262 EAPI const char *elm_naviframe_item_style_get(const Elm_Object_Item *it);
265 * @brief Show/Hide the title area
267 * @param it The naviframe item
268 * @param visible If @c EINA_TRUE, title area will be visible, hidden
271 * When the title area is invisible, then the controls would be hidden so as * to expand the content area to full-size.
273 * @see also elm_naviframe_item_title_visible_get()
277 EAPI void elm_naviframe_item_title_visible_set(Elm_Object_Item *it, Eina_Bool visible);
280 * @brief Get a value whether title area is visible or not.
282 * @param it The naviframe item
283 * @return If @c EINA_TRUE, title area is visible
285 * @see also elm_naviframe_item_title_visible_set()
289 EAPI Eina_Bool elm_naviframe_item_title_visible_get(const Elm_Object_Item *it);
292 * @brief Set creating prev button automatically or not
294 * @param obj The naviframe object
295 * @param auto_pushed If @c EINA_TRUE, the previous button(back button) will
296 * be created internally when you pass the @c NULL to the prev_btn
297 * parameter in elm_naviframe_item_push
299 * @see also elm_naviframe_item_push()
303 EAPI void elm_naviframe_prev_btn_auto_pushed_set(Evas_Object *obj, Eina_Bool auto_pushed);
306 * @brief Get a value whether prev button(back button) will be auto pushed or
309 * @param obj The naviframe object
310 * @return If @c EINA_TRUE, prev button will be auto pushed.
312 * @see also elm_naviframe_item_push()
313 * elm_naviframe_prev_btn_auto_pushed_set()
317 EAPI Eina_Bool elm_naviframe_prev_btn_auto_pushed_get(const Evas_Object *obj);
320 * @brief Get a list of all the naviframe items.
322 * @param obj The naviframe object
323 * @return An Eina_Inlist* of naviframe items, #Elm_Object_Item,
324 * or @c NULL on failure.
328 EAPI Eina_Inlist *elm_naviframe_items_get(const Evas_Object *obj);
331 * @brief Set the event enabled when pushing/popping items
333 * If @c enabled is EINA_TRUE, the contents of the naviframe item will
334 * receives events from mouse and keyboard during view changing such as
337 * @param obj The naviframe object
338 * @param enabled Events are received when enabled is @c EINA_TRUE, and
341 * @warning Events will be blocked by calling evas_object_freeze_events_set()
342 * internally. So don't call the API whiling pushing/popping items.
344 * @see elm_naviframe_event_enabled_get()
345 * @see evas_object_freeze_events_set()
349 EAPI void elm_naviframe_event_enabled_set(Evas_Object *obj, Eina_Bool enabled);
352 * @brief Get the value of event enabled status.
354 * @param obj The naviframe object
355 * @return EINA_TRUE, when event is enabled
357 * @see elm_naviframe_event_enabled_set()
361 EAPI Eina_Bool elm_naviframe_event_enabled_get(const Evas_Object *obj);