The visible signal should be called when it is reloaded in _theme_hook_item.
[framework/uifw/elementary.git] / src / lib / elm_toolbar.h
index a43f1d8..87fda24 100644 (file)
@@ -18,7 +18,8 @@
  *
  * Smart callbacks one can listen to:
  * - "clicked" - when the user clicks on a toolbar item and becomes selected.
- * - "language,changed" - when the program language changes
+ * - "longpressed" - when the toolbar is pressed for a certain amount of time.
+ * - "language,changed" - when the program language changes.
  *
  * Available styles for it:
  * - @c "default"
  * @li "default" - label of the toolbar item
  *
  * Supported elm_object_item common APIs.
- * @li elm_object_item_disabled_set
- * @li elm_object_item_disabled_get
- * @li elm_object_item_part_text_set
- * @li elm_object_item_part_text_get
+ * @li @ref elm_object_item_disabled_set
+ * @li @ref elm_object_item_disabled_get
+ * @li @ref elm_object_item_part_text_set
+ * @li @ref elm_object_item_part_text_get
  *
  * List of examples:
  * @li @ref toolbar_example_01
@@ -67,6 +68,7 @@ typedef enum
    ELM_TOOLBAR_SHRINK_HIDE, /**< Hide exceeding items. */
    ELM_TOOLBAR_SHRINK_SCROLL, /**< Allow accessing exceeding items through a scroller. */
    ELM_TOOLBAR_SHRINK_MENU, /**< Inserts a button to pop up a menu with exceeding items. */
+   ELM_TOOLBAR_SHRINK_EXPAND, /**< Expand all items according the size of the toolbar. */
    ELM_TOOLBAR_SHRINK_LAST /**< Indicates error if returned by elm_toolbar_shrink_mode_get() */
 } Elm_Toolbar_Shrink_Mode;
 
@@ -139,70 +141,6 @@ EAPI void                         elm_toolbar_icon_order_lookup_set(Evas_Object
 EAPI Elm_Icon_Lookup_Order        elm_toolbar_icon_order_lookup_get(const Evas_Object *obj);
 
 /**
- * Set whether the toolbar should always have an item selected.
- *
- * @param obj The toolbar object.
- * @param always_select @c EINA_TRUE to enable always-select mode or @c EINA_FALSE to
- * disable it.
- *
- * This will cause the toolbar to always have an item selected, and clicking
- * the selected item will not cause a selected event to be emitted. Enabling this mode
- * will immediately select the first toolbar item.
- *
- * Always-selected is disabled by default.
- *
- * @see elm_toolbar_always_select_mode_get().
- *
- * @ingroup Toolbar
- */
-EAPI void                         elm_toolbar_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select);
-
-/**
- * Get whether the toolbar should always have an item selected.
- *
- * @param obj The toolbar object.
- * @return @c EINA_TRUE means an item will always be selected, @c EINA_FALSE indicates
- * that it is possible to have no items selected. If @p obj is @c NULL, @c EINA_FALSE is returned.
- *
- * @see elm_toolbar_always_select_mode_set() for details.
- *
- * @ingroup Toolbar
- */
-EAPI Eina_Bool                    elm_toolbar_always_select_mode_get(const Evas_Object *obj);
-
-/**
- * Set whether the toolbar items' should be selected by the user or not.
- *
- * @param obj The toolbar object.
- * @param no_select @c EINA_TRUE to disable selection or @c EINA_FALSE to
- * enable it.
- *
- * This will turn off the ability to select items entirely and they will
- * neither appear selected nor emit selected signals. The clicked
- * callback function will still be called.
- *
- * Selection is enabled by default.
- *
- * @see elm_toolbar_no_select_mode_get().
- *
- * @ingroup Toolbar
- */
-EAPI void                         elm_toolbar_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select);
-
-/**
- * Set whether the toolbar items' should be selected by the user or not.
- *
- * @param obj The toolbar object.
- * @return @c EINA_TRUE means items can be selected. @c EINA_FALSE indicates
- * they can't. If @p obj is @c NULL, @c EINA_FALSE is returned.
- *
- * @see elm_toolbar_no_select_mode_set() for details.
- *
- * @ingroup Toolbar
- */
-EAPI Eina_Bool                    elm_toolbar_no_select_mode_get(const Evas_Object *obj);
-
-/**
  * Append item to the toolbar.
  *
  * @param obj The toolbar object.
@@ -500,6 +438,19 @@ EAPI void                         elm_toolbar_item_selected_set(Elm_Object_Item
 EAPI Elm_Object_Item             *elm_toolbar_selected_item_get(const Evas_Object *obj);
 
 /**
+ * Get the more item.
+ *
+ * @param obj The toolbar object.
+ * @return The toolbar more item.
+ *
+ * The more item can be changed with function
+ * elm_object_item_text_set() and elm_object_item_content_set.
+ *
+ * @ingroup Toolbar
+ */
+EAPI Elm_Object_Item             *elm_toolbar_more_item_get(const Evas_Object *obj);
+
+/**
  * Set the icon associated with @p item.
  *
  * @param it The toolbar item.
@@ -893,7 +844,6 @@ EAPI Elm_Toolbar_Item_State      *elm_toolbar_item_state_next(Elm_Object_Item *i
  */
 EAPI Elm_Toolbar_Item_State      *elm_toolbar_item_state_prev(Elm_Object_Item *it);
 
-
 /**
  * Change a toolbar's orientation
  * @param obj The toolbar object
@@ -919,6 +869,69 @@ EAPI Eina_Bool                    elm_toolbar_horizontal_get(const Evas_Object *
  * @ingroup Toolbar
  */
 EAPI unsigned int                 elm_toolbar_items_count(const Evas_Object *obj);
+
+/**
+ * Set the standard priority of visible items in a toolbar
+ * @param obj The toolbar object
+ * @param priority The standard_priority of visible items
+ *
+ * When it is the ELM_TOOLBAR_SHRINK_EXPAND mode, the items are shown only up to standard priority.
+ * The other items are located in more panel. The more panel can be shown when the more item is clicked.
+ *
+ * @see elm_toolbar_standard_priority_get()
+ *
+ * @ingroup Toolbar
+ */
+EAPI void                         elm_toolbar_standard_priority_set(Evas_Object *obj, int priority);
+
+/**
+ * Get the standard_priority of visible items in a toolbar
+ * @param obj The toolbar object
+ * @return The standard priority of items in @p obj toolbar
+ *
+ * @see elm_toolbar_standard_priority_set()
+ *
+ * @ingroup Toolbar
+ */
+EAPI int                          elm_toolbar_standard_priority_get(const Evas_Object *obj);
+
+/**
+ * Set the toolbar select mode.
+ *
+ * @param obj The toolbar object
+ * @param mode The select mode
+ *
+ * elm_toolbar_select_mode_set() changes item select mode in the toolbar widget.
+ * - ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and
+ *      callback when first becoming selected. Any further clicks will
+ *      do nothing, unless you set always select mode.
+ * - ELM_OBJECT_SELECT_MODE_ALWAYS :  This means that, even if selected,
+ *      every click will make the selected callbacks be called.
+ * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items
+ *      entirely and they will neither appear selected nor call selected
+ *      callback functions.
+ *
+ * @see elm_toolbar_select_mode_get()
+ *
+ * @ingroup Toolbar
+ */
+EAPI void
+elm_toolbar_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode);
+
+/**
+ * Get the toolbar select mode.
+ *
+ * @param obj The toolbar object
+ * @return The select mode
+ * (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX)
+ *
+ * @see elm_toolbar_select_mode_set()
+ *
+ * @ingroup Toolbar
+ */
+EAPI Elm_Object_Select_Mode
+elm_toolbar_select_mode_get(const Evas_Object *obj);
+
 /**
  * @}
  */