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 * - "longpressed" - when the toolbar is pressed for a certain amount of time.
22 * - "language,changed" - when the program language changes.
24 * Available styles for it:
26 * - @c "transparent" - no background or shadow, just show the content
28 * Default text parts of the toolbar items that you can use for are:
29 * @li "default" - label of the toolbar item
31 * Supported elm_object_item common APIs.
32 * @li @ref elm_object_item_disabled_set
33 * @li @ref elm_object_item_disabled_get
34 * @li @ref elm_object_item_part_text_set
35 * @li @ref elm_object_item_part_text_get
38 * @li @ref toolbar_example_01
39 * @li @ref toolbar_example_02
40 * @li @ref toolbar_example_03
49 * @enum _Elm_Toolbar_Shrink_Mode
50 * @typedef Elm_Toolbar_Shrink_Mode
52 * Set toolbar's items display behavior, it can be scrollable,
53 * show a menu with exceeding items, or simply hide them.
55 * @note Default value is #ELM_TOOLBAR_SHRINK_MENU. It reads value
58 * Values <b> don't </b> work as bitmask, only one can be chosen.
60 * @see elm_toolbar_shrink_mode_set()
61 * @see elm_toolbar_shrink_mode_get()
67 ELM_TOOLBAR_SHRINK_NONE, /**< Set toolbar minimum size to fit all the items. */
68 ELM_TOOLBAR_SHRINK_HIDE, /**< Hide exceeding items. */
69 ELM_TOOLBAR_SHRINK_SCROLL, /**< Allow accessing exceeding items through a scroller. */
70 ELM_TOOLBAR_SHRINK_MENU, /**< Inserts a button to pop up a menu with exceeding items. */
71 ELM_TOOLBAR_SHRINK_EXPAND, /**< Expand all items according the size of the toolbar. */
72 ELM_TOOLBAR_SHRINK_LAST /**< Indicates error if returned by elm_toolbar_shrink_mode_get() */
73 } Elm_Toolbar_Shrink_Mode;
75 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(). */
78 * Add a new toolbar widget to the given parent Elementary
81 * @param parent The parent object.
82 * @return a new toolbar widget handle or @c NULL, on errors.
84 * This function inserts a new toolbar widget on the canvas.
88 EAPI Evas_Object *elm_toolbar_add(Evas_Object *parent);
91 * Set the icon size, in pixels, to be used by toolbar items.
93 * @param obj The toolbar object
94 * @param icon_size The icon size in pixels
96 * @note Default value is @c 32. It reads value from elm config.
98 * @see elm_toolbar_icon_size_get()
102 EAPI void elm_toolbar_icon_size_set(Evas_Object *obj, int icon_size);
105 * Get the icon size, in pixels, to be used by toolbar items.
107 * @param obj The toolbar object.
108 * @return The icon size in pixels.
110 * @see elm_toolbar_icon_size_set() for details.
114 EAPI int elm_toolbar_icon_size_get(const Evas_Object *obj);
117 * Sets icon lookup order, for toolbar items' icons.
119 * @param obj The toolbar object.
120 * @param order The icon lookup order.
122 * Icons added before calling this function will not be affected.
123 * The default lookup order is #ELM_ICON_LOOKUP_THEME_FDO.
125 * @see elm_toolbar_icon_order_lookup_get()
129 EAPI void elm_toolbar_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order);
132 * Gets the icon lookup order.
134 * @param obj The toolbar object.
135 * @return The icon lookup order.
137 * @see elm_toolbar_icon_order_lookup_set() for details.
141 EAPI Elm_Icon_Lookup_Order elm_toolbar_icon_order_lookup_get(const Evas_Object *obj);
144 * Append item to the toolbar.
146 * @param obj The toolbar object.
147 * @param icon A string with icon name or the absolute path of an image file.
148 * @param label The label of the item.
149 * @param func The function to call when the item is clicked.
150 * @param data The data to associate with the item for related callbacks.
151 * @return The created item or @c NULL upon failure.
153 * A new item will be created and appended to the toolbar, i.e., will
154 * be set as @b last item.
156 * Items created with this method can be deleted with
157 * elm_object_item_del().
159 * Associated @p data can be properly freed when item is deleted if a
160 * callback function is set with elm_object_item_del_cb_set().
162 * If a function is passed as argument, it will be called every time this item
163 * is selected, i.e., the user clicks over an unselected item.
164 * If such function isn't needed, just passing
165 * @c NULL as @p func is enough. The same should be done for @p data.
167 * Toolbar will load icon image from fdo or current theme.
168 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
169 * If an absolute path is provided it will load it direct from a file.
171 * @see elm_toolbar_item_icon_set()
172 * @see elm_object_item_del()
176 EAPI Elm_Object_Item *elm_toolbar_item_append(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
179 * Prepend item to the toolbar.
181 * @param obj The toolbar object.
182 * @param icon A string with icon name or the absolute path of an image file.
183 * @param label The label of the item.
184 * @param func The function to call when the item is clicked.
185 * @param data The data to associate with the item for related callbacks.
186 * @return The created item or @c NULL upon failure.
188 * A new item will be created and prepended to the toolbar, i.e., will
189 * be set as @b first item.
191 * Items created with this method can be deleted with
192 * elm_object_item_del().
194 * Associated @p data can be properly freed when item is deleted if a
195 * callback function is set with elm_object_item_del_cb_set().
197 * If a function is passed as argument, it will be called every time this item
198 * is selected, i.e., the user clicks over an unselected item.
199 * If such function isn't needed, just passing
200 * @c NULL as @p func is enough. The same should be done for @p data.
202 * Toolbar will load icon image from fdo or current theme.
203 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
204 * If an absolute path is provided it will load it direct from a file.
206 * @see elm_toolbar_item_icon_set()
207 * @see elm_object_item_del()
211 EAPI Elm_Object_Item *elm_toolbar_item_prepend(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
214 * Insert a new item into the toolbar object before item @p before.
216 * @param obj The toolbar object.
217 * @param before The toolbar item to insert before.
218 * @param icon A string with icon name or the absolute path of an image file.
219 * @param label The label of the item.
220 * @param func The function to call when the item is clicked.
221 * @param data The data to associate with the item for related callbacks.
222 * @return The created item or @c NULL upon failure.
224 * A new item will be created and added to the toolbar. Its position in
225 * this toolbar will be just before item @p before.
227 * Items created with this method can be deleted with
228 * elm_object_item_del().
230 * Associated @p data can be properly freed when item is deleted if a
231 * callback function is set with elm_object_item_del_cb_set().
233 * If a function is passed as argument, it will be called every time this item
234 * is selected, i.e., the user clicks over an unselected item.
235 * If such function isn't needed, just passing
236 * @c NULL as @p func is enough. The same should be done for @p data.
238 * Toolbar will load icon image from fdo or current theme.
239 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
240 * If an absolute path is provided it will load it direct from a file.
242 * @see elm_toolbar_item_icon_set()
243 * @see elm_object_item_del()
247 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);
250 * Insert a new item into the toolbar object after item @p after.
252 * @param obj The toolbar object.
253 * @param after The toolbar item to insert after.
254 * @param icon A string with icon name or the absolute path of an image file.
255 * @param label The label of the item.
256 * @param func The function to call when the item is clicked.
257 * @param data The data to associate with the item for related callbacks.
258 * @return The created item or @c NULL upon failure.
260 * A new item will be created and added to the toolbar. Its position in
261 * this toolbar will be just after item @p after.
263 * Items created with this method can be deleted with
264 * elm_object_item_del().
266 * Associated @p data can be properly freed when item is deleted if a
267 * callback function is set with elm_object_item_del_cb_set().
269 * If a function is passed as argument, it will be called every time this item
270 * is selected, i.e., the user clicks over an unselected item.
271 * If such function isn't needed, just passing
272 * @c NULL as @p func is enough. The same should be done for @p data.
274 * Toolbar will load icon image from fdo or current theme.
275 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
276 * If an absolute path is provided it will load it direct from a file.
278 * @see elm_toolbar_item_icon_set()
279 * @see elm_object_item_del()
283 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);
286 * Get the first item in the given toolbar widget's list of
289 * @param obj The toolbar object
290 * @return The first item or @c NULL, if it has no items (and on
293 * @see elm_toolbar_item_append()
294 * @see elm_toolbar_last_item_get()
298 EAPI Elm_Object_Item *elm_toolbar_first_item_get(const Evas_Object *obj);
301 * Get the last item in the given toolbar widget's list of
304 * @param obj The toolbar object
305 * @return The last item or @c NULL, if it has no items (and on
308 * @see elm_toolbar_item_prepend()
309 * @see elm_toolbar_first_item_get()
313 EAPI Elm_Object_Item *elm_toolbar_last_item_get(const Evas_Object *obj);
316 * Get the item after @p item in toolbar.
318 * @param it The toolbar item.
319 * @return The item after @p item, or @c NULL if none or on failure.
321 * @note If it is the last item, @c NULL will be returned.
323 * @see elm_toolbar_item_append()
327 EAPI Elm_Object_Item *elm_toolbar_item_next_get(const Elm_Object_Item *it);
330 * Get the item before @p item in toolbar.
332 * @param it The toolbar item.
333 * @return The item before @p item, or @c NULL if none or on failure.
335 * @note If it is the first item, @c NULL will be returned.
337 * @see elm_toolbar_item_prepend()
341 EAPI Elm_Object_Item *elm_toolbar_item_prev_get(const Elm_Object_Item *it);
344 * Set the priority of a toolbar item.
346 * @param it The toolbar item.
347 * @param priority The item priority. The default is zero.
349 * This is used only when the toolbar shrink mode is set to
350 * #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_HIDE.
351 * When space is less than required, items with low priority
352 * will be removed from the toolbar and added to a dynamically-created menu,
353 * while items with higher priority will remain on the toolbar,
354 * with the same order they were added.
356 * @see elm_toolbar_item_priority_get()
360 EAPI void elm_toolbar_item_priority_set(Elm_Object_Item *it, int priority);
363 * Get the priority of a toolbar item.
365 * @param it The toolbar item.
366 * @return The @p item priority, or @c 0 on failure.
368 * @see elm_toolbar_item_priority_set() for details.
372 EAPI int elm_toolbar_item_priority_get(const Elm_Object_Item *it);
375 * Returns a pointer to a toolbar item by its label.
377 * @param obj The toolbar object.
378 * @param label The label of the item to find.
380 * @return The pointer to the toolbar item matching @p label or @c NULL
385 EAPI Elm_Object_Item *elm_toolbar_item_find_by_label(const Evas_Object *obj, const char *label);
388 * Get whether the @p item is selected or not.
390 * @param it The toolbar item.
391 * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates
392 * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned.
394 * @see elm_toolbar_selected_item_set() for details.
395 * @see elm_toolbar_item_selected_get()
399 EAPI Eina_Bool elm_toolbar_item_selected_get(const Elm_Object_Item *it);
402 * Set the selected state of an item.
404 * @param it The toolbar item
405 * @param selected The selected state
407 * This sets the selected state of the given item @p it.
408 * @c EINA_TRUE for selected, @c EINA_FALSE for not selected.
410 * If a new item is selected the previously selected will be unselected.
411 * Previously selected item can be get with function
412 * elm_toolbar_selected_item_get().
414 * Selected items will be highlighted.
416 * @see elm_toolbar_item_selected_get()
417 * @see elm_toolbar_selected_item_get()
421 EAPI void elm_toolbar_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
424 * Get the selected item.
426 * @param obj The toolbar object.
427 * @return The selected toolbar item.
429 * The selected item can be unselected with function
430 * elm_toolbar_item_selected_set().
432 * The selected item always will be highlighted on toolbar.
434 * @see elm_toolbar_selected_items_get()
438 EAPI Elm_Object_Item *elm_toolbar_selected_item_get(const Evas_Object *obj);
441 * Set the icon associated with @p item.
443 * @param it The toolbar item.
444 * @param icon A string with icon name or the absolute path of an image file.
446 * Toolbar will load icon image from fdo or current theme.
447 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
448 * If an absolute path is provided it will load it direct from a file.
450 * @see elm_toolbar_icon_order_lookup_set()
451 * @see elm_toolbar_icon_order_lookup_get()
455 EAPI void elm_toolbar_item_icon_set(Elm_Object_Item *it, const char *icon);
458 * Get the string used to set the icon of @p item.
460 * @param it The toolbar item.
461 * @return The string associated with the icon object.
463 * @see elm_toolbar_item_icon_set() for details.
467 EAPI const char *elm_toolbar_item_icon_get(const Elm_Object_Item *it);
470 * Get the object of @p item.
472 * @param it The toolbar item.
477 EAPI Evas_Object *elm_toolbar_item_object_get(const Elm_Object_Item *it);
480 * Get the icon object of @p item.
482 * @param it The toolbar item.
483 * @return The icon object
485 * @see elm_toolbar_item_icon_set(), elm_toolbar_item_icon_file_set(),
486 * or elm_toolbar_item_icon_memfile_set() for details.
490 EAPI Evas_Object *elm_toolbar_item_icon_object_get(Elm_Object_Item *it);
493 * Set the icon associated with @p item to an image in a binary buffer.
495 * @param it The toolbar item.
496 * @param img The binary data that will be used as an image
497 * @param size The size of binary data @p img
498 * @param format Optional format of @p img to pass to the image loader
499 * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file)
501 * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
503 * @note The icon image set by this function can be changed by
504 * elm_toolbar_item_icon_set().
508 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);
511 * Set the icon associated with @p item to an image in a binary buffer.
513 * @param it The toolbar item.
514 * @param file The file that contains the image
515 * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file)
517 * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
519 * @note The icon image set by this function can be changed by
520 * elm_toolbar_item_icon_set().
524 EAPI Eina_Bool elm_toolbar_item_icon_file_set(Elm_Object_Item *it, const char *file, const char *key);
527 * Set or unset item as a separator.
529 * @param it The toolbar item.
530 * @param separator @c EINA_TRUE to set item @p item as separator or
531 * @c EINA_FALSE to unset, i.e., item will be used as a regular item.
533 * Items aren't set as separator by default.
535 * If set as separator it will display separator theme, so won't display
538 * @see elm_toolbar_item_separator_get()
542 EAPI void elm_toolbar_item_separator_set(Elm_Object_Item *it, Eina_Bool separator);
545 * Get a value whether item is a separator or not.
547 * @param it The toolbar item.
548 * @return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE
549 * indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned.
551 * @see elm_toolbar_item_separator_set() for details.
555 EAPI Eina_Bool elm_toolbar_item_separator_get(const Elm_Object_Item *it);
558 * Set the shrink state of toolbar @p obj.
560 * @param obj The toolbar object.
561 * @param shrink_mode Toolbar's items display behavior.
563 * The toolbar won't scroll if #ELM_TOOLBAR_SHRINK_NONE,
564 * but will enforce a minimum size so all the items will fit, won't scroll
565 * and won't show the items that don't fit if #ELM_TOOLBAR_SHRINK_HIDE,
566 * will scroll if #ELM_TOOLBAR_SHRINK_SCROLL, and will create a button to
567 * pop up excess elements with #ELM_TOOLBAR_SHRINK_MENU.
571 EAPI void elm_toolbar_shrink_mode_set(Evas_Object *obj, Elm_Toolbar_Shrink_Mode shrink_mode);
574 * Get the shrink mode of toolbar @p obj.
576 * @param obj The toolbar object.
577 * @return Toolbar's items display behavior.
579 * @see elm_toolbar_shrink_mode_set() for details.
583 EAPI Elm_Toolbar_Shrink_Mode elm_toolbar_shrink_mode_get(const Evas_Object *obj);
586 * Enable/disable homogeneous mode.
588 * @param obj The toolbar object
589 * @param homogeneous Assume the items within the toolbar are of the
590 * same size (EINA_TRUE = on, EINA_FALSE = off). Default is @c EINA_FALSE.
592 * This will enable the homogeneous mode where items are of the same size.
593 * @see elm_toolbar_homogeneous_get()
597 EAPI void elm_toolbar_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
600 * Get whether the homogeneous mode is enabled.
602 * @param obj The toolbar object.
603 * @return Assume the items within the toolbar are of the same height
604 * and width (EINA_TRUE = on, EINA_FALSE = off).
606 * @see elm_toolbar_homogeneous_set()
610 EAPI Eina_Bool elm_toolbar_homogeneous_get(const Evas_Object *obj);
613 * Set the parent object of the toolbar items' menus.
615 * @param obj The toolbar object.
616 * @param parent The parent of the menu objects.
618 * Each item can be set as item menu, with elm_toolbar_item_menu_set().
620 * For more details about setting the parent for toolbar menus, see
621 * elm_menu_parent_set().
623 * @see elm_menu_parent_set() for details.
624 * @see elm_toolbar_item_menu_set() for details.
628 EAPI void elm_toolbar_menu_parent_set(Evas_Object *obj, Evas_Object *parent);
631 * Get the parent object of the toolbar items' menus.
633 * @param obj The toolbar object.
634 * @return The parent of the menu objects.
636 * @see elm_toolbar_menu_parent_set() for details.
640 EAPI Evas_Object *elm_toolbar_menu_parent_get(const Evas_Object *obj);
643 * Set the alignment of the items.
645 * @param obj The toolbar object.
646 * @param align The new alignment, a float between <tt> 0.0 </tt>
647 * and <tt> 1.0 </tt>.
649 * Alignment of toolbar items, from <tt> 0.0 </tt> to indicates to align
650 * left, to <tt> 1.0 </tt>, to align to right. <tt> 0.5 </tt> centralize
653 * Centered items by default.
655 * @see elm_toolbar_align_get()
659 EAPI void elm_toolbar_align_set(Evas_Object *obj, double align);
662 * Get the alignment of the items.
664 * @param obj The toolbar object.
665 * @return toolbar items alignment, a float between <tt> 0.0 </tt> and
668 * @see elm_toolbar_align_set() for details.
672 EAPI double elm_toolbar_align_get(const Evas_Object *obj);
675 * Set whether the toolbar item opens a menu.
677 * @param it The toolbar item.
678 * @param menu If @c EINA_TRUE, @p item will opens a menu when selected.
680 * A toolbar item can be set to be a menu, using this function.
682 * Once it is set to be a menu, it can be manipulated through the
683 * menu-like function elm_toolbar_menu_parent_set() and the other
684 * elm_menu functions, using the Evas_Object @c menu returned by
685 * elm_toolbar_item_menu_get().
687 * So, items to be displayed in this item's menu should be added with
688 * elm_menu_item_add().
690 * The following code exemplifies the most basic usage:
692 * tb = elm_toolbar_add(win)
693 * item = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
694 * elm_toolbar_item_menu_set(item, EINA_TRUE);
695 * elm_toolbar_menu_parent_set(tb, win);
696 * menu = elm_toolbar_item_menu_get(item);
697 * elm_menu_item_add(menu, NULL, "edit-cut", "Cut", NULL, NULL);
698 * menu_item = elm_menu_item_add(menu, NULL, "edit-copy", "Copy", NULL,
702 * @see elm_toolbar_item_menu_get()
706 EAPI void elm_toolbar_item_menu_set(Elm_Object_Item *it, Eina_Bool menu);
709 * Get toolbar item's menu.
711 * @param it The toolbar item.
712 * @return Item's menu object or @c NULL on failure.
714 * If @p item wasn't set as menu item with elm_toolbar_item_menu_set(),
715 * this function will set it.
717 * @see elm_toolbar_item_menu_set() for details.
721 EAPI Evas_Object *elm_toolbar_item_menu_get(const Elm_Object_Item *it);
724 * Add a new state to @p item.
726 * @param it The toolbar item.
727 * @param icon A string with icon name or the absolute path of an image file.
728 * @param label The label of the new state.
729 * @param func The function to call when the item is clicked when this
731 * @param data The data to associate with the state.
732 * @return The toolbar item state, or @c NULL upon failure.
734 * Toolbar will load icon image from fdo or current theme.
735 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
736 * If an absolute path is provided it will load it direct from a file.
738 * States created with this function can be removed with
739 * elm_toolbar_item_state_del().
741 * @see elm_toolbar_item_state_del()
742 * @see elm_toolbar_item_state_sel()
743 * @see elm_toolbar_item_state_get()
747 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);
750 * Delete a previously added state to @p item.
752 * @param it The toolbar item.
753 * @param state The state to be deleted.
754 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure.
756 * @see elm_toolbar_item_state_add()
758 EAPI Eina_Bool elm_toolbar_item_state_del(Elm_Object_Item *it, Elm_Toolbar_Item_State *state);
761 * Set @p state as the current state of @p it.
763 * @param it The toolbar item.
764 * @param state The state to use.
765 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure.
767 * If @p state is @c NULL, it won't select any state and the default item's
768 * icon and label will be used. It's the same behaviour than
769 * elm_toolbar_item_state_unset().
771 * @see elm_toolbar_item_state_unset()
775 EAPI Eina_Bool elm_toolbar_item_state_set(Elm_Object_Item *it, Elm_Toolbar_Item_State *state);
778 * Unset the state of @p it.
780 * @param it The toolbar item.
782 * The default icon and label from this item will be displayed.
784 * @see elm_toolbar_item_state_set() for more details.
788 EAPI void elm_toolbar_item_state_unset(Elm_Object_Item *it);
791 * Get the current state of @p it.
793 * @param it The toolbar item.
794 * @return The selected state or @c NULL if none is selected or on failure.
796 * @see elm_toolbar_item_state_set() for details.
797 * @see elm_toolbar_item_state_unset()
798 * @see elm_toolbar_item_state_add()
802 EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_get(const Elm_Object_Item *it);
805 * Get the state after selected state in toolbar's @p item.
807 * @param it The toolbar item to change state.
808 * @return The state after current state, or @c NULL on failure.
810 * If last state is selected, this function will return first state.
812 * @see elm_toolbar_item_state_set()
813 * @see elm_toolbar_item_state_add()
817 EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_next(Elm_Object_Item *it);
820 * Get the state before selected state in toolbar's @p item.
822 * @param it The toolbar item to change state.
823 * @return The state before current state, or @c NULL on failure.
825 * If first state is selected, this function will return last state.
827 * @see elm_toolbar_item_state_set()
828 * @see elm_toolbar_item_state_add()
832 EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_prev(Elm_Object_Item *it);
836 * Change a toolbar's orientation
837 * @param obj The toolbar object
838 * @param horizontal If @c EINA_TRUE, the toolbar is horizontal
839 * By default, a toolbar will be horizontal. Use this function to create a vertical toolbar.
842 EAPI void elm_toolbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
845 * Get a toolbar's orientation
846 * @param obj The toolbar object
847 * @return If @c EINA_TRUE, the toolbar is horizontal
848 * By default, a toolbar will be horizontal. Use this function to determine whether a toolbar is vertical.
851 EAPI Eina_Bool elm_toolbar_horizontal_get(const Evas_Object *obj);
854 * Get the number of items in a toolbar
855 * @param obj The toolbar object
856 * @return The number of items in @p obj toolbar
859 EAPI unsigned int elm_toolbar_items_count(const Evas_Object *obj);
862 * Set the toolbar select mode.
864 * @param obj The toolbar object
865 * @param mode The select mode
867 * elm_toolbar_select_mode_set() changes item select mode in the toolbar widget.
868 * - ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and
869 * callback when first becoming selected. Any further clicks will
870 * do nothing, unless you set always select mode.
871 * - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
872 * every click will make the selected callbacks be called.
873 * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items
874 * entirely and they will neither appear selected nor call selected
875 * callback functions.
877 * @see elm_toolbar_select_mode_get()
882 elm_toolbar_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode);
885 * Get the toolbar select mode.
887 * @param obj The toolbar object
888 * @return The select mode
889 * (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX)
891 * @see elm_toolbar_select_mode_set()
895 EAPI Elm_Object_Select_Mode
896 elm_toolbar_select_mode_get(const Evas_Object *obj);