From b28a93a4aa6921509834def9372474123c323550 Mon Sep 17 00:00:00 2001 From: sanjeev Date: Mon, 27 Feb 2012 08:33:59 +0000 Subject: [PATCH] Add documentation for tooltip. Signed-off-by: Sanjeev BA git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68471 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elm_tooltip.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/lib/elm_tooltip.h b/src/lib/elm_tooltip.h index 7ba1f74..d1fd024 100644 --- a/src/lib/elm_tooltip.h +++ b/src/lib/elm_tooltip.h @@ -31,14 +31,60 @@ EINA_DEPRECATED EAPI Eina_Bool elm_tooltip_delay_set(double delay); EAPI void elm_object_tooltip_show(Evas_Object *obj); EAPI void elm_object_tooltip_hide(Evas_Object *obj); + +/** + * Set the text to be displayed inside the tooltip. + * + * @param obj The tooltip object. + * @param text The text to be displayed. + */ EAPI void elm_object_tooltip_text_set(Evas_Object *obj, const char *text); EAPI void elm_object_tooltip_domain_translatable_text_set(Evas_Object *obj, const char *domain, const char *text); #define elm_object_tooltip_translatable_text_set(obj, text) elm_object_tooltip_domain_translatable_text_set((obj), NULL, (text)) EAPI void elm_object_tooltip_content_cb_set(Evas_Object *obj, Elm_Tooltip_Content_Cb func, const void *data, Evas_Smart_Cb del_cb); EAPI void elm_object_tooltip_unset(Evas_Object *obj); + +/** + * Sets a different style for this object tooltip. + * + * @note before you set a style you should define a tooltip with + * elm_object_tooltip_content_cb_set() or + * elm_object_tooltip_text_set(). + * + * @param obj an object with tooltip already set. + * @param style the theme style to use (default, transparent, ...) + */ EAPI void elm_object_tooltip_style_set(Evas_Object *obj, const char *style); + +/** + * Get the style for this object tooltip. + * + * @param obj an object with tooltip already set. + * @return style the theme style in use, defaults to "default". If the + * object does not have a tooltip set, then NULL is returned. + */ EAPI const char *elm_object_tooltip_style_get(const Evas_Object *obj); + +/** + * @brief Disable size restrictions on an object's tooltip + * @param obj The tooltip's anchor object + * @param disable If EINA_TRUE, size restrictions are disabled + * @return EINA_FALSE on failure, EINA_TRUE on success + * + * This function allows a tooltip to expand beyond its parant window's canvas. + * It will instead be limited only by the size of the display. + */ EAPI Eina_Bool elm_object_tooltip_window_mode_set(Evas_Object *obj, Eina_Bool disable); + +/** + * @brief Retrieve size restriction state of an object's tooltip + * @param obj The tooltip's anchor object + * @return If EINA_TRUE, size restrictions are disabled + * + * This function returns whether a tooltip is allowed to expand beyond + * its parant window's canvas. + * It will instead be limited only by the size of the display. + */ EAPI Eina_Bool elm_object_tooltip_window_mode_get(const Evas_Object *obj); /** -- 2.7.4