• Python EFL - 1.23
  • python docs
  • other docs
  • EFL

Navigation

  • index
  • modules |
  • next |
  • previous |
  • Home |
  • What is elementary? »

Logo

Table Of Contents

  • Naviframe
    • Widget description
    • Layout content parts
    • Layout text parts
    • Available styles
    • Emitted signals
    • Inheritance diagram

Previous topic

MultiButtonEntry

Next topic

Need

Quick search

Naviframe¶

../_images/naviframe-preview.png

Widget description¶

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

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.

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.

Layout content parts¶

  • default - The main content of the current page
  • icon - An icon in the title area of the current page
  • prev_btn - A button of the current page to go to the previous page
  • next_btn - A button of the current page to go to the next page

Layout text parts¶

  • default - Title label in the title area of the current page
  • subtitle - Sub-title label in the title area of the current page

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

Available styles¶

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

  • basic - views are switched sliding horizontally, one after the other
  • overlap - like the previous one, but the previous view stays at its place and is overlapped by the new

Emitted signals¶

  • transition,finished - When the transition is finished in changing the item
  • title,transition,finished - When the title area’s transition is finished
  • title,clicked - User clicked title area
  • item,activated - Naviframe item was activated (since 1.19)

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

  • delete()
  • part_text_set()
  • part_text_get()
  • part_content_set()
  • part_content_get()
  • part_content_unset()
  • signal_emit()

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.

Inheritance diagram¶

class efl.elementary.Naviframe(Object parent, *args, **kwargs)¶

Bases: efl.elementary.__init__.LayoutClass

Parameters:
  • parent (efl.evas.Object) – The parent object
  • **kwargs – All the remaining keyword arguments are interpreted as properties of the instance
bottom_item¶

Get a bottom item on the naviframe stack

Type:NaviframeItem
bottom_item_get¶
callback_item_activated_add¶

Naviframe item was activated

New in version 1.19.

callback_item_activated_del¶
callback_title_clicked_add¶

User clicked title area.

callback_title_clicked_del¶
callback_title_transition_finished_add¶

When the title transition is finished.

callback_title_transition_finished_del¶
callback_transition_finished_add¶

When the transition is finished in changing the item.

callback_transition_finished_del¶
content_preserve_on_pop¶

Preserve the content objects when items are popped.

Type:bool
content_preserve_on_pop_get¶
content_preserve_on_pop_set¶
event_enabled¶

Whether the event when pushing/popping items is enabled

If 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 setting freeze_events internally. So don’t call the API while pushing/popping items.

Type:bool
event_enabled_get¶
event_enabled_set¶
item_insert_after¶
item_insert_before¶
item_pop¶

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.

See also

content_preserve_on_pop

Returns:None or the content object(if content_preserve_on_pop is True).
Return type:Object
item_push¶
item_simple_promote¶

Simple version of NaviframeItem.promote().

See also

NaviframeItem.promote()

item_simple_push¶

Simple version of NaviframeItem.push_to().

See also

NaviframeItem.push_to()

items¶

Get a list of all the naviframe items.

Type:tuple of NaviframeItem
items_get¶
prev_btn_auto_pushed¶

Whether prev button(back button) will be created automatically or not.

See also

item_push()

Type:bool
prev_btn_auto_pushed_get¶
prev_btn_auto_pushed_set¶
top_item¶

Get a top item on the naviframe stack

Type:NaviframeItem
top_item_get¶
class efl.elementary.NaviframeItem(title_label=None, Object prev_btn=None, Object next_btn=None, Object content=None, item_style=None, *args, **kwargs)¶

Bases: efl.elementary.__init__.ObjectItem

  • "default"
Parameters:
  • title_label (string) – The label in the title area. The name of the title label part is “elm.text.title”
  • prev_btn (Button) – The button to go to the previous item. If it is None, then naviframe will create a back button automatically. The name of the prev_btn part is “elm.swallow.prev_btn”
  • next_btn (Button) – 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”
  • content (Object) – The main content object. The name of content part is “elm.swallow.content”
  • item_style (string) – The current item style name. None would be default.
insert_after¶

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.

See also

style push_to() insert_before()

Parameters:after (NaviframeItem) – The naviframe item to insert after.
Returns:The created item or None upon failure.
Return type:NaviframeItem
insert_before¶

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.

See also

style push_to() insert_after()

Parameters:before (NaviframeItem) – The naviframe item to insert before.
Returns:The created item or None upon failure.
Return type:NaviframeItem
item_pop_to¶

Deprecated since version 1.8: Use pop_to() instead.

item_promote¶

Deprecated since version 1.8: Use promote() instead.

pop_cb_set¶

Set a function to be called when the item is going to be popped.

Parameters:func – the callback function.

Warning

Don’t set “clicked” callback to the prev button additionally if the function does an exact same logic with this func. When hardware back key is pressed then both callbacks will be called.

New in version 1.14.

pop_to¶

Pop the items between the top and the above one on the given item.

promote¶

Promote an item already in the naviframe stack to the top of the stack

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.

push_to¶

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.

See also

style insert_before() insert_after()

Returns:The created item or None upon failure.
Return type:NaviframeItem
style¶

The item style.

The following styles are available for this item:

  • "default"
Type:string
style_get¶
style_set¶
title_enabled¶

Enable/Disable the title area and the transition effect.

When the title area is disabled, then the controls would be hidden so as to expand the content area to full-size.

Type:getter: bool - setter: (bool, bool)

Note

This property is somehow strange, the setter and the getter have different param numbers. The second param in the setter choose if the title transition should be animated or not

See also

title_enabled_set() and title_enabled_set()

New in version 1.9.

title_enabled_get¶
title_enabled_set¶
title_visible¶

Show/Hide the title area

When the title area is invisible, then the controls would be hidden so as to expand the content area to full-size.

Type:bool

Deprecated since version 1.9: Use title_enabled instead.

title_visible_get¶

Deprecated since version 1.9: Use title_enabled_get() instead.

title_visible_set¶

Deprecated since version 1.9: Use title_enabled_set() instead.

Navigation

  • index
  • modules |
  • next |
  • previous |
  • Home |
  • What is elementary? »
© Copyright 2008-2019, Simon Busch, Gustavo Sverzut Barbieri, Ulisses Furquim, ProFUSION embedded systems, Boris Faure, Fabiano Fidencio, Davide Andreoli, Kai Huuhko.
Created using Sphinx 1.7.6.