2 * @defgroup Toolbar Toolbar
5 * @image html img/widget/toolbar/preview-00.png
6 * @image latex img/widget/toolbar/preview-00.eps width=\textwidth
8 * @image html img/toolbar.png
9 * @image latex img/toolbar.eps width=\textwidth
11 * A toolbar is a widget that displays a list of items inside
12 * a box. It can be scrollable, show a menu with items that don't fit
13 * to toolbar size or even crop them.
15 * Only one item can be selected at a time.
17 * Items can have multiple states, or show menus when selected by the user.
19 * Smart callbacks one can listen to:
20 * - "clicked" - when the user clicks on a toolbar item and becomes selected.
21 * - "language,changed" - when the program language changes
23 * Available styles for it:
25 * - @c "transparent" - no background or shadow, just show the content
27 * Default text parts of the toolbar items that you can use for are:
28 * @li "default" - label of the toolbar item
30 * Supported elm_object_item common APIs.
31 * @li elm_object_item_disabled_set
32 * @li elm_object_item_disabled_get
33 * @li elm_object_item_part_text_set
34 * @li elm_object_item_part_text_get
37 * @li @ref toolbar_example_01
38 * @li @ref toolbar_example_02
39 * @li @ref toolbar_example_03
48 * @enum _Elm_Toolbar_Shrink_Mode
49 * @typedef Elm_Toolbar_Shrink_Mode
51 * Set toolbar's items display behavior, it can be scrollable,
52 * show a menu with exceeding items, or simply hide them.
54 * @note Default value is #ELM_TOOLBAR_SHRINK_MENU. It reads value
57 * Values <b> don't </b> work as bitmask, only one can be chosen.
59 * @see elm_toolbar_shrink_mode_set()
60 * @see elm_toolbar_shrink_mode_get()
66 ELM_TOOLBAR_SHRINK_NONE, /**< Set toolbar minimum size to fit all the items. */
67 ELM_TOOLBAR_SHRINK_HIDE, /**< Hide exceeding items. */
68 ELM_TOOLBAR_SHRINK_SCROLL, /**< Allow accessing exceeding items through a scroller. */
69 ELM_TOOLBAR_SHRINK_MENU, /**< Inserts a button to pop up a menu with exceeding items. */
70 ELM_TOOLBAR_SHRINK_EXPAND, /**< Expand all items according the size of the toolbar. */
71 ELM_TOOLBAR_SHRINK_LAST /**< Indicates error if returned by elm_toolbar_shrink_mode_get() */
72 } Elm_Toolbar_Shrink_Mode;
74 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(). */
77 * Add a new toolbar widget to the given parent Elementary
80 * @param parent The parent object.
81 * @return a new toolbar widget handle or @c NULL, on errors.
83 * This function inserts a new toolbar widget on the canvas.
87 EAPI Evas_Object *elm_toolbar_add(Evas_Object *parent);
90 * Set the icon size, in pixels, to be used by toolbar items.
92 * @param obj The toolbar object
93 * @param icon_size The icon size in pixels
95 * @note Default value is @c 32. It reads value from elm config.
97 * @see elm_toolbar_icon_size_get()
101 EAPI void elm_toolbar_icon_size_set(Evas_Object *obj, int icon_size);
104 * Get the icon size, in pixels, to be used by toolbar items.
106 * @param obj The toolbar object.
107 * @return The icon size in pixels.
109 * @see elm_toolbar_icon_size_set() for details.
113 EAPI int elm_toolbar_icon_size_get(const Evas_Object *obj);
116 * Sets icon lookup order, for toolbar items' icons.
118 * @param obj The toolbar object.
119 * @param order The icon lookup order.
121 * Icons added before calling this function will not be affected.
122 * The default lookup order is #ELM_ICON_LOOKUP_THEME_FDO.
124 * @see elm_toolbar_icon_order_lookup_get()
128 EAPI void elm_toolbar_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order);
131 * Gets the icon lookup order.
133 * @param obj The toolbar object.
134 * @return The icon lookup order.
136 * @see elm_toolbar_icon_order_lookup_set() for details.
140 EAPI Elm_Icon_Lookup_Order elm_toolbar_icon_order_lookup_get(const Evas_Object *obj);
143 * Append item to the toolbar.
145 * @param obj The toolbar object.
146 * @param icon A string with icon name or the absolute path of an image file.
147 * @param label The label of the item.
148 * @param func The function to call when the item is clicked.
149 * @param data The data to associate with the item for related callbacks.
150 * @return The created item or @c NULL upon failure.
152 * A new item will be created and appended to the toolbar, i.e., will
153 * be set as @b last item.
155 * Items created with this method can be deleted with
156 * elm_object_item_del().
158 * Associated @p data can be properly freed when item is deleted if a
159 * callback function is set with elm_object_item_del_cb_set().
161 * If a function is passed as argument, it will be called every time this item
162 * is selected, i.e., the user clicks over an unselected item.
163 * If such function isn't needed, just passing
164 * @c NULL as @p func is enough. The same should be done for @p data.
166 * Toolbar will load icon image from fdo or current theme.
167 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
168 * If an absolute path is provided it will load it direct from a file.
170 * @see elm_toolbar_item_icon_set()
171 * @see elm_object_item_del()
175 EAPI Elm_Object_Item *elm_toolbar_item_append(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
178 * Prepend item to the toolbar.
180 * @param obj The toolbar object.
181 * @param icon A string with icon name or the absolute path of an image file.
182 * @param label The label of the item.
183 * @param func The function to call when the item is clicked.
184 * @param data The data to associate with the item for related callbacks.
185 * @return The created item or @c NULL upon failure.
187 * A new item will be created and prepended to the toolbar, i.e., will
188 * be set as @b first item.
190 * Items created with this method can be deleted with
191 * elm_object_item_del().
193 * Associated @p data can be properly freed when item is deleted if a
194 * callback function is set with elm_object_item_del_cb_set().
196 * If a function is passed as argument, it will be called every time this item
197 * is selected, i.e., the user clicks over an unselected item.
198 * If such function isn't needed, just passing
199 * @c NULL as @p func is enough. The same should be done for @p data.
201 * Toolbar will load icon image from fdo or current theme.
202 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
203 * If an absolute path is provided it will load it direct from a file.
205 * @see elm_toolbar_item_icon_set()
206 * @see elm_object_item_del()
210 EAPI Elm_Object_Item *elm_toolbar_item_prepend(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
213 * Insert a new item into the toolbar object before item @p before.
215 * @param obj The toolbar object.
216 * @param before The toolbar item to insert before.
217 * @param icon A string with icon name or the absolute path of an image file.
218 * @param label The label of the item.
219 * @param func The function to call when the item is clicked.
220 * @param data The data to associate with the item for related callbacks.
221 * @return The created item or @c NULL upon failure.
223 * A new item will be created and added to the toolbar. Its position in
224 * this toolbar will be just before item @p before.
226 * Items created with this method can be deleted with
227 * elm_object_item_del().
229 * Associated @p data can be properly freed when item is deleted if a
230 * callback function is set with elm_object_item_del_cb_set().
232 * If a function is passed as argument, it will be called every time this item
233 * is selected, i.e., the user clicks over an unselected item.
234 * If such function isn't needed, just passing
235 * @c NULL as @p func is enough. The same should be done for @p data.
237 * Toolbar will load icon image from fdo or current theme.
238 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
239 * If an absolute path is provided it will load it direct from a file.
241 * @see elm_toolbar_item_icon_set()
242 * @see elm_object_item_del()
246 EAPI 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);
249 * Insert a new item into the toolbar object after item @p after.
251 * @param obj The toolbar object.
252 * @param after The toolbar item to insert after.
253 * @param icon A string with icon name or the absolute path of an image file.
254 * @param label The label of the item.
255 * @param func The function to call when the item is clicked.
256 * @param data The data to associate with the item for related callbacks.
257 * @return The created item or @c NULL upon failure.
259 * A new item will be created and added to the toolbar. Its position in
260 * this toolbar will be just after item @p after.
262 * Items created with this method can be deleted with
263 * elm_object_item_del().
265 * Associated @p data can be properly freed when item is deleted if a
266 * callback function is set with elm_object_item_del_cb_set().
268 * If a function is passed as argument, it will be called every time this item
269 * is selected, i.e., the user clicks over an unselected item.
270 * If such function isn't needed, just passing
271 * @c NULL as @p func is enough. The same should be done for @p data.
273 * Toolbar will load icon image from fdo or current theme.
274 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
275 * If an absolute path is provided it will load it direct from a file.
277 * @see elm_toolbar_item_icon_set()
278 * @see elm_object_item_del()
282 EAPI 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);
285 * Get the first item in the given toolbar widget's list of
288 * @param obj The toolbar object
289 * @return The first item or @c NULL, if it has no items (and on
292 * @see elm_toolbar_item_append()
293 * @see elm_toolbar_last_item_get()
297 EAPI Elm_Object_Item *elm_toolbar_first_item_get(const Evas_Object *obj);
300 * Get the last item in the given toolbar widget's list of
303 * @param obj The toolbar object
304 * @return The last item or @c NULL, if it has no items (and on
307 * @see elm_toolbar_item_prepend()
308 * @see elm_toolbar_first_item_get()
312 EAPI Elm_Object_Item *elm_toolbar_last_item_get(const Evas_Object *obj);
315 * Get the item after @p item in toolbar.
317 * @param it The toolbar item.
318 * @return The item after @p item, or @c NULL if none or on failure.
320 * @note If it is the last item, @c NULL will be returned.
322 * @see elm_toolbar_item_append()
326 EAPI Elm_Object_Item *elm_toolbar_item_next_get(const Elm_Object_Item *it);
329 * Get the item before @p item in toolbar.
331 * @param it The toolbar item.
332 * @return The item before @p item, or @c NULL if none or on failure.
334 * @note If it is the first item, @c NULL will be returned.
336 * @see elm_toolbar_item_prepend()
340 EAPI Elm_Object_Item *elm_toolbar_item_prev_get(const Elm_Object_Item *it);
343 * Set the priority of a toolbar item.
345 * @param it The toolbar item.
346 * @param priority The item priority. The default is zero.
348 * This is used only when the toolbar shrink mode is set to
349 * #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_HIDE.
350 * When space is less than required, items with low priority
351 * will be removed from the toolbar and added to a dynamically-created menu,
352 * while items with higher priority will remain on the toolbar,
353 * with the same order they were added.
355 * @see elm_toolbar_item_priority_get()
359 EAPI void elm_toolbar_item_priority_set(Elm_Object_Item *it, int priority);
362 * Get the priority of a toolbar item.
364 * @param it The toolbar item.
365 * @return The @p item priority, or @c 0 on failure.
367 * @see elm_toolbar_item_priority_set() for details.
371 EAPI int elm_toolbar_item_priority_get(const Elm_Object_Item *it);
374 * Returns a pointer to a toolbar item by its label.
376 * @param obj The toolbar object.
377 * @param label The label of the item to find.
379 * @return The pointer to the toolbar item matching @p label or @c NULL
384 EAPI Elm_Object_Item *elm_toolbar_item_find_by_label(const Evas_Object *obj, const char *label);
387 * Get whether the @p item is selected or not.
389 * @param it The toolbar item.
390 * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates
391 * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned.
393 * @see elm_toolbar_selected_item_set() for details.
394 * @see elm_toolbar_item_selected_get()
398 EAPI Eina_Bool elm_toolbar_item_selected_get(const Elm_Object_Item *it);
401 * Set the selected state of an item.
403 * @param it The toolbar item
404 * @param selected The selected state
406 * This sets the selected state of the given item @p it.
407 * @c EINA_TRUE for selected, @c EINA_FALSE for not selected.
409 * If a new item is selected the previously selected will be unselected.
410 * Previously selected item can be get with function
411 * elm_toolbar_selected_item_get().
413 * Selected items will be highlighted.
415 * @see elm_toolbar_item_selected_get()
416 * @see elm_toolbar_selected_item_get()
420 EAPI void elm_toolbar_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
423 * Get the selected item.
425 * @param obj The toolbar object.
426 * @return The selected toolbar item.
428 * The selected item can be unselected with function
429 * elm_toolbar_item_selected_set().
431 * The selected item always will be highlighted on toolbar.
433 * @see elm_toolbar_selected_items_get()
437 EAPI Elm_Object_Item *elm_toolbar_selected_item_get(const Evas_Object *obj);
440 * Set the icon associated with @p item.
442 * @param it The toolbar item.
443 * @param icon A string with icon name or the absolute path of an image file.
445 * Toolbar will load icon image from fdo or current theme.
446 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
447 * If an absolute path is provided it will load it direct from a file.
449 * @see elm_toolbar_icon_order_lookup_set()
450 * @see elm_toolbar_icon_order_lookup_get()
454 EAPI void elm_toolbar_item_icon_set(Elm_Object_Item *it, const char *icon);
457 * Get the string used to set the icon of @p item.
459 * @param it The toolbar item.
460 * @return The string associated with the icon object.
462 * @see elm_toolbar_item_icon_set() for details.
466 EAPI const char *elm_toolbar_item_icon_get(const Elm_Object_Item *it);
469 * Get the object of @p item.
471 * @param it The toolbar item.
476 EAPI Evas_Object *elm_toolbar_item_object_get(const Elm_Object_Item *it);
479 * Get the icon object of @p item.
481 * @param it The toolbar item.
482 * @return The icon object
484 * @see elm_toolbar_item_icon_set(), elm_toolbar_item_icon_file_set(),
485 * or elm_toolbar_item_icon_memfile_set() for details.
489 EAPI Evas_Object *elm_toolbar_item_icon_object_get(Elm_Object_Item *it);
492 * Set the icon associated with @p item to an image in a binary buffer.
494 * @param it The toolbar item.
495 * @param img The binary data that will be used as an image
496 * @param size The size of binary data @p img
497 * @param format Optional format of @p img to pass to the image loader
498 * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file)
500 * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
502 * @note The icon image set by this function can be changed by
503 * elm_toolbar_item_icon_set().
507 EAPI Eina_Bool elm_toolbar_item_icon_memfile_set(Elm_Object_Item *it, const void *img, size_t size, const char *format, const char *key);
510 * Set the icon associated with @p item to an image in a binary buffer.
512 * @param it The toolbar item.
513 * @param file The file that contains the image
514 * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file)
516 * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
518 * @note The icon image set by this function can be changed by
519 * elm_toolbar_item_icon_set().
523 EAPI Eina_Bool elm_toolbar_item_icon_file_set(Elm_Object_Item *it, const char *file, const char *key);
526 * Set or unset item as a separator.
528 * @param it The toolbar item.
529 * @param separator @c EINA_TRUE to set item @p item as separator or
530 * @c EINA_FALSE to unset, i.e., item will be used as a regular item.
532 * Items aren't set as separator by default.
534 * If set as separator it will display separator theme, so won't display
537 * @see elm_toolbar_item_separator_get()
541 EAPI void elm_toolbar_item_separator_set(Elm_Object_Item *it, Eina_Bool separator);
544 * Get a value whether item is a separator or not.
546 * @param it The toolbar item.
547 * @return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE
548 * indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned.
550 * @see elm_toolbar_item_separator_set() for details.
554 EAPI Eina_Bool elm_toolbar_item_separator_get(const Elm_Object_Item *it);
557 * Set the shrink state of toolbar @p obj.
559 * @param obj The toolbar object.
560 * @param shrink_mode Toolbar's items display behavior.
562 * The toolbar won't scroll if #ELM_TOOLBAR_SHRINK_NONE,
563 * but will enforce a minimum size so all the items will fit, won't scroll
564 * and won't show the items that don't fit if #ELM_TOOLBAR_SHRINK_HIDE,
565 * will scroll if #ELM_TOOLBAR_SHRINK_SCROLL, and will create a button to
566 * pop up excess elements with #ELM_TOOLBAR_SHRINK_MENU.
570 EAPI void elm_toolbar_shrink_mode_set(Evas_Object *obj, Elm_Toolbar_Shrink_Mode shrink_mode);
573 * Get the shrink mode of toolbar @p obj.
575 * @param obj The toolbar object.
576 * @return Toolbar's items display behavior.
578 * @see elm_toolbar_shrink_mode_set() for details.
582 EAPI Elm_Toolbar_Shrink_Mode elm_toolbar_shrink_mode_get(const Evas_Object *obj);
585 * Enable/disable homogeneous mode.
587 * @param obj The toolbar object
588 * @param homogeneous Assume the items within the toolbar are of the
589 * same size (EINA_TRUE = on, EINA_FALSE = off). Default is @c EINA_FALSE.
591 * This will enable the homogeneous mode where items are of the same size.
592 * @see elm_toolbar_homogeneous_get()
596 EAPI void elm_toolbar_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
599 * Get whether the homogeneous mode is enabled.
601 * @param obj The toolbar object.
602 * @return Assume the items within the toolbar are of the same height
603 * and width (EINA_TRUE = on, EINA_FALSE = off).
605 * @see elm_toolbar_homogeneous_set()
609 EAPI Eina_Bool elm_toolbar_homogeneous_get(const Evas_Object *obj);
612 * Set the parent object of the toolbar items' menus.
614 * @param obj The toolbar object.
615 * @param parent The parent of the menu objects.
617 * Each item can be set as item menu, with elm_toolbar_item_menu_set().
619 * For more details about setting the parent for toolbar menus, see
620 * elm_menu_parent_set().
622 * @see elm_menu_parent_set() for details.
623 * @see elm_toolbar_item_menu_set() for details.
627 EAPI void elm_toolbar_menu_parent_set(Evas_Object *obj, Evas_Object *parent);
630 * Get the parent object of the toolbar items' menus.
632 * @param obj The toolbar object.
633 * @return The parent of the menu objects.
635 * @see elm_toolbar_menu_parent_set() for details.
639 EAPI Evas_Object *elm_toolbar_menu_parent_get(const Evas_Object *obj);
642 * Set the alignment of the items.
644 * @param obj The toolbar object.
645 * @param align The new alignment, a float between <tt> 0.0 </tt>
646 * and <tt> 1.0 </tt>.
648 * Alignment of toolbar items, from <tt> 0.0 </tt> to indicates to align
649 * left, to <tt> 1.0 </tt>, to align to right. <tt> 0.5 </tt> centralize
652 * Centered items by default.
654 * @see elm_toolbar_align_get()
658 EAPI void elm_toolbar_align_set(Evas_Object *obj, double align);
661 * Get the alignment of the items.
663 * @param obj The toolbar object.
664 * @return toolbar items alignment, a float between <tt> 0.0 </tt> and
667 * @see elm_toolbar_align_set() for details.
671 EAPI double elm_toolbar_align_get(const Evas_Object *obj);
674 * Set whether the toolbar item opens a menu.
676 * @param it The toolbar item.
677 * @param menu If @c EINA_TRUE, @p item will opens a menu when selected.
679 * A toolbar item can be set to be a menu, using this function.
681 * Once it is set to be a menu, it can be manipulated through the
682 * menu-like function elm_toolbar_menu_parent_set() and the other
683 * elm_menu functions, using the Evas_Object @c menu returned by
684 * elm_toolbar_item_menu_get().
686 * So, items to be displayed in this item's menu should be added with
687 * elm_menu_item_add().
689 * The following code exemplifies the most basic usage:
691 * tb = elm_toolbar_add(win)
692 * item = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
693 * elm_toolbar_item_menu_set(item, EINA_TRUE);
694 * elm_toolbar_menu_parent_set(tb, win);
695 * menu = elm_toolbar_item_menu_get(item);
696 * elm_menu_item_add(menu, NULL, "edit-cut", "Cut", NULL, NULL);
697 * menu_item = elm_menu_item_add(menu, NULL, "edit-copy", "Copy", NULL,
701 * @see elm_toolbar_item_menu_get()
705 EAPI void elm_toolbar_item_menu_set(Elm_Object_Item *it, Eina_Bool menu);
708 * Get toolbar item's menu.
710 * @param it The toolbar item.
711 * @return Item's menu object or @c NULL on failure.
713 * If @p item wasn't set as menu item with elm_toolbar_item_menu_set(),
714 * this function will set it.
716 * @see elm_toolbar_item_menu_set() for details.
720 EAPI Evas_Object *elm_toolbar_item_menu_get(const Elm_Object_Item *it);
723 * Add a new state to @p item.
725 * @param it The toolbar item.
726 * @param icon A string with icon name or the absolute path of an image file.
727 * @param label The label of the new state.
728 * @param func The function to call when the item is clicked when this
730 * @param data The data to associate with the state.
731 * @return The toolbar item state, or @c NULL upon failure.
733 * Toolbar will load icon image from fdo or current theme.
734 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
735 * If an absolute path is provided it will load it direct from a file.
737 * States created with this function can be removed with
738 * elm_toolbar_item_state_del().
740 * @see elm_toolbar_item_state_del()
741 * @see elm_toolbar_item_state_sel()
742 * @see elm_toolbar_item_state_get()
746 EAPI 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);
749 * Delete a previously added state to @p item.
751 * @param it The toolbar item.
752 * @param state The state to be deleted.
753 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure.
755 * @see elm_toolbar_item_state_add()
757 EAPI Eina_Bool elm_toolbar_item_state_del(Elm_Object_Item *it, Elm_Toolbar_Item_State *state);
760 * Set @p state as the current state of @p it.
762 * @param it The toolbar item.
763 * @param state The state to use.
764 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure.
766 * If @p state is @c NULL, it won't select any state and the default item's
767 * icon and label will be used. It's the same behaviour than
768 * elm_toolbar_item_state_unset().
770 * @see elm_toolbar_item_state_unset()
774 EAPI Eina_Bool elm_toolbar_item_state_set(Elm_Object_Item *it, Elm_Toolbar_Item_State *state);
777 * Unset the state of @p it.
779 * @param it The toolbar item.
781 * The default icon and label from this item will be displayed.
783 * @see elm_toolbar_item_state_set() for more details.
787 EAPI void elm_toolbar_item_state_unset(Elm_Object_Item *it);
790 * Get the current state of @p it.
792 * @param it The toolbar item.
793 * @return The selected state or @c NULL if none is selected or on failure.
795 * @see elm_toolbar_item_state_set() for details.
796 * @see elm_toolbar_item_state_unset()
797 * @see elm_toolbar_item_state_add()
801 EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_get(const Elm_Object_Item *it);
804 * Get the state after selected state in toolbar's @p item.
806 * @param it The toolbar item to change state.
807 * @return The state after current state, or @c NULL on failure.
809 * If last state is selected, this function will return first state.
811 * @see elm_toolbar_item_state_set()
812 * @see elm_toolbar_item_state_add()
816 EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_next(Elm_Object_Item *it);
819 * Get the state before selected state in toolbar's @p item.
821 * @param it The toolbar item to change state.
822 * @return The state before current state, or @c NULL on failure.
824 * If first state is selected, this function will return last state.
826 * @see elm_toolbar_item_state_set()
827 * @see elm_toolbar_item_state_add()
831 EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_prev(Elm_Object_Item *it);
835 * Change a toolbar's orientation
836 * @param obj The toolbar object
837 * @param horizontal If @c EINA_TRUE, the toolbar is horizontal
838 * By default, a toolbar will be horizontal. Use this function to create a vertical toolbar.
841 EAPI void elm_toolbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
844 * Get a toolbar's orientation
845 * @param obj The toolbar object
846 * @return If @c EINA_TRUE, the toolbar is horizontal
847 * By default, a toolbar will be horizontal. Use this function to determine whether a toolbar is vertical.
850 EAPI Eina_Bool elm_toolbar_horizontal_get(const Evas_Object *obj);
853 * Get the number of items in a toolbar
854 * @param obj The toolbar object
855 * @return The number of items in @p obj toolbar
858 EAPI unsigned int elm_toolbar_items_count(const Evas_Object *obj);
861 * Set the toolbar select mode.
863 * @param obj The toolbar object
864 * @param mode The select mode
866 * elm_toolbar_select_mode_set() changes item select mode in the toolbar widget.
867 * - ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and
868 * callback when first becoming selected. Any further clicks will
869 * do nothing, unless you set always select mode.
870 * - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
871 * every click will make the selected callbacks be called.
872 * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items
873 * entirely and they will neither appear selected nor call selected
874 * callback functions.
876 * @see elm_toolbar_select_mode_get()
881 elm_toolbar_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode);
884 * Get the toolbar select mode.
886 * @param obj The toolbar object
887 * @return The select mode
888 * (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX)
890 * @see elm_toolbar_select_mode_set()
894 EAPI Elm_Object_Select_Mode
895 elm_toolbar_select_mode_get(const Evas_Object *obj);