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);
443 * @param obj The toolbar object.
444 * @return The toolbar more item.
446 * The more item can be changed with function
447 * elm_object_item_text_set() and elm_object_item_content_set.
451 EAPI Elm_Object_Item *elm_toolbar_more_item_get(const Evas_Object *obj);
454 * Set the icon associated with @p item.
456 * @param it The toolbar item.
457 * @param icon A string with icon name or the absolute path of an image file.
459 * Toolbar will load icon image from fdo or current theme.
460 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
461 * If an absolute path is provided it will load it direct from a file.
463 * @see elm_toolbar_icon_order_lookup_set()
464 * @see elm_toolbar_icon_order_lookup_get()
468 EAPI void elm_toolbar_item_icon_set(Elm_Object_Item *it, const char *icon);
471 * Get the string used to set the icon of @p item.
473 * @param it The toolbar item.
474 * @return The string associated with the icon object.
476 * @see elm_toolbar_item_icon_set() for details.
480 EAPI const char *elm_toolbar_item_icon_get(const Elm_Object_Item *it);
483 * Get the object of @p item.
485 * @param it The toolbar item.
490 EAPI Evas_Object *elm_toolbar_item_object_get(const Elm_Object_Item *it);
493 * Get the icon object of @p item.
495 * @param it The toolbar item.
496 * @return The icon object
498 * @see elm_toolbar_item_icon_set(), elm_toolbar_item_icon_file_set(),
499 * or elm_toolbar_item_icon_memfile_set() for details.
503 EAPI Evas_Object *elm_toolbar_item_icon_object_get(Elm_Object_Item *it);
506 * Set the icon associated with @p item to an image in a binary buffer.
508 * @param it The toolbar item.
509 * @param img The binary data that will be used as an image
510 * @param size The size of binary data @p img
511 * @param format Optional format of @p img to pass to the image loader
512 * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file)
514 * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
516 * @note The icon image set by this function can be changed by
517 * elm_toolbar_item_icon_set().
521 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);
524 * Set the icon associated with @p item to an image in a binary buffer.
526 * @param it The toolbar item.
527 * @param file The file that contains the image
528 * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file)
530 * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
532 * @note The icon image set by this function can be changed by
533 * elm_toolbar_item_icon_set().
537 EAPI Eina_Bool elm_toolbar_item_icon_file_set(Elm_Object_Item *it, const char *file, const char *key);
540 * Set or unset item as a separator.
542 * @param it The toolbar item.
543 * @param separator @c EINA_TRUE to set item @p item as separator or
544 * @c EINA_FALSE to unset, i.e., item will be used as a regular item.
546 * Items aren't set as separator by default.
548 * If set as separator it will display separator theme, so won't display
551 * @see elm_toolbar_item_separator_get()
555 EAPI void elm_toolbar_item_separator_set(Elm_Object_Item *it, Eina_Bool separator);
558 * Get a value whether item is a separator or not.
560 * @param it The toolbar item.
561 * @return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE
562 * indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned.
564 * @see elm_toolbar_item_separator_set() for details.
568 EAPI Eina_Bool elm_toolbar_item_separator_get(const Elm_Object_Item *it);
571 * Set the shrink state of toolbar @p obj.
573 * @param obj The toolbar object.
574 * @param shrink_mode Toolbar's items display behavior.
576 * The toolbar won't scroll if #ELM_TOOLBAR_SHRINK_NONE,
577 * but will enforce a minimum size so all the items will fit, won't scroll
578 * and won't show the items that don't fit if #ELM_TOOLBAR_SHRINK_HIDE,
579 * will scroll if #ELM_TOOLBAR_SHRINK_SCROLL, and will create a button to
580 * pop up excess elements with #ELM_TOOLBAR_SHRINK_MENU.
584 EAPI void elm_toolbar_shrink_mode_set(Evas_Object *obj, Elm_Toolbar_Shrink_Mode shrink_mode);
587 * Get the shrink mode of toolbar @p obj.
589 * @param obj The toolbar object.
590 * @return Toolbar's items display behavior.
592 * @see elm_toolbar_shrink_mode_set() for details.
596 EAPI Elm_Toolbar_Shrink_Mode elm_toolbar_shrink_mode_get(const Evas_Object *obj);
599 * Enable/disable homogeneous mode.
601 * @param obj The toolbar object
602 * @param homogeneous Assume the items within the toolbar are of the
603 * same size (EINA_TRUE = on, EINA_FALSE = off). Default is @c EINA_FALSE.
605 * This will enable the homogeneous mode where items are of the same size.
606 * @see elm_toolbar_homogeneous_get()
610 EAPI void elm_toolbar_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
613 * Get whether the homogeneous mode is enabled.
615 * @param obj The toolbar object.
616 * @return Assume the items within the toolbar are of the same height
617 * and width (EINA_TRUE = on, EINA_FALSE = off).
619 * @see elm_toolbar_homogeneous_set()
623 EAPI Eina_Bool elm_toolbar_homogeneous_get(const Evas_Object *obj);
626 * Set the parent object of the toolbar items' menus.
628 * @param obj The toolbar object.
629 * @param parent The parent of the menu objects.
631 * Each item can be set as item menu, with elm_toolbar_item_menu_set().
633 * For more details about setting the parent for toolbar menus, see
634 * elm_menu_parent_set().
636 * @see elm_menu_parent_set() for details.
637 * @see elm_toolbar_item_menu_set() for details.
641 EAPI void elm_toolbar_menu_parent_set(Evas_Object *obj, Evas_Object *parent);
644 * Get the parent object of the toolbar items' menus.
646 * @param obj The toolbar object.
647 * @return The parent of the menu objects.
649 * @see elm_toolbar_menu_parent_set() for details.
653 EAPI Evas_Object *elm_toolbar_menu_parent_get(const Evas_Object *obj);
656 * Set the alignment of the items.
658 * @param obj The toolbar object.
659 * @param align The new alignment, a float between <tt> 0.0 </tt>
660 * and <tt> 1.0 </tt>.
662 * Alignment of toolbar items, from <tt> 0.0 </tt> to indicates to align
663 * left, to <tt> 1.0 </tt>, to align to right. <tt> 0.5 </tt> centralize
666 * Centered items by default.
668 * @see elm_toolbar_align_get()
672 EAPI void elm_toolbar_align_set(Evas_Object *obj, double align);
675 * Get the alignment of the items.
677 * @param obj The toolbar object.
678 * @return toolbar items alignment, a float between <tt> 0.0 </tt> and
681 * @see elm_toolbar_align_set() for details.
685 EAPI double elm_toolbar_align_get(const Evas_Object *obj);
688 * Set whether the toolbar item opens a menu.
690 * @param it The toolbar item.
691 * @param menu If @c EINA_TRUE, @p item will opens a menu when selected.
693 * A toolbar item can be set to be a menu, using this function.
695 * Once it is set to be a menu, it can be manipulated through the
696 * menu-like function elm_toolbar_menu_parent_set() and the other
697 * elm_menu functions, using the Evas_Object @c menu returned by
698 * elm_toolbar_item_menu_get().
700 * So, items to be displayed in this item's menu should be added with
701 * elm_menu_item_add().
703 * The following code exemplifies the most basic usage:
705 * tb = elm_toolbar_add(win)
706 * item = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
707 * elm_toolbar_item_menu_set(item, EINA_TRUE);
708 * elm_toolbar_menu_parent_set(tb, win);
709 * menu = elm_toolbar_item_menu_get(item);
710 * elm_menu_item_add(menu, NULL, "edit-cut", "Cut", NULL, NULL);
711 * menu_item = elm_menu_item_add(menu, NULL, "edit-copy", "Copy", NULL,
715 * @see elm_toolbar_item_menu_get()
719 EAPI void elm_toolbar_item_menu_set(Elm_Object_Item *it, Eina_Bool menu);
722 * Get toolbar item's menu.
724 * @param it The toolbar item.
725 * @return Item's menu object or @c NULL on failure.
727 * If @p item wasn't set as menu item with elm_toolbar_item_menu_set(),
728 * this function will set it.
730 * @see elm_toolbar_item_menu_set() for details.
734 EAPI Evas_Object *elm_toolbar_item_menu_get(const Elm_Object_Item *it);
737 * Add a new state to @p item.
739 * @param it The toolbar item.
740 * @param icon A string with icon name or the absolute path of an image file.
741 * @param label The label of the new state.
742 * @param func The function to call when the item is clicked when this
744 * @param data The data to associate with the state.
745 * @return The toolbar item state, or @c NULL upon failure.
747 * Toolbar will load icon image from fdo or current theme.
748 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
749 * If an absolute path is provided it will load it direct from a file.
751 * States created with this function can be removed with
752 * elm_toolbar_item_state_del().
754 * @see elm_toolbar_item_state_del()
755 * @see elm_toolbar_item_state_sel()
756 * @see elm_toolbar_item_state_get()
760 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);
763 * Delete a previously added state to @p item.
765 * @param it The toolbar item.
766 * @param state The state to be deleted.
767 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure.
769 * @see elm_toolbar_item_state_add()
771 EAPI Eina_Bool elm_toolbar_item_state_del(Elm_Object_Item *it, Elm_Toolbar_Item_State *state);
774 * Set @p state as the current state of @p it.
776 * @param it The toolbar item.
777 * @param state The state to use.
778 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure.
780 * If @p state is @c NULL, it won't select any state and the default item's
781 * icon and label will be used. It's the same behaviour than
782 * elm_toolbar_item_state_unset().
784 * @see elm_toolbar_item_state_unset()
788 EAPI Eina_Bool elm_toolbar_item_state_set(Elm_Object_Item *it, Elm_Toolbar_Item_State *state);
791 * Unset the state of @p it.
793 * @param it The toolbar item.
795 * The default icon and label from this item will be displayed.
797 * @see elm_toolbar_item_state_set() for more details.
801 EAPI void elm_toolbar_item_state_unset(Elm_Object_Item *it);
804 * Get the current state of @p it.
806 * @param it The toolbar item.
807 * @return The selected state or @c NULL if none is selected or on failure.
809 * @see elm_toolbar_item_state_set() for details.
810 * @see elm_toolbar_item_state_unset()
811 * @see elm_toolbar_item_state_add()
815 EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_get(const Elm_Object_Item *it);
818 * Get the state after selected state in toolbar's @p item.
820 * @param it The toolbar item to change state.
821 * @return The state after current state, or @c NULL on failure.
823 * If last state is selected, this function will return first state.
825 * @see elm_toolbar_item_state_set()
826 * @see elm_toolbar_item_state_add()
830 EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_next(Elm_Object_Item *it);
833 * Get the state before selected state in toolbar's @p item.
835 * @param it The toolbar item to change state.
836 * @return The state before current state, or @c NULL on failure.
838 * If first state is selected, this function will return last state.
840 * @see elm_toolbar_item_state_set()
841 * @see elm_toolbar_item_state_add()
845 EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_prev(Elm_Object_Item *it);
848 * Change a toolbar's orientation
849 * @param obj The toolbar object
850 * @param horizontal If @c EINA_TRUE, the toolbar is horizontal
851 * By default, a toolbar will be horizontal. Use this function to create a vertical toolbar.
854 EAPI void elm_toolbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
857 * Get a toolbar's orientation
858 * @param obj The toolbar object
859 * @return If @c EINA_TRUE, the toolbar is horizontal
860 * By default, a toolbar will be horizontal. Use this function to determine whether a toolbar is vertical.
863 EAPI Eina_Bool elm_toolbar_horizontal_get(const Evas_Object *obj);
866 * Get the number of items in a toolbar
867 * @param obj The toolbar object
868 * @return The number of items in @p obj toolbar
871 EAPI unsigned int elm_toolbar_items_count(const Evas_Object *obj);
874 * Set the standard priority of visible items in a toolbar
875 * @param obj The toolbar object
876 * @param priority The standard_priority of visible items
878 * When it is the ELM_TOOLBAR_SHRINK_EXPAND mode, the items are shown only up to standard priority.
879 * The other items are located in more panel. The more panel can be shown when the more item is clicked.
881 * @see elm_toolbar_standard_priority_get()
885 EAPI void elm_toolbar_standard_priority_set(Evas_Object *obj, int priority);
888 * Get the standard_priority of visible items in a toolbar
889 * @param obj The toolbar object
890 * @return The standard priority of items in @p obj toolbar
892 * @see elm_toolbar_standard_priority_set()
896 EAPI int elm_toolbar_standard_priority_get(const Evas_Object *obj);
899 * Set the toolbar select mode.
901 * @param obj The toolbar object
902 * @param mode The select mode
904 * elm_toolbar_select_mode_set() changes item select mode in the toolbar widget.
905 * - ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and
906 * callback when first becoming selected. Any further clicks will
907 * do nothing, unless you set always select mode.
908 * - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
909 * every click will make the selected callbacks be called.
910 * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items
911 * entirely and they will neither appear selected nor call selected
912 * callback functions.
914 * @see elm_toolbar_select_mode_get()
919 elm_toolbar_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode);
922 * Get the toolbar select mode.
924 * @param obj The toolbar object
925 * @return The select mode
926 * (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX)
928 * @see elm_toolbar_select_mode_set()
932 EAPI Elm_Object_Select_Mode
933 elm_toolbar_select_mode_get(const Evas_Object *obj);