Tizen Native API  5.0
Naviframe

Naviframe stands for navigation frame. It's a views manager for applications.

naviframe_inheritance_tree.png

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. Due to the characteristics of a stack, even though you push a new item, previous item is not deleted. Previous item will be shown when you pop new item. The transition between views is animated, depending on the theme applied to the widget.

Naviframe views hold spaces to various elements, which are:

One can use elm_object_item_part_content_set, elm_object_item_part_content_get, elm_object_item_part_content_unset functions to handle the contents. The swallow part name should be one of these:

One can use elm_object_item_part_text_set, elm_object_item_part_text_get to handle the text parts. The swallow part name should be one of these:

Most of those content objects can be passed at the time of an item creation (see elm_naviframe_item_push()).

Naviframe items can have different styles, which affect the transition between views, for example. On the default theme, two of them are supported:

This widget emits the following signals, besides the ones sent from Elm_Layout:

All the parts, for content and text, described here will also be reachable by naviframe items direct calls:

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.

Functions

Evas_Objectelm_naviframe_add (Evas_Object *parent)
 Add a new Naviframe object to the parent.
void elm_naviframe_event_enabled_set (Elm_Naviframe *obj, Eina_Bool enabled)
 Control the event enabled when pushing/popping items.
Eina_Bool elm_naviframe_event_enabled_get (const Elm_Naviframe *obj)
 Control the event enabled when pushing/popping items.
void elm_naviframe_content_preserve_on_pop_set (Elm_Naviframe *obj, Eina_Bool preserve)
 Preserve the content objects when items are popped.
Eina_Bool elm_naviframe_content_preserve_on_pop_get (const Elm_Naviframe *obj)
 Preserve the content objects when items are popped.
void elm_naviframe_prev_btn_auto_pushed_set (Elm_Naviframe *obj, Eina_Bool auto_pushed)
 Control if creating prev button automatically or not.
Eina_Bool elm_naviframe_prev_btn_auto_pushed_get (const Elm_Naviframe *obj)
 Control if creating prev button automatically or not.
Eina_Listelm_naviframe_items_get (const Elm_Naviframe *obj)
 Get a list of all the naviframe items.
Elm_Widget_Item * elm_naviframe_top_item_get (const Elm_Naviframe *obj)
 Get a top item on the naviframe stack.
Elm_Widget_Item * elm_naviframe_bottom_item_get (const Elm_Naviframe *obj)
 Get a bottom item on the naviframe stack.
Evas_Objectelm_naviframe_item_pop (Elm_Naviframe *obj)
 Pop an item that is on top of the stack.
Elm_Widget_Item * elm_naviframe_item_insert_before (Elm_Naviframe *obj, Elm_Widget_Item *before, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style)
 Insert a new item into the naviframe before item before.
Elm_Widget_Item * elm_naviframe_item_push (Elm_Naviframe *obj, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style)
 Push a new item to the top of the naviframe stack (and show it).
void elm_naviframe_item_simple_promote (Elm_Naviframe *obj, Evas_Object *content)
 Simple version of item_promote.
Elm_Widget_Item * elm_naviframe_item_insert_after (Elm_Naviframe *obj, Elm_Widget_Item *after, const char *title_label, Evas_Object *prev_btn, Evas_Object *next_btn, Evas_Object *content, const char *item_style)
 Insert a new item into the naviframe after item after.

Function Documentation

Add a new Naviframe object to the parent.

Parameters:
parentParent object
Returns:
New object or NULL, if it cannot be created
Since :
2.3
Elm_Widget_Item* elm_naviframe_bottom_item_get ( const Elm_Naviframe *  obj)

Get a bottom item on the naviframe stack.

Since :
2.3
Parameters:
[in]objThe object.
Returns:
The bottom item on the naviframe stack or NULL, if the stack is empty
Eina_Bool elm_naviframe_content_preserve_on_pop_get ( const Elm_Naviframe *  obj)

Preserve the content objects when items are popped.

Since :
2.3
Parameters:
[in]objThe object.
Returns:
Enable the preserve mode if true, disable otherwise
void elm_naviframe_content_preserve_on_pop_set ( Elm_Naviframe *  obj,
Eina_Bool  preserve 
)

Preserve the content objects when items are popped.

Since :
2.3
Parameters:
[in]objThe object.
[in]preserveEnable the preserve mode if true, disable otherwise
Eina_Bool elm_naviframe_event_enabled_get ( const Elm_Naviframe *  obj)

Control the event enabled when pushing/popping items.

If enabled is true, the contents of the naviframe item will receives events from mouse and keyboard during view changing such as item push/pop.

Warning:
Events will be blocked by calling evas_object_freeze_events_set() internally. So don't call the API whiling pushing/popping items.
Since :
2.3
Parameters:
[in]objThe object.
Returns:
Events are received when enabled is true, and ignored otherwise.
void elm_naviframe_event_enabled_set ( Elm_Naviframe *  obj,
Eina_Bool  enabled 
)

Control the event enabled when pushing/popping items.

If enabled is true, the contents of the naviframe item will receives events from mouse and keyboard during view changing such as item push/pop.

Warning:
Events will be blocked by calling evas_object_freeze_events_set() internally. So don't call the API whiling pushing/popping items.
Since :
2.3
Parameters:
[in]objThe object.
[in]enabledEvents are received when enabled is true, and ignored otherwise.
Elm_Widget_Item* elm_naviframe_item_insert_after ( Elm_Naviframe *  obj,
Elm_Widget_Item *  after,
const char *  title_label,
Evas_Object prev_btn,
Evas_Object next_btn,
Evas_Object content,
const char *  item_style 
)

Insert a new item into the naviframe after item after.

The item is inserted into the naviframe straight away without any transition operations. This item will be deleted when it is popped.

The following styles are available for this item: "default"

Since :
2.3
Parameters:
[in]objThe object.
[in]afterThe naviframe item to insert after.
[in]title_labelThe label in the title area. The name of the title label part is "elm.text.title"
[in]prev_btnThe 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"
[in]next_btnThe 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"
[in]contentThe main content object. The name of content part is "elm.swallow.content"
[in]item_styleThe current item style name. NULL would be default.
Returns:
The created item or NULL upon failure.
Elm_Widget_Item* elm_naviframe_item_insert_before ( Elm_Naviframe *  obj,
Elm_Widget_Item *  before,
const char *  title_label,
Evas_Object prev_btn,
Evas_Object next_btn,
Evas_Object content,
const char *  item_style 
)

Insert a new item into the naviframe before item before.

The item is inserted into the naviframe straight away without any transition operations. This item will be deleted when it is popped.

Since :
2.3
Parameters:
[in]objThe object.
[in]beforeThe naviframe item to insert before.
[in]title_labelThe label in the title area. The name of the title label part is "elm.text.title"
[in]prev_btnThe 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"
[in]next_btnThe 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"
[in]contentThe main content object. The name of content part is "elm.swallow.content"
[in]item_styleThe current item style name. NULL would be default.
Returns:
The created item or NULL upon failure.
Evas_Object* elm_naviframe_item_pop ( Elm_Naviframe *  obj)

Pop an item that is on top of the stack.

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.

When pop transition animation is in progress, new pop operation is blocked until current pop operation is complete.

Since :
2.3
Parameters:
[in]objThe object.
Returns:
NULL or the content object(if the elm_naviframe_content_preserve_on_pop_get is true).
Elm_Widget_Item* elm_naviframe_item_push ( Elm_Naviframe *  obj,
const char *  title_label,
Evas_Object prev_btn,
Evas_Object next_btn,
Evas_Object content,
const char *  item_style 
)

Push a new item to the top of the naviframe stack (and show it).

The item pushed becomes one page of the naviframe, this item will be deleted when it is popped.

When push transition animation is in progress, pop operation is blocked until push is complete.

The following styles are available for this item: "default"

Since :
2.3
Parameters:
[in]objThe object.
[in]title_labelThe label in the title area. The name of the title label part is "elm.text.title"
[in]prev_btnThe 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"
[in]next_btnThe 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"
[in]contentThe main content object. The name of content part is "elm.swallow.content"
[in]item_styleThe current item style name. NULL would be default.
Returns:
The created item or NULL upon failure.
void elm_naviframe_item_simple_promote ( Elm_Naviframe *  obj,
Evas_Object content 
)

Simple version of item_promote.

Since :
2.3
Parameters:
[in]objThe object.
[in]content
Eina_List* elm_naviframe_items_get ( const Elm_Naviframe *  obj)

Get a list of all the naviframe items.

Since :
2.3
Parameters:
[in]objThe object.
Returns:
A list of naviframe items, Elm_Widget_Item, or NULL on failure. Note: The returned list MUST be freed.
Eina_Bool elm_naviframe_prev_btn_auto_pushed_get ( const Elm_Naviframe *  obj)

Control if creating prev button automatically or not.

Since :
2.3
Parameters:
[in]objThe object.
Returns:
If true, the previous button(back button) will be created internally when you pass the NULL to the prev_btn parameter in elm_naviframe_item_push
void elm_naviframe_prev_btn_auto_pushed_set ( Elm_Naviframe *  obj,
Eina_Bool  auto_pushed 
)

Control if creating prev button automatically or not.

Since :
2.3
Parameters:
[in]objThe object.
[in]auto_pushedIf true, the previous button(back button) will be created internally when you pass the NULL to the prev_btn parameter in elm_naviframe_item_push
Elm_Widget_Item* elm_naviframe_top_item_get ( const Elm_Naviframe *  obj)

Get a top item on the naviframe stack.

Since :
2.3
Parameters:
[in]objThe object.
Returns:
The top item on the naviframe stack or NULL, if the stack is empty