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 #define ELM_NAVIFRAME_ITEM_CONTENT "elm.swallow.content"
47 #define ELM_NAVIFRAME_ITEM_ICON "elm.swallow.icon"
48 #define ELM_NAVIFRAME_ITEM_OPTIONHEADER "elm.swallow.optionheader"
49 #define ELM_NAVIFRAME_ITEM_TITLE_LABEL "elm.text.title"
50 #define ELM_NAVIFRAME_ITEM_PREV_BTN "elm.swallow.prev_btn"
51 #define ELM_NAVIFRAME_ITEM_TITLE_LEFT_BTN "elm.swallow.left_btn"
52 #define ELM_NAVIFRAME_ITEM_TITLE_RIGHT_BTN "elm.swallow.right_btn"
53 #define ELM_NAVIFRAME_ITEM_TITLE_MORE_BTN "elm.swallow.more_btn"
54 #define ELM_NAVIFRAME_ITEM_CONTROLBAR "elm.swallow.controlbar"
55 #define ELM_NAVIFRAME_ITEM_SIGNAL_OPTIONHEADER_CLOSE "elm,state,optionheader,close", ""
56 #define ELM_NAVIFRAME_ITEM_SIGNAL_OPTIONHEADER_OPEN "elm,state,optionheader,open", ""
57 #define ELM_NAVIFRAME_ITEM_SIGNAL_OPTIONHEADER_INSTANT_CLOSE "elm,state,optionheader,instant_close", ""
58 #define ELM_NAVIFRAME_ITEM_SIGNAL_OPTIONHEADER_INSTANT_OPEN "elm,state,optionheader,instant_open", ""
59 #define ELM_NAVIFRAME_ITEM_SIGNAL_CONTROLBAR_CLOSE "elm,state,controlbar,close", ""
60 #define ELM_NAVIFRAME_ITEM_SIGNAL_CONTROLBAR_OPEN "elm,state,controlbar,open", ""
61 #define ELM_NAVIFRAME_ITEM_SIGNAL_CONTROLBAR_INSTANT_CLOSE "elm,state,controlbar,instant_close", ""
62 #define ELM_NAVIFRAME_ITEM_SIGNAL_CONTROLBAR_INSTANT_OPEN "elm,state,controlbar,instant_open", ""
64 //Available only in a style - "2line"
65 #define ELM_NAVIFRAME_ITEM_OPTIONHEADER2 "elm.swallow.optionheader2"
67 //Available only in a style - "segment"
68 #define ELM_NAVIFRAME_ITEM_SEGMENT2 "elm.swallow.segment2"
69 #define ELM_NAVIFRAME_ITEM_SEGMENT3 "elm.swallow.segment3"
72 * @addtogroup Naviframe
77 * @brief Add a new Naviframe object to the parent.
79 * @param parent Parent object
80 * @return New object or @c NULL, if it cannot be created
84 EAPI Evas_Object *elm_naviframe_add(Evas_Object *parent);
87 * @brief Push a new item to the top of the naviframe stack (and show it).
89 * @param obj The naviframe object
90 * @param title_label The label in the title area. The name of the title
91 * label part is "elm.text.title"
92 * @param prev_btn The button to go to the previous item. If it is NULL,
93 * then naviframe will create a back button automatically. The name of
94 * the prev_btn part is "elm.swallow.prev_btn"
95 * @param next_btn The button to go to the next item. Or It could be just an
96 * extra function button. The name of the next_btn part is
97 * "elm.swallow.next_btn"
98 * @param content The main content object. The name of content part is
99 * "elm.swallow.content"
100 * @param item_style The current item style name. @c NULL would be default.
101 * @return The created item or @c NULL upon failure.
103 * The item pushed becomes one page of the naviframe, this item will be
104 * deleted when it is popped.
106 * @see also elm_naviframe_item_style_set()
107 * @see also elm_naviframe_item_insert_before()
108 * @see also elm_naviframe_item_insert_after()
110 * The following styles are available for this item:
115 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);
118 * @brief Insert a new item into the naviframe before item @p before.
120 * @param before The naviframe item to insert before.
121 * @param title_label The label in the title area. The name of the title
122 * label part is "elm.text.title"
123 * @param prev_btn The button to go to the previous item. If it is NULL,
124 * then naviframe will create a back button automatically. The name of
125 * the prev_btn part is "elm.swallow.prev_btn"
126 * @param next_btn The button to go to the next item. Or It could be just an
127 * extra function button. The name of the next_btn part is
128 * "elm.swallow.next_btn"
129 * @param content The main content object. The name of content part is
130 * "elm.swallow.content"
131 * @param item_style The current item style name. @c NULL would be default.
132 * @return The created item or @c NULL upon failure.
134 * The item is inserted into the naviframe straight away without any
135 * transition operations. This item will be deleted when it is popped.
137 * @see also elm_naviframe_item_style_set()
138 * @see also elm_naviframe_item_push()
139 * @see also elm_naviframe_item_insert_after()
141 * The following styles are available for this item:
146 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);
149 * @brief Insert a new item into the naviframe after item @p after.
151 * @param after The naviframe item to insert after.
152 * @param title_label The label in the title area. The name of the title
153 * label part is "elm.text.title"
154 * @param prev_btn The button to go to the previous item. If it is NULL,
155 * then naviframe will create a back button automatically. The name of
156 * the prev_btn part is "elm.swallow.prev_btn"
157 * @param next_btn The button to go to the next item. Or It could be just an
158 * extra function button. The name of the next_btn part is
159 * "elm.swallow.next_btn"
160 * @param content The main content object. The name of content part is
161 * "elm.swallow.content"
162 * @param item_style The current item style name. @c NULL would be default.
163 * @return The created item or @c NULL upon failure.
165 * The item is inserted into the naviframe straight away without any
166 * transition operations. This item will be deleted when it is popped.
168 * @see also elm_naviframe_item_style_set()
169 * @see also elm_naviframe_item_push()
170 * @see also elm_naviframe_item_insert_before()
172 * The following styles are available for this item:
177 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);
180 * @brief Pop an item that is on top of the stack
182 * @param obj The naviframe object
183 * @return @c NULL or the content object(if the
184 * elm_naviframe_content_preserve_on_pop_get is true).
186 * This pops an item that is on the top(visible) of the naviframe, makes it
187 * disappear, then deletes the item. The item that was underneath it on the
188 * stack will become visible.
190 * @see also elm_naviframe_content_preserve_on_pop_get()
194 EAPI Evas_Object *elm_naviframe_item_pop(Evas_Object *obj);
197 * @brief Pop the items between the top and the above one on the given item.
199 * @param it The naviframe item
203 EAPI void elm_naviframe_item_pop_to(Elm_Object_Item *it);
206 * Promote an item already in the naviframe stack to the top of the stack
208 * @param it The naviframe item
210 * This will take the indicated item and promote it to the top of the stack
211 * as if it had been pushed there. The item must already be inside the
212 * naviframe stack to work.
215 EAPI void elm_naviframe_item_promote(Elm_Object_Item *it);
218 * @brief preserve the content objects when items are popped.
220 * @param obj The naviframe object
221 * @param preserve Enable the preserve mode if EINA_TRUE, disable otherwise
223 * @see also elm_naviframe_content_preserve_on_pop_get()
227 EAPI void elm_naviframe_content_preserve_on_pop_set(Evas_Object *obj, Eina_Bool preserve);
230 * @brief Get a value whether preserve mode is enabled or not.
232 * @param obj The naviframe object
233 * @return If @c EINA_TRUE, preserve mode is enabled
235 * @see also elm_naviframe_content_preserve_on_pop_set()
239 EAPI Eina_Bool elm_naviframe_content_preserve_on_pop_get(const Evas_Object *obj);
242 * @brief Get a top item on the naviframe stack
244 * @param obj The naviframe object
245 * @return The top item on the naviframe stack or @c NULL, if the stack is
250 EAPI Elm_Object_Item *elm_naviframe_top_item_get(const Evas_Object *obj);
253 * @brief Get a bottom item on the naviframe stack
255 * @param obj The naviframe object
256 * @return The bottom item on the naviframe stack or @c NULL, if the stack is
261 EAPI Elm_Object_Item *elm_naviframe_bottom_item_get(const Evas_Object *obj);
264 * @brief Set an item style
266 * @param it The naviframe item
267 * @param item_style The current item style name. @c NULL would be default
269 * The following styles are available for this item:
272 * @see also elm_naviframe_item_style_get()
276 EAPI void elm_naviframe_item_style_set(Elm_Object_Item *it, const char *item_style);
279 * @brief Get an item style
281 * @param it The naviframe item
282 * @return The current item style name
284 * @see also elm_naviframe_item_style_set()
288 EAPI const char *elm_naviframe_item_style_get(const Elm_Object_Item *it);
291 * @brief Show/Hide the title area
293 * @param it The naviframe item
294 * @param visible If @c EINA_TRUE, title area will be visible, hidden
297 * When the title area is invisible, then the controls would be hidden so as * to expand the content area to full-size.
299 * @see also elm_naviframe_item_title_visible_get()
303 EAPI void elm_naviframe_item_title_visible_set(Elm_Object_Item *it, Eina_Bool visible);
306 * @brief Get a value whether title area is visible or not.
308 * @param it The naviframe item
309 * @return If @c EINA_TRUE, title area is visible
311 * @see also elm_naviframe_item_title_visible_set()
315 EAPI Eina_Bool elm_naviframe_item_title_visible_get(const Elm_Object_Item *it);
318 * @brief Set creating prev button automatically or not
320 * @param obj The naviframe object
321 * @param auto_pushed If @c EINA_TRUE, the previous button(back button) will
322 * be created internally when you pass the @c NULL to the prev_btn
323 * parameter in elm_naviframe_item_push
325 * @see also elm_naviframe_item_push()
329 EAPI void elm_naviframe_prev_btn_auto_pushed_set(Evas_Object *obj, Eina_Bool auto_pushed);
332 * @brief Get a value whether prev button(back button) will be auto pushed or
335 * @param obj The naviframe object
336 * @return If @c EINA_TRUE, prev button will be auto pushed.
338 * @see also elm_naviframe_item_push()
339 * elm_naviframe_prev_btn_auto_pushed_set()
343 EAPI Eina_Bool elm_naviframe_prev_btn_auto_pushed_get(const Evas_Object *obj);
346 * @brief Get a list of all the naviframe items.
348 * @param obj The naviframe object
349 * @return An Eina_Inlist* of naviframe items, #Elm_Object_Item,
350 * or @c NULL on failure.
354 EAPI Eina_Inlist *elm_naviframe_items_get(const Evas_Object *obj);
357 * @brief Set the event enabled when pushing/popping items
359 * If @c enabled is EINA_TRUE, the contents of the naviframe item will
360 * receives events from mouse and keyboard during view changing such as
363 * @param obj The naviframe object
364 * @param enabled Events are received when enabled is @c EINA_TRUE, and
367 * @warning Events will be blocked by calling evas_object_freeze_events_set()
368 * internally. So don't call the API whiling pushing/popping items.
370 * @see elm_naviframe_event_enabled_get()
371 * @see evas_object_freeze_events_set()
375 EAPI void elm_naviframe_event_enabled_set(Evas_Object *obj, Eina_Bool enabled);
378 * @brief Get the value of event enabled status.
380 * @param obj The naviframe object
381 * @return EINA_TRUE, when event is enabled
383 * @see elm_naviframe_event_enabled_set()
387 EAPI Eina_Bool elm_naviframe_event_enabled_get(const Evas_Object *obj);