Tizen Native API  4.0

toolbar_inheritance_tree.png
toolbar.png

A toolbar is a widget that displays a list of items inside a box. It can be scrollable, show a menu with items that don't fit to toolbar size or even crop them.

Only one item can be selected at a time.

Items can have multiple states, or show menus when selected by the user.

This widget implements the elm-scrollable-interface interface, so that all (non-deprecated) functions for the base Scroller widget also work for toolbars (since 1.8)

Smart callbacks one can listen for:

  • "clicked" - when the user clicks on a toolbar item and becomes selected.
  • "longpressed" - when the toolbar is pressed for a certain amount of time.
  • "language,changed" - when the program language changes.
  • "focused" - When the toolbar has received focus. (since 1.8)
  • "unfocused" - When the toolbar has lost focus. (since 1.8)
  • "item,focused" - When the toolbar item has received focus. (since 1.10)
  • "item,unfocused" - When the toolbar item has lost focus. (since 1.10)
  • "selected" - when an item is selected. event_info is a selected item. (since 1.11)
  • "unselected" - when an item is unselected. event_info is a unselected item. (since 1.11)

Available styles for it:

  • "default"
  • "transparent" - no background or shadow, just show the content

Default text parts of the toolbar items that you can use for are:

  • "default" - A label of the toolbar item

Supported elm_object_item common APIs.

  • elm_object_item_del
  • elm_object_item_disabled_set
  • elm_object_item_disabled_get
  • elm_object_item_part_text_set
  • elm_object_item_part_text_get
  • elm_object_item_part_content_set
  • elm_object_item_part_content_get
  • elm_object_item_part_content_unset
  • elm_object_item_focus_set
  • elm_object_item_focus_get

Functions

EINA_DEPRECATED void elm_toolbar_always_select_mode_set (Evas_Object *obj, Eina_Bool always_select)
EINA_DEPRECATED Eina_Bool elm_toolbar_always_select_mode_get (const Evas_Object *obj)
EINA_DEPRECATED void elm_toolbar_no_select_mode_set (Evas_Object *obj, Eina_Bool no_select)
EINA_DEPRECATED Eina_Bool elm_toolbar_no_select_mode_get (const Evas_Object *obj)

Typedefs

typedef struct
_Elm_Toolbar_Item_State 
Elm_Toolbar_Item_State

Typedef Documentation

typedef struct _Elm_Toolbar_Item_State Elm_Toolbar_Item_State

State of a Elm_Toolbar_Item. Can be created with elm_toolbar_item_state_add() and removed with elm_toolbar_item_state_del().


Enumeration Type Documentation

Set toolbar's items display behavior, it can be scrollable, show a menu with exceeding items, or simply hide them.

Default value is ELM_TOOLBAR_SHRINK_MENU. It reads value from elm config.

Values don't work as bitmask, only one can be chosen.

See also elm_toolbar_shrink_mode_set, elm_toolbar_shrink_mode_get.

Enumerator:
ELM_TOOLBAR_SHRINK_NONE 

Set toolbar minimum size to fit all the items.

ELM_TOOLBAR_SHRINK_HIDE 

Hide exceeding items.

ELM_TOOLBAR_SHRINK_SCROLL 

Allow accessing exceeding items through a scroller.

ELM_TOOLBAR_SHRINK_MENU 

Inserts a button to pop up a menu with exceeding items.

ELM_TOOLBAR_SHRINK_EXPAND 

Expand all items according the size of the toolbar.

ELM_TOOLBAR_SHRINK_LAST 

Indicates error if returned by elm_toolbar_shrink_mode_get()


Function Documentation

Get whether the toolbar should always have an item selected.

Parameters:
objThe toolbar object.
Returns:
EINA_TRUE means an item will always be selected, EINA_FALSE indicates that it is possible to have no items selected. If obj is NULL, EINA_FALSE is returned.
See also:
elm_toolbar_always_select_mode_set() for details.

Set whether the toolbar should always have an item selected.

Parameters:
objThe toolbar object.
always_selectEINA_TRUE to enable always-select mode or EINA_FALSE to disable it.

This will cause the toolbar to always have an item selected, and clicking the selected item will not cause a selected event to be emitted. Enabling this mode will immediately select the first toolbar item.

Always-selected is disabled by default.

See also:
elm_toolbar_always_select_mode_get().

Set whether the toolbar items' should be selected by the user or not.

Parameters:
objThe toolbar object.
Returns:
EINA_TRUE means items can be selected. EINA_FALSE indicates they can't. If obj is NULL, EINA_FALSE is returned.
See also:
elm_toolbar_no_select_mode_set() for details.

Set whether the toolbar items' should be selected by the user or not.

Parameters:
objThe toolbar object.
no_selectEINA_TRUE to disable selection or EINA_FALSE to enable it.

This will turn off the ability to select items entirely and they will neither appear selected nor emit selected signals. The clicked callback function will still be called.

Selection is enabled by default.

See also:
elm_toolbar_no_select_mode_get().