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
52 * Set toolbar's items display behavior, it can be scrollabel,
54 * Set toolbar's items display behavior, it can be scrollable,
55 >>>>>>> remotes/origin/upstream
56 * show a menu with exceeding items, or simply hide them.
58 * @note Default value is #ELM_TOOLBAR_SHRINK_MENU. It reads value
62 * Values <b> don't </b> work as bitmask, only one can be choosen.
64 * Values <b> don't </b> work as bitmask, only one can be chosen.
65 >>>>>>> remotes/origin/upstream
67 * @see elm_toolbar_shrink_mode_set()
68 * @see elm_toolbar_shrink_mode_get()
75 ELM_TOOLBAR_SHRINK_NONE, /**< Set toolbar minimun size to fit all the items. */
77 ELM_TOOLBAR_SHRINK_NONE, /**< Set toolbar minimum size to fit all the items. */
78 >>>>>>> remotes/origin/upstream
79 ELM_TOOLBAR_SHRINK_HIDE, /**< Hide exceeding items. */
80 ELM_TOOLBAR_SHRINK_SCROLL, /**< Allow accessing exceeding items through a scroller. */
81 ELM_TOOLBAR_SHRINK_MENU, /**< Inserts a button to pop up a menu with exceeding items. */
82 ELM_TOOLBAR_SHRINK_EXPAND, /**< Expand all items according the size of the toolbar. */
83 ELM_TOOLBAR_SHRINK_LAST /**< Indicates error if returned by elm_toolbar_shrink_mode_get() */
84 } Elm_Toolbar_Shrink_Mode;
86 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(). */
89 * Add a new toolbar widget to the given parent Elementary
92 * @param parent The parent object.
93 * @return a new toolbar widget handle or @c NULL, on errors.
95 * This function inserts a new toolbar widget on the canvas.
99 EAPI Evas_Object *elm_toolbar_add(Evas_Object *parent);
102 * Set the icon size, in pixels, to be used by toolbar items.
104 * @param obj The toolbar object
105 * @param icon_size The icon size in pixels
107 * @note Default value is @c 32. It reads value from elm config.
109 * @see elm_toolbar_icon_size_get()
113 EAPI void elm_toolbar_icon_size_set(Evas_Object *obj, int icon_size);
116 * Get the icon size, in pixels, to be used by toolbar items.
118 * @param obj The toolbar object.
119 * @return The icon size in pixels.
121 * @see elm_toolbar_icon_size_set() for details.
125 EAPI int elm_toolbar_icon_size_get(const Evas_Object *obj);
128 * Sets icon lookup order, for toolbar items' icons.
130 * @param obj The toolbar object.
131 * @param order The icon lookup order.
133 * Icons added before calling this function will not be affected.
134 * The default lookup order is #ELM_ICON_LOOKUP_THEME_FDO.
136 * @see elm_toolbar_icon_order_lookup_get()
140 EAPI void elm_toolbar_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order);
143 * Gets the icon lookup order.
145 * @param obj The toolbar object.
146 * @return The icon lookup order.
148 * @see elm_toolbar_icon_order_lookup_set() for details.
152 EAPI Elm_Icon_Lookup_Order elm_toolbar_icon_order_lookup_get(const Evas_Object *obj);
156 * Set whether the toolbar should always have an item selected.
158 * @param obj The toolbar object.
159 * @param wrap @c EINA_TRUE to enable always-select mode or @c EINA_FALSE to
162 * This will cause the toolbar to always have an item selected, and clicking
163 * the selected item will not cause a selected event to be emitted. Enabling this mode
164 * will immediately select the first toolbar item.
166 * Always-selected is disabled by default.
168 * @see elm_toolbar_always_select_mode_get().
172 EAPI void elm_toolbar_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select);
175 * Get whether the toolbar should always have an item selected.
177 * @param obj The toolbar object.
178 * @return @c EINA_TRUE means an item will always be selected, @c EINA_FALSE indicates
179 * that it is possible to have no items selected. If @p obj is @c NULL, @c EINA_FALSE is returned.
181 * @see elm_toolbar_always_select_mode_set() for details.
185 EAPI Eina_Bool elm_toolbar_always_select_mode_get(const Evas_Object *obj);
188 * Set whether the toolbar items' should be selected by the user or not.
190 * @param obj The toolbar object.
191 * @param wrap @c EINA_TRUE to disable selection or @c EINA_FALSE to
194 * This will turn off the ability to select items entirely and they will
195 * neither appear selected nor emit selected signals. The clicked
196 * callback function will still be called.
198 * Selection is enabled by default.
200 * @see elm_toolbar_no_select_mode_get().
204 EAPI void elm_toolbar_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select);
207 * Set whether the toolbar items' should be selected by the user or not.
209 * @param obj The toolbar object.
210 * @return @c EINA_TRUE means items can be selected. @c EINA_FALSE indicates
211 * they can't. If @p obj is @c NULL, @c EINA_FALSE is returned.
213 * @see elm_toolbar_no_select_mode_set() for details.
217 EAPI Eina_Bool elm_toolbar_no_select_mode_get(const Evas_Object *obj);
221 >>>>>>> remotes/origin/upstream
222 * Append item to the toolbar.
224 * @param obj The toolbar object.
225 * @param icon A string with icon name or the absolute path of an image file.
226 * @param label The label of the item.
227 * @param func The function to call when the item is clicked.
228 * @param data The data to associate with the item for related callbacks.
229 * @return The created item or @c NULL upon failure.
231 * A new item will be created and appended to the toolbar, i.e., will
232 * be set as @b last item.
234 * Items created with this method can be deleted with
235 * elm_object_item_del().
237 * Associated @p data can be properly freed when item is deleted if a
238 * callback function is set with elm_object_item_del_cb_set().
241 * If a function is passed as argument, it will be called everytime this item
243 * If a function is passed as argument, it will be called every time this item
244 >>>>>>> remotes/origin/upstream
245 * is selected, i.e., the user clicks over an unselected item.
246 * If such function isn't needed, just passing
247 * @c NULL as @p func is enough. The same should be done for @p data.
249 * Toolbar will load icon image from fdo or current theme.
250 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
251 * If an absolute path is provided it will load it direct from a file.
253 * @see elm_toolbar_item_icon_set()
254 * @see elm_object_item_del()
258 EAPI Elm_Object_Item *elm_toolbar_item_append(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
261 * Prepend item to the toolbar.
263 * @param obj The toolbar object.
264 * @param icon A string with icon name or the absolute path of an image file.
265 * @param label The label of the item.
266 * @param func The function to call when the item is clicked.
267 * @param data The data to associate with the item for related callbacks.
268 * @return The created item or @c NULL upon failure.
270 * A new item will be created and prepended to the toolbar, i.e., will
271 * be set as @b first item.
273 * Items created with this method can be deleted with
274 * elm_object_item_del().
276 * Associated @p data can be properly freed when item is deleted if a
277 * callback function is set with elm_object_item_del_cb_set().
280 * If a function is passed as argument, it will be called everytime this item
282 * If a function is passed as argument, it will be called every time this item
283 >>>>>>> remotes/origin/upstream
284 * is selected, i.e., the user clicks over an unselected item.
285 * If such function isn't needed, just passing
286 * @c NULL as @p func is enough. The same should be done for @p data.
288 * Toolbar will load icon image from fdo or current theme.
289 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
290 * If an absolute path is provided it will load it direct from a file.
292 * @see elm_toolbar_item_icon_set()
293 * @see elm_object_item_del()
297 EAPI Elm_Object_Item *elm_toolbar_item_prepend(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data);
300 * Insert a new item into the toolbar object before item @p before.
302 * @param obj The toolbar object.
303 * @param before The toolbar item to insert before.
304 * @param icon A string with icon name or the absolute path of an image file.
305 * @param label The label of the item.
306 * @param func The function to call when the item is clicked.
307 * @param data The data to associate with the item for related callbacks.
308 * @return The created item or @c NULL upon failure.
310 * A new item will be created and added to the toolbar. Its position in
311 * this toolbar will be just before item @p before.
313 * Items created with this method can be deleted with
314 * elm_object_item_del().
316 * Associated @p data can be properly freed when item is deleted if a
317 * callback function is set with elm_object_item_del_cb_set().
320 * If a function is passed as argument, it will be called everytime this item
322 * If a function is passed as argument, it will be called every time this item
323 >>>>>>> remotes/origin/upstream
324 * is selected, i.e., the user clicks over an unselected item.
325 * If such function isn't needed, just passing
326 * @c NULL as @p func is enough. The same should be done for @p data.
328 * Toolbar will load icon image from fdo or current theme.
329 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
330 * If an absolute path is provided it will load it direct from a file.
332 * @see elm_toolbar_item_icon_set()
333 * @see elm_object_item_del()
337 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);
340 * Insert a new item into the toolbar object after item @p after.
342 * @param obj The toolbar object.
343 * @param after The toolbar item to insert after.
344 * @param icon A string with icon name or the absolute path of an image file.
345 * @param label The label of the item.
346 * @param func The function to call when the item is clicked.
347 * @param data The data to associate with the item for related callbacks.
348 * @return The created item or @c NULL upon failure.
350 * A new item will be created and added to the toolbar. Its position in
351 * this toolbar will be just after item @p after.
353 * Items created with this method can be deleted with
354 * elm_object_item_del().
356 * Associated @p data can be properly freed when item is deleted if a
357 * callback function is set with elm_object_item_del_cb_set().
360 * If a function is passed as argument, it will be called everytime this item
362 * If a function is passed as argument, it will be called every time this item
363 >>>>>>> remotes/origin/upstream
364 * is selected, i.e., the user clicks over an unselected item.
365 * If such function isn't needed, just passing
366 * @c NULL as @p func is enough. The same should be done for @p data.
368 * Toolbar will load icon image from fdo or current theme.
369 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
370 * If an absolute path is provided it will load it direct from a file.
372 * @see elm_toolbar_item_icon_set()
373 * @see elm_object_item_del()
377 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);
380 * Get the first item in the given toolbar widget's list of
383 * @param obj The toolbar object
384 * @return The first item or @c NULL, if it has no items (and on
387 * @see elm_toolbar_item_append()
388 * @see elm_toolbar_last_item_get()
392 EAPI Elm_Object_Item *elm_toolbar_first_item_get(const Evas_Object *obj);
395 * Get the last item in the given toolbar widget's list of
398 * @param obj The toolbar object
399 * @return The last item or @c NULL, if it has no items (and on
402 * @see elm_toolbar_item_prepend()
403 * @see elm_toolbar_first_item_get()
407 EAPI Elm_Object_Item *elm_toolbar_last_item_get(const Evas_Object *obj);
410 * Get the item after @p item in toolbar.
412 * @param it The toolbar item.
413 * @return The item after @p item, or @c NULL if none or on failure.
415 * @note If it is the last item, @c NULL will be returned.
417 * @see elm_toolbar_item_append()
421 EAPI Elm_Object_Item *elm_toolbar_item_next_get(const Elm_Object_Item *it);
424 * Get the item before @p item in toolbar.
427 * @param item The toolbar item.
429 * @param it The toolbar item.
430 >>>>>>> remotes/origin/upstream
431 * @return The item before @p item, or @c NULL if none or on failure.
433 * @note If it is the first item, @c NULL will be returned.
435 * @see elm_toolbar_item_prepend()
439 EAPI Elm_Object_Item *elm_toolbar_item_prev_get(const Elm_Object_Item *it);
442 * Set the priority of a toolbar item.
444 * @param it The toolbar item.
445 * @param priority The item priority. The default is zero.
447 * This is used only when the toolbar shrink mode is set to
448 * #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_HIDE.
449 * When space is less than required, items with low priority
450 * will be removed from the toolbar and added to a dynamically-created menu,
451 * while items with higher priority will remain on the toolbar,
452 * with the same order they were added.
454 * @see elm_toolbar_item_priority_get()
458 EAPI void elm_toolbar_item_priority_set(Elm_Object_Item *it, int priority);
461 * Get the priority of a toolbar item.
463 * @param it The toolbar item.
464 * @return The @p item priority, or @c 0 on failure.
466 * @see elm_toolbar_item_priority_set() for details.
470 EAPI int elm_toolbar_item_priority_get(const Elm_Object_Item *it);
473 * Returns a pointer to a toolbar item by its label.
475 * @param obj The toolbar object.
476 * @param label The label of the item to find.
478 * @return The pointer to the toolbar item matching @p label or @c NULL
483 EAPI Elm_Object_Item *elm_toolbar_item_find_by_label(const Evas_Object *obj, const char *label);
486 * Get whether the @p item is selected or not.
488 * @param it The toolbar item.
489 * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates
490 * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned.
492 * @see elm_toolbar_selected_item_set() for details.
493 * @see elm_toolbar_item_selected_get()
497 EAPI Eina_Bool elm_toolbar_item_selected_get(const Elm_Object_Item *it);
500 * Set the selected state of an item.
502 * @param it The toolbar item
503 * @param selected The selected state
505 * This sets the selected state of the given item @p it.
506 * @c EINA_TRUE for selected, @c EINA_FALSE for not selected.
509 * If a new item is selected the previosly selected will be unselected.
510 * Previoulsy selected item can be get with function
512 * If a new item is selected the previously selected will be unselected.
513 * Previously selected item can be get with function
514 >>>>>>> remotes/origin/upstream
515 * elm_toolbar_selected_item_get().
517 * Selected items will be highlighted.
519 * @see elm_toolbar_item_selected_get()
520 * @see elm_toolbar_selected_item_get()
524 EAPI void elm_toolbar_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
527 * Get the selected item.
529 * @param obj The toolbar object.
530 * @return The selected toolbar item.
532 * The selected item can be unselected with function
533 * elm_toolbar_item_selected_set().
535 * The selected item always will be highlighted on toolbar.
537 * @see elm_toolbar_selected_items_get()
541 EAPI Elm_Object_Item *elm_toolbar_selected_item_get(const Evas_Object *obj);
544 * Set the icon associated with @p item.
547 * @param obj The parent of this item.
549 >>>>>>> remotes/origin/upstream
550 * @param it The toolbar item.
551 * @param icon A string with icon name or the absolute path of an image file.
553 * Toolbar will load icon image from fdo or current theme.
554 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
555 * If an absolute path is provided it will load it direct from a file.
557 * @see elm_toolbar_icon_order_lookup_set()
558 * @see elm_toolbar_icon_order_lookup_get()
562 EAPI void elm_toolbar_item_icon_set(Elm_Object_Item *it, const char *icon);
565 * Get the string used to set the icon of @p item.
567 * @param it The toolbar item.
568 * @return The string associated with the icon object.
570 * @see elm_toolbar_item_icon_set() for details.
574 EAPI const char *elm_toolbar_item_icon_get(const Elm_Object_Item *it);
577 * Get the object of @p item.
579 * @param it The toolbar item.
584 EAPI Evas_Object *elm_toolbar_item_object_get(const Elm_Object_Item *it);
587 * Get the icon object of @p item.
589 * @param it The toolbar item.
590 * @return The icon object
592 * @see elm_toolbar_item_icon_set(), elm_toolbar_item_icon_file_set(),
593 * or elm_toolbar_item_icon_memfile_set() for details.
597 EAPI Evas_Object *elm_toolbar_item_icon_object_get(Elm_Object_Item *it);
600 * Set the icon associated with @p item to an image in a binary buffer.
602 * @param it The toolbar item.
603 * @param img The binary data that will be used as an image
604 * @param size The size of binary data @p img
605 * @param format Optional format of @p img to pass to the image loader
606 * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file)
608 * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
610 * @note The icon image set by this function can be changed by
611 * elm_toolbar_item_icon_set().
615 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);
618 * Set the icon associated with @p item to an image in a binary buffer.
620 * @param it The toolbar item.
621 * @param file The file that contains the image
622 * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file)
624 * @return (@c EINA_TRUE = success, @c EINA_FALSE = error)
626 * @note The icon image set by this function can be changed by
627 * elm_toolbar_item_icon_set().
631 EAPI Eina_Bool elm_toolbar_item_icon_file_set(Elm_Object_Item *it, const char *file, const char *key);
634 * Set or unset item as a separator.
636 * @param it The toolbar item.
638 * @param setting @c EINA_TRUE to set item @p item as separator or
640 * @param separator @c EINA_TRUE to set item @p item as separator or
641 >>>>>>> remotes/origin/upstream
642 * @c EINA_FALSE to unset, i.e., item will be used as a regular item.
644 * Items aren't set as separator by default.
646 * If set as separator it will display separator theme, so won't display
649 * @see elm_toolbar_item_separator_get()
653 EAPI void elm_toolbar_item_separator_set(Elm_Object_Item *it, Eina_Bool separator);
656 * Get a value whether item is a separator or not.
658 * @param it The toolbar item.
659 * @return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE
660 * indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned.
662 * @see elm_toolbar_item_separator_set() for details.
666 EAPI Eina_Bool elm_toolbar_item_separator_get(const Elm_Object_Item *it);
669 * Set the shrink state of toolbar @p obj.
671 * @param obj The toolbar object.
672 * @param shrink_mode Toolbar's items display behavior.
674 * The toolbar won't scroll if #ELM_TOOLBAR_SHRINK_NONE,
676 * but will enforce a minimun size so all the items will fit, won't scroll
678 * but will enforce a minimum size so all the items will fit, won't scroll
679 >>>>>>> remotes/origin/upstream
680 * and won't show the items that don't fit if #ELM_TOOLBAR_SHRINK_HIDE,
681 * will scroll if #ELM_TOOLBAR_SHRINK_SCROLL, and will create a button to
682 * pop up excess elements with #ELM_TOOLBAR_SHRINK_MENU.
686 EAPI void elm_toolbar_shrink_mode_set(Evas_Object *obj, Elm_Toolbar_Shrink_Mode shrink_mode);
689 * Get the shrink mode of toolbar @p obj.
691 * @param obj The toolbar object.
692 * @return Toolbar's items display behavior.
694 * @see elm_toolbar_shrink_mode_set() for details.
698 EAPI Elm_Toolbar_Shrink_Mode elm_toolbar_shrink_mode_get(const Evas_Object *obj);
701 * Enable/disable homogeneous mode.
703 * @param obj The toolbar object
704 * @param homogeneous Assume the items within the toolbar are of the
705 * same size (EINA_TRUE = on, EINA_FALSE = off). Default is @c EINA_FALSE.
707 * This will enable the homogeneous mode where items are of the same size.
708 * @see elm_toolbar_homogeneous_get()
712 EAPI void elm_toolbar_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
715 * Get whether the homogeneous mode is enabled.
717 * @param obj The toolbar object.
718 * @return Assume the items within the toolbar are of the same height
719 * and width (EINA_TRUE = on, EINA_FALSE = off).
721 * @see elm_toolbar_homogeneous_set()
725 EAPI Eina_Bool elm_toolbar_homogeneous_get(const Evas_Object *obj);
728 * Set the parent object of the toolbar items' menus.
730 * @param obj The toolbar object.
731 * @param parent The parent of the menu objects.
733 * Each item can be set as item menu, with elm_toolbar_item_menu_set().
735 * For more details about setting the parent for toolbar menus, see
736 * elm_menu_parent_set().
738 * @see elm_menu_parent_set() for details.
739 * @see elm_toolbar_item_menu_set() for details.
743 EAPI void elm_toolbar_menu_parent_set(Evas_Object *obj, Evas_Object *parent);
746 * Get the parent object of the toolbar items' menus.
748 * @param obj The toolbar object.
749 * @return The parent of the menu objects.
751 * @see elm_toolbar_menu_parent_set() for details.
755 EAPI Evas_Object *elm_toolbar_menu_parent_get(const Evas_Object *obj);
758 * Set the alignment of the items.
760 * @param obj The toolbar object.
761 * @param align The new alignment, a float between <tt> 0.0 </tt>
762 * and <tt> 1.0 </tt>.
764 * Alignment of toolbar items, from <tt> 0.0 </tt> to indicates to align
765 * left, to <tt> 1.0 </tt>, to align to right. <tt> 0.5 </tt> centralize
768 * Centered items by default.
770 * @see elm_toolbar_align_get()
774 EAPI void elm_toolbar_align_set(Evas_Object *obj, double align);
777 * Get the alignment of the items.
779 * @param obj The toolbar object.
780 * @return toolbar items alignment, a float between <tt> 0.0 </tt> and
783 * @see elm_toolbar_align_set() for details.
787 EAPI double elm_toolbar_align_get(const Evas_Object *obj);
790 * Set whether the toolbar item opens a menu.
792 * @param it The toolbar item.
793 * @param menu If @c EINA_TRUE, @p item will opens a menu when selected.
795 * A toolbar item can be set to be a menu, using this function.
797 * Once it is set to be a menu, it can be manipulated through the
798 * menu-like function elm_toolbar_menu_parent_set() and the other
799 * elm_menu functions, using the Evas_Object @c menu returned by
800 * elm_toolbar_item_menu_get().
802 * So, items to be displayed in this item's menu should be added with
803 * elm_menu_item_add().
805 * The following code exemplifies the most basic usage:
807 * tb = elm_toolbar_add(win)
808 * item = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
809 * elm_toolbar_item_menu_set(item, EINA_TRUE);
810 * elm_toolbar_menu_parent_set(tb, win);
811 * menu = elm_toolbar_item_menu_get(item);
812 * elm_menu_item_add(menu, NULL, "edit-cut", "Cut", NULL, NULL);
813 * menu_item = elm_menu_item_add(menu, NULL, "edit-copy", "Copy", NULL,
817 * @see elm_toolbar_item_menu_get()
821 EAPI void elm_toolbar_item_menu_set(Elm_Object_Item *it, Eina_Bool menu);
824 * Get toolbar item's menu.
826 * @param it The toolbar item.
827 * @return Item's menu object or @c NULL on failure.
829 * If @p item wasn't set as menu item with elm_toolbar_item_menu_set(),
830 * this function will set it.
832 * @see elm_toolbar_item_menu_set() for details.
836 EAPI Evas_Object *elm_toolbar_item_menu_get(const Elm_Object_Item *it);
839 * Add a new state to @p item.
841 * @param it The toolbar item.
842 * @param icon A string with icon name or the absolute path of an image file.
843 * @param label The label of the new state.
844 * @param func The function to call when the item is clicked when this
846 * @param data The data to associate with the state.
847 * @return The toolbar item state, or @c NULL upon failure.
849 * Toolbar will load icon image from fdo or current theme.
850 * This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
851 * If an absolute path is provided it will load it direct from a file.
853 * States created with this function can be removed with
854 * elm_toolbar_item_state_del().
856 * @see elm_toolbar_item_state_del()
857 * @see elm_toolbar_item_state_sel()
858 * @see elm_toolbar_item_state_get()
862 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);
866 * Delete a previoulsy added state to @p item.
868 * Delete a previously added state to @p item.
869 >>>>>>> remotes/origin/upstream
871 * @param it The toolbar item.
872 * @param state The state to be deleted.
873 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure.
875 * @see elm_toolbar_item_state_add()
877 EAPI Eina_Bool elm_toolbar_item_state_del(Elm_Object_Item *it, Elm_Toolbar_Item_State *state);
880 * Set @p state as the current state of @p it.
882 * @param it The toolbar item.
883 * @param state The state to use.
884 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure.
886 * If @p state is @c NULL, it won't select any state and the default item's
887 * icon and label will be used. It's the same behaviour than
889 * elm_toolbar_item_state_unser().
891 * elm_toolbar_item_state_unset().
892 >>>>>>> remotes/origin/upstream
894 * @see elm_toolbar_item_state_unset()
898 EAPI Eina_Bool elm_toolbar_item_state_set(Elm_Object_Item *it, Elm_Toolbar_Item_State *state);
901 * Unset the state of @p it.
903 * @param it The toolbar item.
905 * The default icon and label from this item will be displayed.
907 * @see elm_toolbar_item_state_set() for more details.
911 EAPI void elm_toolbar_item_state_unset(Elm_Object_Item *it);
914 * Get the current state of @p it.
916 * @param it The toolbar item.
917 * @return The selected state or @c NULL if none is selected or on failure.
919 * @see elm_toolbar_item_state_set() for details.
920 * @see elm_toolbar_item_state_unset()
921 * @see elm_toolbar_item_state_add()
925 EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_get(const Elm_Object_Item *it);
928 * Get the state after selected state in toolbar's @p item.
930 * @param it The toolbar item to change state.
931 * @return The state after current state, or @c NULL on failure.
933 * If last state is selected, this function will return first state.
935 * @see elm_toolbar_item_state_set()
936 * @see elm_toolbar_item_state_add()
940 EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_next(Elm_Object_Item *it);
943 * Get the state before selected state in toolbar's @p item.
945 * @param it The toolbar item to change state.
946 * @return The state before current state, or @c NULL on failure.
948 * If first state is selected, this function will return last state.
950 * @see elm_toolbar_item_state_set()
951 * @see elm_toolbar_item_state_add()
955 EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_prev(Elm_Object_Item *it);
959 * Change a toolbar's orientation
960 * @param obj The toolbar object
961 * @param horizontal If @c EINA_TRUE, the toolbar is horizontal
962 * By default, a toolbar will be horizontal. Use this function to create a vertical toolbar.
965 EAPI void elm_toolbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
968 * Get a toolbar's orientation
969 * @param obj The toolbar object
970 * @return If @c EINA_TRUE, the toolbar is horizontal
971 * By default, a toolbar will be horizontal. Use this function to determine whether a toolbar is vertical.
974 EAPI Eina_Bool elm_toolbar_horizontal_get(const Evas_Object *obj);
977 * Get the number of items in a toolbar
978 * @param obj The toolbar object
979 * @return The number of items in @p obj toolbar
982 EAPI unsigned int elm_toolbar_items_count(const Evas_Object *obj);
987 * Set the toolbar select mode.
989 * @param obj The toolbar object
990 * @param mode The select mode
992 * elm_toolbar_select_mode_set() changes item select mode in the toolbar widget.
993 * - ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and
994 * callback when first becoming selected. Any further clicks will
995 * do nothing, unless you set always select mode.
996 * - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected,
997 * every click will make the selected callbacks be called.
998 * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items
999 * entirely and they will neither appear selected nor call selected
1000 * callback functions.
1002 * @see elm_toolbar_select_mode_get()
1007 elm_toolbar_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode);
1010 * Get the toolbar select mode.
1012 * @param obj The toolbar object
1013 * @return The select mode
1014 * (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX)
1016 * @see elm_toolbar_select_mode_set()
1020 EAPI Elm_Object_Select_Mode
1021 elm_toolbar_select_mode_get(const Evas_Object *obj);
1023 >>>>>>> remotes/origin/upstream