Toolbar

- Main Page
- Related Pages
- Data Structures
- Files
- Examples

Typedefs | Functions
Toolbar

## Typedefs
typedef struct _Elm_Toolbar_Item_State | Elm_Toolbar_Item_State
| State of a Elm_Toolbar_Item. More...

## Functions
void | elm_toolbar_item_state_unset (Elm_Object_Item *it)
| Unset the state of `it`. 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_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...
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...

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

List of examples:

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

## 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().

## 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.

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.

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)

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.