{
public:
/**
- * @brief A constructor for an UiStandardView.
+ * @brief A constructor for an UiTabView.
*
* @param name view name.
*/
///Destructor.
virtual ~UiTabView();
+ /**
+ * @brief Adds new tab item in tab view.
+ *
+ * @remarks The value specified by id is the index that points to item.
+ *
+ * @param[in] id tab view item index
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_NONE Successful
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ * @retval #UI_VIEWMGR_ERROR_OUT_OF_MEMORY Fail to create new instance
+ *
+ * @see removeTab()
+ */
int addTab(int id);
+ /**
+ * @brief Sets icon of the tab item.
+ *
+ * @param[in] id tab view item index
+ * @param[in] icon path of the icon file
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_NONE Successful
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ *
+ * @see getTabIcon()
+ * @see unsetTabIcon()
+ */
int setTabIcon(int id, const char *icon);
+ /**
+ * @brief Sets label of the tab item.
+ *
+ * @param[in] id tab view item index
+ * @param[in] label The label in the tab item area
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_NONE Successful
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ *
+ * @see getTabLabel()
+ * @see unsetTabLabel()
+ */
int setTabLabel(int id, const char *label);
+ /**
+ * @brief Sets content of the tab item.
+ *
+ * @param[in] id tab view item index
+ * @param[in] content A new content. It allows @c nullptr for canceling the previous content
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_NONE Successful
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ *
+ * @see getTabContent()
+ * @see unsetTabContent()
+ */
int setTabContent(int id, Eo *content);
+ /**
+ * @brief Gets icon of the tab item.
+ *
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] id tab view item index
+ *
+ * @return icon path of the tab item
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see setTabIcon()
+ * @see unsetTabIcon()
+ * @see get_last_result()
+ */
const char *getTabIcon(int id);
+ /**
+ * @brief Gets label of the tab item.
+ *
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] id tab view item index
+ *
+ * @return label of the tab item
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see setTabLabel()
+ * @see unsetTabLabel()
+ * @see get_last_result()
+ */
const char *getTabLabel(int id);
+ /**
+ * @brief Gets content of the tab item.
+ *
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] id tab view item index
+ *
+ * @return content of the tab item
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see setTabContent()
+ * @see unsetTabContent()
+ * @see get_last_result()
+ */
Eo *getTabContent(int id);
+ /**
+ * @brief Unsets icon of the tab item.
+ *
+ * @remarks The tab view height will be shrunk, If there is no icon in the tab item list.
+ * The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] id tab view item index
+ *
+ * @return A previous icon. If it wasn't, return @c NULL
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see setTabIcon()
+ * @see getTabIcon()
+ * @see get_last_result()
+ */
const char *unsetTabIcon(int id);
+ /**
+ * @brief Unsets label of the tab item.
+ *
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] id tab view item index
+ *
+ * @return A previous label. If it wasn't, return @c NULL
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see setTabLabel()
+ * @see getTabLabel()
+ * @see get_last_result()
+ */
const char *unsetTabLabel(int id);
+ /**
+ * @brief Unsets content of the tab item.
+ *
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] id tab view item index
+ *
+ * @return A previous content. If it wasn't, return @c NULL
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see setTabContent()
+ * @see unsetTabContent()
+ * @see get_last_result()
+ */
Eo *unsetTabContent(int id);
+ /**
+ * @brief Gets selected tab item id.
+ *
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @return selected tab item's id, otherwise -1 in error case
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_NOT_PERMITTED The selected tab item is not exist
+ *
+ * @see selectTab()
+ * @see get_last_result()
+ */
int getSelectedTab();
- int removeTab(int id);
-
+ /**
+ * @brief Sets selected given tab item.
+ *
+ * @param[in] id tab view item index
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_NONE Successful
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ *
+ * @see getSelectedTab()
+ */
int selectTab(int id);
/**
+ * @brief Removes tab item.
+ *
+ * @param[in] id tab view item index
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_NONE Successful
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ *
+ * @see addTab()
+ */
+ int removeTab(int id);
+
+ /**
* @brief Get a base layout of viewmgr.
*
* @return viewmgr's base layout object.
virtual Eo *getBase() const override;
protected:
-
+ /**
+ * @brief tab item activated.
+ *
+ * @param[in] id tab view item index
+ *
+ * @see tabDeactivated()
+ */
virtual void tabActivated(int id);
+ /**
+ * @brief tab item deactivated.
+ *
+ * @param[in] id tab view item index
+ *
+ * @see tabactivated()
+ */
virtual void tabDeactivated(int id);
/**
extern "C" {
#endif
+/**
+ * @defgroup CAPI_UI_TAB_VIEW UI Tab View
+ * @ingroup CAPI_UI_VIEWMGR_MODULE
+ * @brief This module provides functionalities about ui_tab_view.
+ * @{
+ */
+
+/**
+ * @brief The ui_tab_view event callback function signature.
+ * @since_tizen 3.0
+ *
+ * @param[in] view An ui_tab_view instance
+ * @param[in] id tab view item index
+ * @param[in] user_data The user data to be passed to the given @a event_callback functions
+ *
+ * @see ui_tab_view_event_type_e
+ * @see ui_tab_view_set_event_cb
+ */
typedef void (*ui_tab_view_event_cb)(ui_tab_view *view, int id, void *user_data);
+/**
+ * @brief Enumeration for ui_tab_view event type.
+ * @since_tizen 3.0
+ */
typedef enum
{
- UI_TAB_ACTIVATED = 0,
- UI_TAB_DEACTIVATED
+ UI_TAB_ACTIVATED = 0, /**< Tab Activated */
+ UI_TAB_DEACTIVATED /**< Tab Deactivated */
} ui_tab_view_event_type_e;
+/**
+ * @brief Creates an ui_tab_view.
+ * @since_tizen 3.0
+ * @remarks if you don't set a view name, you could not look up the view with it's name.
+ * The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] name view name
+ *
+ * @return The ui_tab_view instance. NULL if failed
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_OUT_OF_MEMORY Fail to create new instance
+ *
+ * @see ui_view_destroy()
+ * @see ui_viewmgr_get_view_by_name()
+ * @see get_last_result()
+ */
EAPI ui_tab_view *ui_tab_view_create(const char *name);
+/**
+ * @brief Sets callback functions for handling tab view events.
+ * @since_tizen 3.0
+ * @remarks To unset the events, you can pass @c NULL to @a event_cb.
+ *
+ * @param[in] view An ui_tab_view instance
+ * @param[in] event_type ui_tab_view event type
+ * @param[in] event_cb The set of callback functions to handle view events
+ * @param[in] user_data The user data to be passed to the given @a event_callback functions
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_NONE Successful
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ *
+ * @see ui_tab_view_event_type_e
+ */
EAPI int ui_tab_view_set_event_cb(ui_tab_view *view, ui_tab_view_event_type_e event_type, ui_tab_view_event_cb event_cb, void *user_data);
+/**
+ * @brief Adds new tab item in tab view.
+ * @since_tizen 3.0
+ * @remarks The value specified by id is the index that points to item.
+ *
+ * @param[in] view An ui_tab_view instance
+ * @param[in] id tab view item index
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_NONE Successful
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ * @retval #UI_VIEWMGR_ERROR_OUT_OF_MEMORY Fail to create new instance
+ *
+ * @see ui_tab_view_remove_tab()
+ */
EAPI int ui_tab_view_add_tab(ui_tab_view *view, int id);
+/**
+ * @brief Sets icon of the tab item.
+ * @since_tizen 3.0
+ *
+ * @param[in] view An ui_tab_view instance
+ * @param[in] id tab view item index
+ * @param[in] icon path of the icon file
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_NONE Successful
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ *
+ * @see ui_tab_view_get_icon()
+ * @see ui_tab_view_unset_icon()
+ */
EAPI int ui_tab_view_set_tab_icon(ui_tab_view *view, int id, const char *icon);
+/**
+ * @brief Sets label of the tab item.
+ * @since_tizen 3.0
+ *
+ * @param[in] view An ui_tab_view instance
+ * @param[in] id tab view item index
+ * @param[in] label The label in the tab item area
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_NONE Successful
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ *
+ * @see ui_tab_view_get_label()
+ * @see ui_tab_view_unset_label()
+ */
EAPI int ui_tab_view_set_tab_label(ui_tab_view *view, int id, const char *label);
+/**
+ * @brief Sets content of the tab item.
+ * @since_tizen 3.0
+ *
+ * @param[in] view An ui_tab_view instance
+ * @param[in] id tab view item index
+ * @param[in] content A new content. It allows @c NULL for canceling the previous content
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_NONE Successful
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ *
+ * @see ui_tab_view_get_content()
+ * @see ui_tab_view_unset_content()
+ */
EAPI int ui_tab_view_set_tab_content(ui_tab_view *view, int id, Eo *content);
+/**
+ * @brief Gets icon of the tab item.
+ * @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] view An ui_tab_view instance
+ * @param[in] id tab view item index
+ *
+ * @return icon path of the tab item
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see ui_tab_view_set_icon()
+ * @see ui_tab_view_unset_icon()
+ * @see get_last_result()
+ */
EAPI const char *ui_tab_view_get_tab_icon(ui_tab_view *view, int id);
+/**
+ * @brief Gets label of the tab item.
+ * @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] view An ui_tab_view instance
+ * @param[in] id tab view item index
+ *
+ * @return label of the tab item
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see ui_tab_view_set_label()
+ * @see ui_tab_view_unset_label()
+ * @see get_last_result()
+ */
EAPI const char *ui_tab_view_get_tab_label(ui_tab_view *view,int id);
+/**
+ * @brief Gets content of the tab item.
+ * @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] view An ui_tab_view instance
+ * @param[in] id tab view item index
+ *
+ * @return content of the tab item
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see ui_tab_view_set_content()
+ * @see ui_tab_view_unset_content()
+ * @see get_last_result()
+ */
EAPI Eo *ui_tab_view_get_tab_content(ui_tab_view *view, int id);
+/**
+ * @brief Unsets icon of the tab item.
+ * @since_tizen 3.0
+ * @remarks The tab view height will be shrunk, If there is no icon in the tab item list.
+ * The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] view An ui_tab_view instance
+ * @param[in] id tab view item index
+ *
+ * @return A previous icon. If it wasn't, return @c NULL
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see ui_tab_view_get_icon()
+ * @see ui_tab_view_set_icon()
+ * @see get_last_result()
+ */
EAPI const char *ui_tab_view_unset_tab_icon(ui_tab_view *view, int id);
+/**
+ * @brief Unsets label of the tab item.
+ * @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] view An ui_tab_view instance
+ * @param[in] id tab view item index
+ *
+ * @return A previous label. If it wasn't, return @c NULL
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see ui_tab_view_get_label()
+ * @see ui_tab_view_set_label()
+ * @see get_last_result()
+ */
EAPI const char *ui_tab_view_unset_tab_label(ui_tab_view *view, int id);
+/**
+ * @brief Unsets content of the tab item.
+ * @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] view An ui_tab_view instance
+ * @param[in] id tab view item index
+ *
+ * @return A previous content. If it wasn't, return @c NULL
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_INVALID_PARAMETER @a view is invalid
+ *
+ * @see ui_tab_view_get_content()
+ * @see ui_tab_view_set_content()
+ * @see get_last_result()
+ */
EAPI Eo *ui_tab_view_unset_tab_content(ui_tab_view *view, int id);
+/**
+ * @brief Gets selected tab item id.
+ * @since_tizen 3.0
+ * @remarks The specific error code can be obtained using the get_last_result() method.
+ * Error codes are described in Exception section.
+ *
+ * @param[in] view An ui_tab_view instance
+ *
+ * @return selected tab item's id, otherwise -1 in error case
+ * @exception #UI_VIEWMGR_ERROR_NONE Successfully added
+ * @exception #UI_VIEWMGR_ERROR_NOT_PERMITTED The selected tab item is not exist
+ *
+ * @see ui_tab_view_select_tab()
+ * @see get_last_result()
+ */
EAPI int ui_tab_view_get_selected_tab(ui_tab_view *view);
-EAPI int ui_tab_view_remove_tab(ui_tab_view *view, int id);
-
+/**
+ * @brief Sets selected given tab item.
+ * @since_tizen 3.0
+ *
+ * @param[in] view An ui_tab_view instance
+ * @param[in] id tab view item index
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_NONE Successful
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ *
+ * @see ui_tab_view_get_selected_tab()
+ */
EAPI int ui_tab_view_select_tab(ui_tab_view *view, int id);
+/**
+ * @brief Removes tab item.
+ * @since_tizen 3.0
+ *
+ * @param[in] view An ui_tab_view instance
+ * @param[in] id tab view item index
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #UI_VIEWMGR_ERROR_NONE Successful
+ * @retval #UI_VIEWMGR_ERROR_INVALID_PARAMETER if @a view is invalid
+ *
+ * @see ui_tab_view_add_tab()
+ */
+EAPI int ui_tab_view_remove_tab(ui_tab_view *view, int id);
+
#ifdef __cplusplus
}
#endif