- Elementary
- Main
- Authors
- Examples
- Files
- Pages
- Types
- Modules

Enumerations | Functions
Toolbar

## Enumerations
enum | Elm_Toolbar_Item_Scrollto_Type { ELM_TOOLBAR_ITEM_SCROLLTO_NONE = 0, ELM_TOOLBAR_ITEM_SCROLLTO_IN = (1 << 0), ELM_TOOLBAR_ITEM_SCROLLTO_FIRST = (1 << 1), ELM_TOOLBAR_ITEM_SCROLLTO_MIDDLE = (1 << 2), ELM_TOOLBAR_ITEM_SCROLLTO_LAST = (1 << 3) }
| Defines where to position the item in the toolbar. More...
enum | Elm_Toolbar_Shrink_Mode { ELM_TOOLBAR_SHRINK_NONE, ELM_TOOLBAR_SHRINK_HIDE, ELM_TOOLBAR_SHRINK_SCROLL, ELM_TOOLBAR_SHRINK_MENU, ELM_TOOLBAR_SHRINK_EXPAND, ELM_TOOLBAR_SHRINK_LAST }
| Set toolbar's items display behavior, it can be scrollable, show a menu with exceeding items, or simply hide them. More...

## Functions
Elm_Object_Item * | elm_toolbar_item_next_get (const Elm_Object_Item *it)
| Get the item after `item` in toolbar. More...
Elm_Object_Item * | elm_toolbar_item_prev_get (const Elm_Object_Item *it)
| Get the item before `item` in toolbar. More...
void | elm_toolbar_item_priority_set (Elm_Object_Item *it, int priority)
| Set the priority of a toolbar item. More...
int | elm_toolbar_item_priority_get (const Elm_Object_Item *it)
| Get the priority of a toolbar item. More...
Eina_Bool | elm_toolbar_item_selected_get (const Elm_Object_Item *it)
| Get whether the `item` is selected or not. More...
void | elm_toolbar_item_selected_set (Elm_Object_Item *it, Eina_Bool selected)
| Set the selected state of an item. More...
void | elm_toolbar_item_icon_set (Elm_Object_Item *it, const char *icon)
| Set the icon associated with `item`. More...
const char * | elm_toolbar_item_icon_get (const Elm_Object_Item *it)
| Get the string used to set the icon of `item`. More...
Evas_Object * | elm_toolbar_item_object_get (const Elm_Object_Item *it)
| Get the real Evas(Edje) object created to implement the view of a given toolbar `item`. More...
Evas_Object * | elm_toolbar_item_icon_object_get (Elm_Object_Item *it)
| Get the icon object of `item`. More...
Eina_Bool | elm_toolbar_item_icon_memfile_set (Elm_Object_Item *it, const void *img, size_t size, const char *format, const char *key)
| Set the icon associated with `item` to an image in a binary buffer. More...
Eina_Bool | elm_toolbar_item_icon_file_set (Elm_Object_Item *it, const char *file, const char *key)
| Set the icon associated with `item` to an image in a binary buffer. More...
void | elm_toolbar_item_separator_set (Elm_Object_Item *it, Eina_Bool separator)
| Set or unset item as a separator. More...
Eina_Bool | elm_toolbar_item_separator_get (const Elm_Object_Item *it)
| Get a value whether item is a separator or not. More...
void | elm_toolbar_item_menu_set (Elm_Object_Item *it, Eina_Bool menu)
| Set whether the toolbar item opens a menu. More...
Evas_Object * | elm_toolbar_item_menu_get (const Elm_Object_Item *it)
| Get toolbar item's menu. More...
Elm_Toolbar_Item_State * | elm_toolbar_item_state_add (Elm_Object_Item *it, const char *icon, const char *label, Evas_Smart_Cb func, const void *data)
| Add a new state to `item`. More...
Eina_Bool | elm_toolbar_item_state_set (Elm_Object_Item *it, Elm_Toolbar_Item_State *state)
| Set `state` as the current state of `it`. More...
void | elm_toolbar_item_state_unset (Elm_Object_Item *it)
| Unset the state of `it`. More...
Elm_Toolbar_Item_State * | elm_toolbar_item_state_get (const Elm_Object_Item *it)
| Get the current state of `it`. More...
Elm_Toolbar_Item_State * | elm_toolbar_item_state_next (Elm_Object_Item *it)
| Get the state after selected state in toolbar's `item`. More...
Elm_Toolbar_Item_State * | elm_toolbar_item_state_prev (Elm_Object_Item *it)
| Get the state before selected state in toolbar's `item`. More...
void | elm_toolbar_item_show (Elm_Object_Item *it, Elm_Toolbar_Item_Scrollto_Type type)
| Show a specific item, when the toolbar can be scrolled. More...
void | elm_toolbar_item_bring_in (Elm_Object_Item *it, Elm_Toolbar_Item_Scrollto_Type type)
| Show a specific item with scroll animation, when the toolbar can be scrolled. More...
Evas_Object * | elm_toolbar_add (Evas_Object *parent)
| Add a new toolbar widget to the given parent Elementary (container) object. More...
void | elm_toolbar_icon_size_set (Evas_Object *obj, int icon_size)
| Set the icon size, in pixels, to be used by toolbar items. More...
int | elm_toolbar_icon_size_get (const Evas_Object *obj)
| Get the icon size, in pixels, to be used by toolbar items. More...
void | elm_toolbar_icon_order_lookup_set (Evas_Object *obj, Elm_Icon_Lookup_Order order)
| Sets icon lookup order, for toolbar items' icons. More...
Elm_Icon_Lookup_Order | elm_toolbar_icon_order_lookup_get (const Evas_Object *obj)
| Get the icon lookup order. More...
Elm_Object_Item * | elm_toolbar_item_append (Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data)
| Append item to the toolbar. More...
Elm_Object_Item * | elm_toolbar_item_prepend (Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data)
| Prepend item to the toolbar. More...
Elm_Object_Item * | elm_toolbar_item_insert_before (Evas_Object *obj, Elm_Object_Item *before, const char *icon, const char *label, Evas_Smart_Cb func, const void *data)
| Insert a new item into the toolbar object before item `before`. More...
Elm_Object_Item * | elm_toolbar_item_insert_after (Evas_Object *obj, Elm_Object_Item *after, const char *icon, const char *label, Evas_Smart_Cb func, const void *data)
| Insert a new item into the toolbar object after item `after`. More...
Elm_Object_Item * | elm_toolbar_first_item_get (const Evas_Object *obj)
| Get the first item in the given toolbar widget's list of items. More...
Elm_Object_Item * | elm_toolbar_last_item_get (const Evas_Object *obj)
| Get the last item in the given toolbar widget's list of items. More...
Elm_Object_Item * | elm_toolbar_item_find_by_label (const Evas_Object *obj, const char *label)
| Returns a pointer to a toolbar item by its label. More...
Elm_Object_Item * | elm_toolbar_selected_item_get (const Evas_Object *obj)
| Get the selected item. More...
Elm_Object_Item * | elm_toolbar_more_item_get (const Evas_Object *obj)
| Get the more item which is auto-generated by toolbar. More...
void | elm_toolbar_shrink_mode_set (Evas_Object *obj, Elm_Toolbar_Shrink_Mode shrink_mode)
| Set the item displaying mode of a given toolbar widget `obj`. More...
Elm_Toolbar_Shrink_Mode | elm_toolbar_shrink_mode_get (const Evas_Object *obj)
| Get the shrink mode of toolbar `obj`. More...
void | elm_toolbar_transverse_expanded_set (Evas_Object *obj, Eina_Bool transverse_expanded)
| Set the item's transverse expansion of a given toolbar widget `obj`. More...
Eina_Bool | elm_toolbar_transverse_expanded_get (const Evas_Object *obj)
| Get the transverse expansion of toolbar `obj`. More...
void | elm_toolbar_homogeneous_set (Evas_Object *obj, Eina_Bool homogeneous)
| Enable/disable homogeneous mode. More...
Eina_Bool | elm_toolbar_homogeneous_get (const Evas_Object *obj)
| Get whether the homogeneous mode is enabled. More...
void | elm_toolbar_menu_parent_set (Evas_Object *obj, Evas_Object *parent)
| Set the parent object of the toolbar items' menus. More...
Evas_Object * | elm_toolbar_menu_parent_get (const Evas_Object *obj)
| Get the parent object of the toolbar items' menus. More...
void | elm_toolbar_align_set (Evas_Object *obj, double align)
| Set the alignment of the items. More...
double | elm_toolbar_align_get (const Evas_Object *obj)
| Get the alignment of the items. More...
void | elm_toolbar_horizontal_set (Evas_Object *obj, Eina_Bool horizontal)
| Change a toolbar's orientation. More...
Eina_Bool | elm_toolbar_horizontal_get (const Evas_Object *obj)
| Get a toolbar's orientation. More...
unsigned int | elm_toolbar_items_count (const Evas_Object *obj)
| Get the number of items in a toolbar. More...
void | elm_toolbar_standard_priority_set (Evas_Object *obj, int priority)
| Set the standard priority of visible items in a toolbar. More...
int | elm_toolbar_standard_priority_get (const Evas_Object *obj)
| Get the standard_priority of visible items in a toolbar. More...
void | elm_toolbar_select_mode_set (Evas_Object *obj, Elm_Object_Select_Mode mode)
| Set the toolbar select mode. More...
Elm_Object_Select_Mode | elm_toolbar_select_mode_get (const Evas_Object *obj)
| Get the toolbar select mode. More...
void | elm_toolbar_reorder_mode_set (Evas_Object *obj, Eina_Bool reorder_mode)
| Set reorder mode. More...
Eina_Bool | elm_toolbar_reorder_mode_get (const Evas_Object *obj)
| Get the reorder mode. More...
#define | elm_obj_toolbar_icon_size_set(icon_size) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_SIZE_SET), EO_TYPECHECK(int, icon_size)
#define | elm_obj_toolbar_icon_size_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_SIZE_GET), EO_TYPECHECK(int *, ret)
#define | elm_obj_toolbar_item_append(icon, label, func, data, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_toolbar_item_prepend(icon, label, func, data, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_PREPEND), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_toolbar_item_insert_before(before, icon, label, func, data, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_INSERT_BEFORE), EO_TYPECHECK(Elm_Object_Item *, before), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_toolbar_item_insert_after(after, icon, label, func, data, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_INSERT_AFTER), EO_TYPECHECK(Elm_Object_Item *, after), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_toolbar_first_item_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_FIRST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_toolbar_last_item_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_LAST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_toolbar_item_find_by_label(label, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_FIND_BY_LABEL), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_toolbar_selected_item_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SELECTED_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_toolbar_more_item_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_MORE_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)
#define | elm_obj_toolbar_shrink_mode_set(shrink_mode) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SHRINK_MODE_SET), EO_TYPECHECK(Elm_Toolbar_Shrink_Mode, shrink_mode)
#define | elm_obj_toolbar_shrink_mode_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SHRINK_MODE_GET), EO_TYPECHECK(Elm_Toolbar_Shrink_Mode *, ret)
#define | elm_obj_toolbar_homogeneous_set(homogeneous) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HOMOGENEOUS_SET), EO_TYPECHECK(Eina_Bool, homogeneous)
#define | elm_obj_toolbar_homogeneous_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HOMOGENEOUS_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_toolbar_menu_parent_set(parent) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_MENU_PARENT_SET), EO_TYPECHECK(Evas_Object *, parent)
#define | elm_obj_toolbar_menu_parent_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_MENU_PARENT_GET), EO_TYPECHECK(Evas_Object **, ret)
#define | elm_obj_toolbar_align_set(align) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ALIGN_SET), EO_TYPECHECK(double, align)
#define | elm_obj_toolbar_align_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ALIGN_GET), EO_TYPECHECK(double *, ret)
#define | elm_obj_toolbar_icon_order_lookup_set(order) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_ORDER_LOOKUP_SET), EO_TYPECHECK(Elm_Icon_Lookup_Order, order)
#define | elm_obj_toolbar_icon_order_lookup_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_ORDER_LOOKUP_GET), EO_TYPECHECK(Elm_Icon_Lookup_Order *, ret)
#define | elm_obj_toolbar_horizontal_set(horizontal) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HORIZONTAL_SET), EO_TYPECHECK(Eina_Bool, horizontal)
#define | elm_obj_toolbar_horizontal_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HORIZONTAL_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_toolbar_items_count(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEMS_COUNT), EO_TYPECHECK(unsigned int *, ret)
#define | elm_obj_toolbar_standard_priority_set(priority) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_STANDARD_PRIORITY_SET), EO_TYPECHECK(int, priority)
#define | elm_obj_toolbar_standard_priority_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_STANDARD_PRIORITY_GET), EO_TYPECHECK(int *, ret)
#define | elm_obj_toolbar_select_mode_set(mode) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SELECT_MODE_SET), EO_TYPECHECK(Elm_Object_Select_Mode, mode)
#define | elm_obj_toolbar_select_mode_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SELECT_MODE_GET), EO_TYPECHECK(Elm_Object_Select_Mode *, ret)

## Detailed Description

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 to:

- `"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)

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" - 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

List of examples:

- Toolbar Example - Simple Items
- Toolbar Example - Items with States
- Toolbar Example - Items with Menus

## Macro Definition Documentation

#define elm_obj_toolbar_align_get | ( |  | ret | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ALIGN_GET), EO_TYPECHECK(double *, ret)

Since
  1.8

Get the alignment of the items.

Parameters

  [out] | ret |

See Also
  elm_toolbar_align_get

Referenced by elm_toolbar_align_get().

#define elm_obj_toolbar_align_set | ( |  | align | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ALIGN_SET), EO_TYPECHECK(double, align)

Since
  1.8

Set the alignment of the items.

Parameters

  [in] | align |

See Also
  elm_toolbar_align_set

Referenced by elm_toolbar_align_set().

#define elm_obj_toolbar_first_item_get | ( |  | ret | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_FIRST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Get the first item in the given toolbar widget's list of items.

Parameters

  [out] | ret |

See Also
  elm_toolbar_first_item_get

Referenced by elm_toolbar_first_item_get().

#define elm_obj_toolbar_homogeneous_get | ( |  | ret | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HOMOGENEOUS_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get whether the homogeneous mode is enabled.

Parameters

  [out] | ret |

See Also
  elm_toolbar_homogeneous_get

Referenced by elm_toolbar_homogeneous_get().

#define elm_obj_toolbar_homogeneous_set | ( |  | homogeneous | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HOMOGENEOUS_SET), EO_TYPECHECK(Eina_Bool, homogeneous)

Since
  1.8

Enable/disable homogeneous mode.

Parameters

  [in] | homogeneous |

See Also
  elm_toolbar_homogeneous_set

Referenced by elm_toolbar_homogeneous_set().

#define elm_obj_toolbar_horizontal_get | ( |  | ret | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HORIZONTAL_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get a toolbar's orientation

Parameters

  [out] | ret |

See Also
  elm_toolbar_horizontal_get

Referenced by elm_toolbar_horizontal_get().

#define elm_obj_toolbar_horizontal_set | ( |  | horizontal | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HORIZONTAL_SET), EO_TYPECHECK(Eina_Bool, horizontal)

Since
  1.8

Change a toolbar's orientation

Parameters

  [in] | horizontal |

See Also
  elm_toolbar_horizontal_set

Referenced by elm_toolbar_horizontal_set().

#define elm_obj_toolbar_icon_order_lookup_get | ( |  | ret | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_ORDER_LOOKUP_GET), EO_TYPECHECK(Elm_Icon_Lookup_Order *, ret)

Since
  1.8

Get the icon lookup order.

Parameters

  [out] | ret |

See Also
  elm_toolbar_icon_order_lookup_get

Referenced by elm_toolbar_icon_order_lookup_get().

#define elm_obj_toolbar_icon_order_lookup_set | ( |  | order | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_ORDER_LOOKUP_SET), EO_TYPECHECK(Elm_Icon_Lookup_Order, order)

Since
  1.8

Sets icon lookup order, for toolbar items' icons.

Parameters

  [in] | order |

See Also
  elm_toolbar_icon_order_lookup_set

Referenced by elm_toolbar_icon_order_lookup_set().

#define elm_obj_toolbar_icon_size_get | ( |  | ret | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_SIZE_GET), EO_TYPECHECK(int *, ret)

Since
  1.8

Get the icon size, in pixels, to be used by toolbar items.

Parameters

  [out] | ret |

See Also
  elm_toolbar_icon_size_get

Referenced by elm_toolbar_icon_size_get().

#define elm_obj_toolbar_icon_size_set | ( |  | icon_size | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_SIZE_SET), EO_TYPECHECK(int, icon_size)

Since
  1.8

Set the icon size, in pixels, to be used by toolbar items.

Parameters

  [in] | icon_size |

See Also
  elm_toolbar_icon_size_set

Referenced by elm_toolbar_icon_size_set().

#define elm_obj_toolbar_item_append | ( |  | icon,
|  |  | label,
|  |  | func,
|  |  | data,
|  |  | ret
| ) |  | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Append item to the toolbar.

Parameters

  [in] | icon |
  [in] | label |
  [in] | func |
  [in] | data |
  [out] | ret |

See Also
  elm_toolbar_item_append

Referenced by elm_toolbar_item_append().

#define elm_obj_toolbar_item_find_by_label | ( |  | label,
|  |  | ret
| ) |  | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_FIND_BY_LABEL), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Returns a pointer to a toolbar item by its label.

Parameters

  [in] | label |
  [out] | ret |

See Also
  elm_toolbar_item_find_by_label

Referenced by elm_toolbar_item_find_by_label().

#define elm_obj_toolbar_item_insert_after | ( |  | after,
|  |  | icon,
|  |  | label,
|  |  | func,
|  |  | data,
|  |  | ret
| ) |  | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_INSERT_AFTER), EO_TYPECHECK(Elm_Object_Item *, after), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Insert a new item into the toolbar object after item after.

Parameters

  [in] | after |
  [in] | icon |
  [in] | label |
  [in] | func |
  [in] | data |
  [out] | ret |

See Also
  elm_toolbar_item_insert_after

Referenced by elm_toolbar_item_insert_after().

#define elm_obj_toolbar_item_insert_before | ( |  | before,
|  |  | icon,
|  |  | label,
|  |  | func,
|  |  | data,
|  |  | ret
| ) |  | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_INSERT_BEFORE), EO_TYPECHECK(Elm_Object_Item *, before), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Insert a new item into the toolbar object before item before.

Parameters

  [in] | before |
  [in] | icon |
  [in] | label |
  [in] | func |
  [in] | data |
  [out] | ret |

See Also
  elm_toolbar_item_insert_before

Referenced by elm_toolbar_item_insert_before().

#define elm_obj_toolbar_item_prepend | ( |  | icon,
|  |  | label,
|  |  | func,
|  |  | data,
|  |  | ret
| ) |  | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_PREPEND), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Prepend item to the toolbar.

Parameters

  [in] | icon |
  [in] | label |
  [in] | func |
  [in] | data |
  [out] | ret |

See Also
  elm_toolbar_item_prepend

Referenced by elm_toolbar_item_prepend().

#define elm_obj_toolbar_items_count | ( |  | ret | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEMS_COUNT), EO_TYPECHECK(unsigned int *, ret)

Since
  1.8

Get the number of items in a toolbar

Parameters

  [out] | ret |

See Also
  elm_toolbar_items_count

Referenced by elm_toolbar_items_count().

#define elm_obj_toolbar_last_item_get | ( |  | ret | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_LAST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Get the last item in the given toolbar widget's list of items.

Parameters

  [out] | ret |

See Also
  elm_toolbar_last_item_get

Referenced by elm_toolbar_last_item_get().

#define elm_obj_toolbar_menu_parent_get | ( |  | ret | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_MENU_PARENT_GET), EO_TYPECHECK(Evas_Object **, ret)

Since
  1.8

Get the parent object of the toolbar items' menus.

Parameters

  [out] | ret |

See Also
  elm_toolbar_menu_parent_get

Referenced by elm_toolbar_menu_parent_get().

#define elm_obj_toolbar_menu_parent_set | ( |  | parent | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_MENU_PARENT_SET), EO_TYPECHECK(Evas_Object *, parent)

Since
  1.8

Set the parent object of the toolbar items' menus.

Parameters

  [in] | parent |

See Also
  elm_toolbar_menu_parent_set

Referenced by elm_toolbar_menu_parent_set().

#define elm_obj_toolbar_more_item_get | ( |  | ret | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_MORE_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Get the more item.

Parameters

  [out] | ret |

See Also
  elm_toolbar_more_item_get

Referenced by elm_toolbar_more_item_get().

#define elm_obj_toolbar_select_mode_get | ( |  | ret | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SELECT_MODE_GET), EO_TYPECHECK(Elm_Object_Select_Mode *, ret)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [out] | ret |

See Also
  elm_toolbar_select_mode_get

Referenced by elm_toolbar_select_mode_get().

#define elm_obj_toolbar_select_mode_set | ( |  | mode | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SELECT_MODE_SET), EO_TYPECHECK(Elm_Object_Select_Mode, mode)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [in] | mode |

See Also
  elm_toolbar_select_mode_set

Referenced by elm_toolbar_select_mode_set().

#define elm_obj_toolbar_selected_item_get | ( |  | ret | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SELECTED_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret)

Since
  1.8

Get the selected item.

Parameters

  [out] | ret |

See Also
  elm_toolbar_selected_item_get

Referenced by elm_toolbar_selected_item_get().

#define elm_obj_toolbar_shrink_mode_get | ( |  | ret | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SHRINK_MODE_GET), EO_TYPECHECK(Elm_Toolbar_Shrink_Mode *, ret)

Since
  1.8

Get the shrink mode of toolbar obj.

Parameters

  [out] | ret |

See Also
  elm_toolbar_shrink_mode_get

Referenced by elm_toolbar_shrink_mode_get().

#define elm_obj_toolbar_shrink_mode_set | ( |  | shrink_mode | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SHRINK_MODE_SET), EO_TYPECHECK(Elm_Toolbar_Shrink_Mode, shrink_mode)

Since
  1.8

Set the item displaying mode of a given toolbar widget obj.

Parameters

  [in] | shrink_mode |

See Also
  elm_toolbar_shrink_mode_set

Referenced by elm_toolbar_shrink_mode_set().

#define elm_obj_toolbar_standard_priority_get | ( |  | ret | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_STANDARD_PRIORITY_GET), EO_TYPECHECK(int *, ret)

Since
  1.8

Get the standard_priority of visible items in a toolbar

Parameters

  [out] | ret |

See Also
  elm_toolbar_standard_priority_get

Referenced by elm_toolbar_standard_priority_get().

#define elm_obj_toolbar_standard_priority_set | ( |  | priority | ) | ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_STANDARD_PRIORITY_SET), EO_TYPECHECK(int, priority)

Since
  1.8

Set the standard priority of visible items in a toolbar

Parameters

  [in] | priority |

See Also
  elm_toolbar_standard_priority_set

Referenced by elm_toolbar_standard_priority_set().

## Enumeration Type Documentation

enum Elm_Toolbar_Item_Scrollto_Type

Defines where to position the item in the toolbar.

Enumerator
ELM_TOOLBAR_ITEM_SCROLLTO_NONE | no scrollto
ELM_TOOLBAR_ITEM_SCROLLTO_IN | to the nearest viewport
ELM_TOOLBAR_ITEM_SCROLLTO_FIRST | to the first of viewport
ELM_TOOLBAR_ITEM_SCROLLTO_MIDDLE | to the middle of viewport
ELM_TOOLBAR_ITEM_SCROLLTO_LAST | to the last of viewport

enum Elm_Toolbar_Shrink_Mode

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

Note
  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()

## Function Documentation

Evas_Object* elm_toolbar_add | ( | Evas_Object * | parent | ) |

Add a new toolbar widget to the given parent Elementary (container) object.

Parameters

  parent | The parent object.

Returns
  a new toolbar widget handle or `NULL`, on errors.

This function inserts a new toolbar widget on the canvas.

double elm_toolbar_align_get | ( | const Evas_Object * | obj | ) |

Get the alignment of the items.

Parameters

  obj | The toolbar object.

Returns
  toolbar items alignment, a float between `0.0` and `1.0` .

See Also
  elm_toolbar_align_set() for details.

References elm_obj_toolbar_align_get.

void elm_toolbar_align_set | ( | Evas_Object * | obj,
|  | double | align
| ) |  |

Set the alignment of the items.

Parameters

  obj | The toolbar object.
  align | The new alignment, a float between `0.0` and `1.0` .

Alignment of toolbar items, from `0.0` to indicates to align left, to `1.0` , to align to right. `0.5` centralize items.

Centered items by default.

See Also
  elm_toolbar_align_get()

References elm_obj_toolbar_align_set.

Elm_Object_Item* elm_toolbar_first_item_get | ( | const Evas_Object * | obj | ) |

Get the first item in the given toolbar widget's list of items.

Parameters

  obj | The toolbar object

Returns
  The first item or `NULL`, if it has no items (and on errors)

See Also
  elm_toolbar_item_append()
  elm_toolbar_last_item_get()

References elm_obj_toolbar_first_item_get.

Eina_Bool elm_toolbar_homogeneous_get | ( | const Evas_Object * | obj | ) |

Get whether the homogeneous mode is enabled.

Parameters

  obj | The toolbar object.

Returns
  Assume the items within the toolbar are of the same height and width (EINA_TRUE = on, EINA_FALSE = off).

See Also
  elm_toolbar_homogeneous_set()

References elm_obj_toolbar_homogeneous_get.

void elm_toolbar_homogeneous_set | ( | Evas_Object * | obj,
|  | Eina_Bool | homogeneous
| ) |  |

Enable/disable homogeneous mode.

Parameters

  obj | The toolbar object
  homogeneous | Assume the items within the toolbar are of the same size (EINA_TRUE = on, EINA_FALSE = off). Default is `EINA_FALSE`.

This will enable the homogeneous mode where items are of the same size.

See Also
  elm_toolbar_homogeneous_get()

References elm_obj_toolbar_homogeneous_set.

Eina_Bool elm_toolbar_horizontal_get | ( | const Evas_Object * | obj | ) |

Get a toolbar's orientation.

Parameters

  obj | The toolbar object

Returns
  If `EINA_TRUE`, the toolbar is horizontal By default, a toolbar will be horizontal. Use this function to determine whether a toolbar is vertical.

References elm_obj_toolbar_horizontal_get.

void elm_toolbar_horizontal_set | ( | Evas_Object * | obj,
|  | Eina_Bool | horizontal
| ) |  |

Change a toolbar's orientation.

Parameters

  obj | The toolbar object
  horizontal | If `EINA_TRUE`, the toolbar is horizontal By default, a toolbar will be horizontal. Use this function to create a vertical toolbar.

References elm_obj_toolbar_horizontal_set.

Elm_Icon_Lookup_Order elm_toolbar_icon_order_lookup_get | ( | const Evas_Object * | obj | ) |

Get the icon lookup order.

Parameters

  obj | The toolbar object.

Returns
  The icon lookup order.

See Also
  elm_toolbar_icon_order_lookup_set() for details.

References ELM_ICON_LOOKUP_THEME_FDO, and elm_obj_toolbar_icon_order_lookup_get.

void elm_toolbar_icon_order_lookup_set | ( | Evas_Object * | obj,
|  | Elm_Icon_Lookup_Order | order
| ) |  |

Sets icon lookup order, for toolbar items' icons.

Parameters

  obj | The toolbar object.
  order | The icon lookup order.

Icons added before calling this function will not be affected. The default lookup order is ELM_ICON_LOOKUP_THEME_FDO.

See Also
  elm_toolbar_icon_order_lookup_get()

References elm_obj_toolbar_icon_order_lookup_set.

int elm_toolbar_icon_size_get | ( | const Evas_Object * | obj | ) |

Get the icon size, in pixels, to be used by toolbar items.

Parameters

  obj | The toolbar object.

Returns
  The icon size in pixels.

See Also
  elm_toolbar_icon_size_set() for details.

References elm_obj_toolbar_icon_size_get.

void elm_toolbar_icon_size_set | ( | Evas_Object * | obj,
|  | int | icon_size
| ) |  |

Set the icon size, in pixels, to be used by toolbar items.

Parameters

  obj | The toolbar object
  icon_size | The icon size in pixels

Note
  Default value is `32`. It reads value from elm config.

See Also
  elm_toolbar_icon_size_get()

References elm_obj_toolbar_icon_size_set.

Elm_Object_Item* elm_toolbar_item_append | ( | Evas_Object * | obj,
|  | const char * | icon,
|  | const char * | label,
|  | Evas_Smart_Cb | func,
|  | const void * | data
| ) |  |

Append item to the toolbar.

Parameters

  obj | The toolbar object.
  icon | A string with icon name or the absolute path of an image file.
  label | The label of the item.
  func | The function to call when the item is clicked.
  data | The data to associate with the item for related callbacks.

Returns
  The created item or `NULL` upon failure.

A new item will be created and appended to the toolbar, i.e., will be set as last item.

Items created with this method can be deleted with elm_object_item_del().

Associated `data` can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If such function isn't needed, just passing `NULL` as `func` is enough. The same should be done for `data`.

Toolbar will load icon image from fdo or current theme. This behavior can be set by elm_toolbar_icon_order_lookup_set() function. If an absolute path is provided it will load it direct from a file.

Note
  This function does not accept relative icon path.

See Also
  elm_toolbar_item_icon_set()
  elm_object_item_del()

References elm_obj_toolbar_item_append.

void elm_toolbar_item_bring_in | ( | Elm_Object_Item * | it,
|  | Elm_Toolbar_Item_Scrollto_Type | type
| ) |  |

Show a specific item with scroll animation, when the toolbar can be scrolled.

Parameters

  it | the toolbar item

see elm_toolbar_item_show()

Since
  1.8

References elm_scrollable_interface_region_bring_in.

Elm_Object_Item* elm_toolbar_item_find_by_label | ( | const Evas_Object * | obj,
|  | const char * | label
| ) |  |

Returns a pointer to a toolbar item by its label.

Parameters

  obj | The toolbar object.
  label | The label of the item to find.

Returns
  The pointer to the toolbar item matching `label` or `NULL` on failure.

References elm_obj_toolbar_item_find_by_label.

Eina_Bool elm_toolbar_item_icon_file_set | ( | Elm_Object_Item * | it,
|  | const char * | file,
|  | const char * | key
| ) |  |

Set the icon associated with `item` to an image in a binary buffer.

Parameters

  it | The toolbar item.
  file | The file that contains the image
  key | Optional key of `img` to pass to the image loader (eg. if `img` is an edje file)

Returns
  (`EINA_TRUE` = success, `EINA_FALSE` = error)

Note
  The icon image set by this function can be changed by elm_toolbar_item_icon_set().

References elm_icon_add(), and elm_image_file_set().

const char* elm_toolbar_item_icon_get | ( | const Elm_Object_Item * | it | ) |

Get the string used to set the icon of `item`.

Parameters

  it | The toolbar item.

Returns
  The string associated with the icon object.

See Also
  elm_toolbar_item_icon_set() for details.

Eina_Bool elm_toolbar_item_icon_memfile_set | ( | Elm_Object_Item * | it,
|  | const void * | img,
|  | size_t | size,
|  | const char * | format,
|  | const char * | key
| ) |  |

Set the icon associated with `item` to an image in a binary buffer.

Parameters

  it | The toolbar item.
  img | The binary data that will be used as an image
  size | The size of binary data `img`
  format | Optional format of `img` to pass to the image loader
  key | Optional key of `img` to pass to the image loader (eg. if `img` is an edje file)

Returns
  (`EINA_TRUE` = success, `EINA_FALSE` = error)

Note
  The icon image set by this function can be changed by elm_toolbar_item_icon_set().

References elm_icon_add(), and elm_image_memfile_set().

Evas_Object* elm_toolbar_item_icon_object_get | ( | Elm_Object_Item * | it | ) |

Get the icon object of `item`.

Parameters

  it | The toolbar item.

Returns
  The icon object

See Also
  elm_toolbar_item_icon_set(), elm_toolbar_item_icon_file_set(), or elm_toolbar_item_icon_memfile_set() for details.

void elm_toolbar_item_icon_set | ( | Elm_Object_Item * | it,
|  | const char * | icon
| ) |  |

Set the icon associated with `item`.

Parameters

  it | The toolbar item.
  icon | A string with icon name or the absolute path of an image file.

Toolbar will load icon image from fdo or current theme. This behavior can be set by elm_toolbar_icon_order_lookup_set() function. If an absolute path is provided it will load it direct from a file.

Note
  This function does not accept relative icon path.

See Also
  elm_toolbar_icon_order_lookup_set()
  elm_toolbar_icon_order_lookup_get()

References elm_icon_add().

Elm_Object_Item* elm_toolbar_item_insert_after | ( | Evas_Object * | obj,
|  | Elm_Object_Item * | after,
|  | const char * | icon,
|  | const char * | label,
|  | Evas_Smart_Cb | func,
|  | const void * | data
| ) |  |

Insert a new item into the toolbar object after item `after`.

Parameters

  obj | The toolbar object.
  after | The toolbar item to insert after.
  icon | A string with icon name or the absolute path of an image file.
  label | The label of the item.
  func | The function to call when the item is clicked.
  data | The data to associate with the item for related callbacks.

Returns
  The created item or `NULL` upon failure.

A new item will be created and added to the toolbar. Its position in this toolbar will be just after item `after`.

Items created with this method can be deleted with elm_object_item_del().

Associated `data` can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If such function isn't needed, just passing `NULL` as `func` is enough. The same should be done for `data`.

Toolbar will load icon image from fdo or current theme. This behavior can be set by elm_toolbar_icon_order_lookup_set() function. If an absolute path is provided it will load it direct from a file.

Note
  This function does not accept relative icon path.

See Also
  elm_toolbar_item_icon_set()
  elm_object_item_del()

References elm_obj_toolbar_item_insert_after.

Elm_Object_Item* elm_toolbar_item_insert_before | ( | Evas_Object * | obj,
|  | Elm_Object_Item * | before,
|  | const char * | icon,
|  | const char * | label,
|  | Evas_Smart_Cb | func,
|  | const void * | data
| ) |  |

Insert a new item into the toolbar object before item `before`.

Parameters

  obj | The toolbar object.
  before | The toolbar item to insert before.
  icon | A string with icon name or the absolute path of an image file.
  label | The label of the item.
  func | The function to call when the item is clicked.
  data | The data to associate with the item for related callbacks.

Returns
  The created item or `NULL` upon failure.

A new item will be created and added to the toolbar. Its position in this toolbar will be just before item `before`.

Items created with this method can be deleted with elm_object_item_del().

Associated `data` can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If such function isn't needed, just passing `NULL` as `func` is enough. The same should be done for `data`.

Toolbar will load icon image from fdo or current theme. This behavior can be set by elm_toolbar_icon_order_lookup_set() function. If an absolute path is provided it will load it direct from a file.

Note
  This function does not accept relative icon path.

See Also
  elm_toolbar_item_icon_set()
  elm_object_item_del()

References elm_obj_toolbar_item_insert_before.

Evas_Object* elm_toolbar_item_menu_get | ( | const Elm_Object_Item * | it | ) |

Get toolbar item's menu.

Parameters

  it | The toolbar item.

Returns
  Item's menu object or `NULL` on failure.

If `item` wasn't set as menu item with elm_toolbar_item_menu_set(), this function will set it.

See Also
  elm_toolbar_item_menu_set() for details.

void elm_toolbar_item_menu_set | ( | Elm_Object_Item * | it,
|  | Eina_Bool | menu
| ) |  |

Set whether the toolbar item opens a menu.

Parameters

  it | The toolbar item.
  menu | If `EINA_TRUE`, `item` will opens a menu when selected.

A toolbar item can be set to be a menu, using this function.

Once it is set to be a menu, it can be manipulated through the menu-like function elm_toolbar_menu_parent_set() and the other elm_menu functions, using the Evas_Object `menu` returned by elm_toolbar_item_menu_get().

So, items to be displayed in this item's menu should be added with elm_menu_item_add().

The following code exemplifies the most basic usage:

tb = elm_toolbar_add(win)
item = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
elm_toolbar_item_menu_set(item, EINA_TRUE);
elm_toolbar_menu_parent_set(tb, win);
menu = elm_toolbar_item_menu_get(item);
elm_menu_item_add(menu, NULL, "edit-cut", "Cut", NULL, NULL);
menu_item = elm_menu_item_add(menu, NULL, "edit-copy", "Copy", NULL,
NULL);

See Also
  elm_toolbar_item_menu_get()

Elm_Object_Item* elm_toolbar_item_next_get | ( | const Elm_Object_Item * | it | ) |

Get the item after `item` in toolbar.

Parameters

  it | The toolbar item.

Returns
  The item after `item`, or `NULL` if none or on failure.

Note
  If it is the last item, `NULL` will be returned.

See Also
  elm_toolbar_item_append()

Evas_Object* elm_toolbar_item_object_get | ( | const Elm_Object_Item * | it | ) |

Get the real Evas(Edje) object created to implement the view of a given toolbar `item`.

Parameters

  it | The toolbar item.

Returns
  The base Edje object associated with `it`.

Elm_Object_Item* elm_toolbar_item_prepend | ( | Evas_Object * | obj,
|  | const char * | icon,
|  | const char * | label,
|  | Evas_Smart_Cb | func,
|  | const void * | data
| ) |  |

Prepend item to the toolbar.

Parameters

  obj | The toolbar object.
  icon | A string with icon name or the absolute path of an image file.
  label | The label of the item.
  func | The function to call when the item is clicked.
  data | The data to associate with the item for related callbacks.

Returns
  The created item or `NULL` upon failure.

A new item will be created and prepended to the toolbar, i.e., will be set as first item.

Items created with this method can be deleted with elm_object_item_del().

Associated `data` can be properly freed when item is deleted if a callback function is set with elm_object_item_del_cb_set().

If a function is passed as argument, it will be called every time this item is selected, i.e., the user clicks over an unselected item. If such function isn't needed, just passing `NULL` as `func` is enough. The same should be done for `data`.

Toolbar will load icon image from fdo or current theme. This behavior can be set by elm_toolbar_icon_order_lookup_set() function. If an absolute path is provided it will load it direct from a file.

Note
  This function does not accept relative icon path.

See Also
  elm_toolbar_item_icon_set()
  elm_object_item_del()

References elm_obj_toolbar_item_prepend.

Elm_Object_Item* elm_toolbar_item_prev_get | ( | const Elm_Object_Item * | it | ) |

Get the item before `item` in toolbar.

Parameters

  it | The toolbar item.

Returns
  The item before `item`, or `NULL` if none or on failure.

Note
  If it is the first item, `NULL` will be returned.

See Also
  elm_toolbar_item_prepend()

int elm_toolbar_item_priority_get | ( | const Elm_Object_Item * | it | ) |

Get the priority of a toolbar item.

Parameters

  it | The toolbar item.

Returns
  The `item` priority, or `0` on failure.

See Also
  elm_toolbar_item_priority_set() for details.

void elm_toolbar_item_priority_set | ( | Elm_Object_Item * | it,
|  | int | priority
| ) |  |

Set the priority of a toolbar item.

Parameters

  it | The toolbar item.
  priority | The item priority. The default is zero.

This is used only when the toolbar shrink mode is set to #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_HIDE. When space is less than required, items with low priority will be removed from the toolbar and added to a dynamically-created menu, while items with higher priority will remain on the toolbar, with the same order they were added.

See Also
  elm_toolbar_item_priority_get()

Eina_Bool elm_toolbar_item_selected_get | ( | const Elm_Object_Item * | it | ) |

Get whether the `item` is selected or not.

Parameters

  it | The toolbar item.

Returns
  `EINA_TRUE` means item is selected. `EINA_FALSE` indicates it's not. If `obj` is `NULL`, `EINA_FALSE` is returned.

See Also
  elm_toolbar_selected_item_set() for details.
  elm_toolbar_item_selected_get()

void elm_toolbar_item_selected_set | ( | Elm_Object_Item * | it,
|  | Eina_Bool | selected
| ) |  |

Set the selected state of an item.

Parameters

  it | The toolbar item
  selected | The selected state

This sets the selected state of the given item `it`. `EINA_TRUE` for selected, `EINA_FALSE` for not selected.

If a new item is selected the previously selected will be unselected. Previously selected item can be get with function elm_toolbar_selected_item_get().

Selected items will be highlighted.

See Also
  elm_toolbar_item_selected_get()
  elm_toolbar_selected_item_get()

Eina_Bool elm_toolbar_item_separator_get | ( | const Elm_Object_Item * | it | ) |

Get a value whether item is a separator or not.

Parameters

  it | The toolbar item.

Returns
  `EINA_TRUE` means item `it` is a separator. `EINA_FALSE` indicates it's not. If `it` is `NULL`, `EINA_FALSE` is returned.

See Also
  elm_toolbar_item_separator_set() for details.

void elm_toolbar_item_separator_set | ( | Elm_Object_Item * | it,
|  | Eina_Bool | separator
| ) |  |

Set or unset item as a separator.

Parameters

  it | The toolbar item.
  separator | `EINA_TRUE` to set item `item` as separator or `EINA_FALSE` to unset, i.e., item will be used as a regular item.

Items aren't set as separator by default.

If set as separator it will display separator theme, so won't display icons or label.

See Also
  elm_toolbar_item_separator_get()

References elm_config_scale_get().

void elm_toolbar_item_show | ( | Elm_Object_Item * | it,
|  | Elm_Toolbar_Item_Scrollto_Type | type
| ) |  |

Show a specific item, when the toolbar can be scrolled.

Parameters

  it | the toolbar item

see elm_toolbar_item_bring_in()

Since
  1.8

References elm_scrollable_interface_content_region_show.

Elm_Toolbar_Item_State* elm_toolbar_item_state_add | ( | Elm_Object_Item * | it,
|  | const char * | icon,
|  | const char * | label,
|  | Evas_Smart_Cb | func,
|  | const void * | data
| ) |  |

Add a new state to `item`.

Parameters

  it | The toolbar item.
  icon | A string with icon name or the absolute path of an image file.
  label | The label of the new state.
  func | The function to call when the item is clicked when this state is selected.
  data | The data to associate with the state.

Returns
  The toolbar item state, or `NULL` upon failure.

Toolbar will load icon image from fdo or current theme. This behavior can be set by elm_toolbar_icon_order_lookup_set() function. If an absolute path is provided it will load it direct from a file.

States created with this function can be removed with elm_toolbar_item_state_del().

See Also
  elm_toolbar_item_state_del()
  elm_toolbar_item_state_sel()
  elm_toolbar_item_state_get()

References elm_icon_add(), and elm_icon_order_lookup_set().

Elm_Toolbar_Item_State* elm_toolbar_item_state_get | ( | const Elm_Object_Item * | it | ) |

Get the current state of `it`.

Parameters

  it | The toolbar item.

Returns
  The selected state or `NULL` if none is selected or on failure.

See Also
  elm_toolbar_item_state_set() for details.
  elm_toolbar_item_state_unset()
  elm_toolbar_item_state_add()

Elm_Toolbar_Item_State* elm_toolbar_item_state_next | ( | Elm_Object_Item * | it | ) |

Get the state after selected state in toolbar's `item`.

Parameters

  it | The toolbar item to change state.

Returns
  The state after current state, or `NULL` on failure.

If last state is selected, this function will return first state.

See Also
  elm_toolbar_item_state_set()
  elm_toolbar_item_state_add()

Elm_Toolbar_Item_State* elm_toolbar_item_state_prev | ( | Elm_Object_Item * | it | ) |

Get the state before selected state in toolbar's `item`.

Parameters

  it | The toolbar item to change state.

Returns
  The state before current state, or `NULL` on failure.

If first state is selected, this function will return last state.

See Also
  elm_toolbar_item_state_set()
  elm_toolbar_item_state_add()

Eina_Bool elm_toolbar_item_state_set | ( | Elm_Object_Item * | it,
|  | Elm_Toolbar_Item_State * | state
| ) |  |

Set `state` as the current state of `it`.

Parameters

  it | The toolbar item.
  state | The state to use.

Returns
  `EINA_TRUE` on success or `EINA_FALSE` on failure.

If `state` is `NULL`, it won't select any state and the default item's icon and label will be used. It's the same behaviour than elm_toolbar_item_state_unset().

See Also
  elm_toolbar_item_state_unset()

Referenced by elm_toolbar_item_state_unset().

void elm_toolbar_item_state_unset | ( | Elm_Object_Item * | it | ) |

Unset the state of `it`.

Parameters

  it | The toolbar item.

The default icon and label from this item will be displayed.

See Also
  elm_toolbar_item_state_set() for more details.

References elm_toolbar_item_state_set().

unsigned int elm_toolbar_items_count | ( | const Evas_Object * | obj | ) |

Get the number of items in a toolbar.

Parameters

  obj | The toolbar object

Returns
  The number of items in `obj` toolbar

References elm_obj_toolbar_items_count.

Elm_Object_Item* elm_toolbar_last_item_get | ( | const Evas_Object * | obj | ) |

Get the last item in the given toolbar widget's list of items.

Parameters

  obj | The toolbar object

Returns
  The last item or `NULL`, if it has no items (and on errors)

See Also
  elm_toolbar_item_prepend()
  elm_toolbar_first_item_get()

References elm_obj_toolbar_last_item_get.

Evas_Object* elm_toolbar_menu_parent_get | ( | const Evas_Object * | obj | ) |

Get the parent object of the toolbar items' menus.

Parameters

  obj | The toolbar object.

Returns
  The parent of the menu objects.

See Also
  elm_toolbar_menu_parent_set() for details.

References elm_obj_toolbar_menu_parent_get.

void elm_toolbar_menu_parent_set | ( | Evas_Object * | obj,
|  | Evas_Object * | parent
| ) |  |

Set the parent object of the toolbar items' menus.

Parameters

  obj | The toolbar object.
  parent | The parent of the menu objects.

Each item can be set as item menu, with elm_toolbar_item_menu_set().

For more details about setting the parent for toolbar menus, see elm_menu_parent_set().

See Also
  elm_menu_parent_set() for details.
  elm_toolbar_item_menu_set() for details.

References elm_obj_toolbar_menu_parent_set.

Elm_Object_Item* elm_toolbar_more_item_get | ( | const Evas_Object * | obj | ) |

Get the more item which is auto-generated by toolbar.

Parameters

  obj | The toolbar object.

Returns
  The toolbar more item.

Toolbar generates 'more' item when there is no more space to fit items in and toolbar is in ELM_TOOLBAR_SHRINK_MENU or ELM_TOOLBAR_SHRINK_EXPAND mode. The more item can be manipulated by elm_object_item_text_set() and elm_object_item_content_set.

References elm_obj_toolbar_more_item_get.

Eina_Bool elm_toolbar_reorder_mode_get | ( | const Evas_Object * | obj | ) |

Get the reorder mode.

Parameters

  obj | The toolbar object

Returns
  The reorder mode (EINA_TRUE = on, EINA_FALSE = off)

void elm_toolbar_reorder_mode_set | ( | Evas_Object * | obj,
|  | Eina_Bool | reorder_mode
| ) |  |

Set reorder mode.

Parameters

  obj | The toolbar object
  reorder_mode | The reorder mode (EINA_TRUE = on, EINA_FALSE = off)

Elm_Object_Select_Mode elm_toolbar_select_mode_get | ( | const Evas_Object * | obj | ) |

Get the toolbar select mode.

Parameters

  obj | The toolbar object

Returns
  The select mode (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX)

See Also
  elm_toolbar_select_mode_set()

References elm_obj_toolbar_select_mode_get.

void elm_toolbar_select_mode_set | ( | Evas_Object * | obj,
|  | Elm_Object_Select_Mode | mode
| ) |  |

Set the toolbar select mode.

Parameters

  obj | The toolbar object
  mode | The select mode

elm_toolbar_select_mode_set() changes item select mode in the toolbar widget.

- ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and callback when first becoming selected. Any further clicks will do nothing, unless you set always select mode.
- ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, every click will make the selected callbacks be called.
- ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items entirely and they will neither appear selected nor call selected callback functions.

See Also
  elm_toolbar_select_mode_get()

References elm_obj_toolbar_select_mode_set.

Elm_Object_Item* elm_toolbar_selected_item_get | ( | const Evas_Object * | obj | ) |

Get the selected item.

Parameters

  obj | The toolbar object.

Returns
  The selected toolbar item.

The selected item can be unselected with function elm_toolbar_item_selected_set().

The selected item always will be highlighted on toolbar.

See Also
  elm_toolbar_selected_items_get()

References elm_obj_toolbar_selected_item_get.

Elm_Toolbar_Shrink_Mode elm_toolbar_shrink_mode_get | ( | const Evas_Object * | obj | ) |

Get the shrink mode of toolbar `obj`.

Parameters

  obj | The toolbar object.

Returns
  Toolbar's items display behavior.

See Also
  elm_toolbar_shrink_mode_set() for details.

References elm_obj_toolbar_shrink_mode_get.

void elm_toolbar_shrink_mode_set | ( | Evas_Object * | obj,
|  | Elm_Toolbar_Shrink_Mode | shrink_mode
| ) |  |

Set the item displaying mode of a given toolbar widget `obj`.

Parameters

  obj | The toolbar object handle
  shrink_mode | Toolbar's items display behavior

The toolbar won't scroll under #ELM_TOOLBAR_SHRINK_NONE mode, but it will enforce a minimum size, so that all the items will fit inside it. It won't scroll and won't show the items that don't fit under #ELM_TOOLBAR_SHRINK_HIDE mode. Finally, it'll scroll under #ELM_TOOLBAR_SHRINK_SCROLL mode, and it will create a button to aggregate items which didn't fit with the #ELM_TOOLBAR_SHRINK_MENU mode.

Warning
  This function's behavior will clash with those of elm_scroller_policy_set(), so use either one of them, but not both.

References elm_obj_toolbar_shrink_mode_set.

int elm_toolbar_standard_priority_get | ( | const Evas_Object * | obj | ) |

Get the standard_priority of visible items in a toolbar.

Parameters

  obj | The toolbar object

Returns
  The standard priority of items in `obj` toolbar

See Also
  elm_toolbar_standard_priority_set()

Since
  1.7

References elm_obj_toolbar_standard_priority_get.

void elm_toolbar_standard_priority_set | ( | Evas_Object * | obj,
|  | int | priority
| ) |  |

Set the standard priority of visible items in a toolbar.

Parameters

  obj | The toolbar object
  priority | The standard_priority of visible items

If the priority of the item is up to standard priority, it is shown in basic panel. The other items are located in more menu or panel. The more menu or panel can be shown when the more item is clicked.

See Also
  elm_toolbar_standard_priority_get()

Since
  1.7

References elm_obj_toolbar_standard_priority_set.

Eina_Bool elm_toolbar_transverse_expanded_get | ( | const Evas_Object * | obj | ) |

Get the transverse expansion of toolbar `obj`.

Parameters

  obj | The toolbar object.

Returns
  The transverse expansion of the item. (EINA_TRUE = on, EINA_FALSE = off, default = EINA_FALSE)

See Also
  elm_toolbar_transverse_expand_set() for details.

void elm_toolbar_transverse_expanded_set | ( | Evas_Object * | obj,
|  | Eina_Bool | transverse_expanded
| ) |  |

Set the item's transverse expansion of a given toolbar widget `obj`.

Parameters

  obj | The toolbar object.
  transverse_expanded | The transverse expansion of the item. (EINA_TRUE = on, EINA_FALSE = off, default = EINA_FALSE)

This will expand the transverse length of the item according the transverse length of the toolbar. The default is what the transverse length of the item is set according its min value.

Copyright ©2000-2014 Enlightenment.org - Samsung Electronics supports the EFL Documentation Project - Generated Wed Jan 8 2014 20:51:14