Tizen Native API
Functions | Typedefs
Tooltips
Elementary Widgets

Functions

void elm_object_tooltip_show (Evas_Object *obj)
 Force show tooltip of object.
void elm_object_tooltip_hide (Evas_Object *obj)
 Force hide tooltip of object.
void elm_object_tooltip_text_set (Evas_Object *obj, const char *text)
 Set the text to be displayed inside the tooltip.
void elm_object_tooltip_content_cb_set (Evas_Object *obj, Elm_Tooltip_Content_Cb func, const void *data, Evas_Smart_Cb del_cb)
 Set the content to be shown in the tooltip object.
void elm_object_tooltip_unset (Evas_Object *obj)
 Unset tooltip from object.
void elm_object_tooltip_style_set (Evas_Object *obj, const char *style)
 Sets a different style for this object tooltip.
const char * elm_object_tooltip_style_get (const Evas_Object *obj)
 Gets the style for this object tooltip.
Eina_Bool elm_object_tooltip_window_mode_set (Evas_Object *obj, Eina_Bool disable)
 Disables size restrictions on an object's tooltip.
Eina_Bool elm_object_tooltip_window_mode_get (const Evas_Object *obj)
 Retrieves size restriction state of an object's tooltip.

Typedefs

typedef Evas_Object *(* Elm_Tooltip_Content_Cb )(void *data, Evas_Object *obj, Evas_Object *tooltip)
 Called back when a widget's tooltip is activated and needs content.
typedef Evas_Object *(* Elm_Tooltip_Item_Content_Cb )(void *data, Evas_Object *obj, Evas_Object *tooltip, void *item)
 Called back when a widget's item tooltip is activated and needs content.

The Tooltip is an (internal, for now) smart object used to show a content in a frame on mouse hover of objects(or widgets), with tips/information about them.


Typedef Documentation

typedef Evas_Object*(* Elm_Tooltip_Content_Cb)(void *data, Evas_Object *obj, Evas_Object *tooltip)

Called back when a widget's tooltip is activated and needs content.

Since :
2.3
Parameters:
[in]dataThe user-data given to elm_object_tooltip_content_cb_set()
[in]objThe owner widget
[in]tooltipThe tooltip object (affix content to this!)
typedef Evas_Object*(* Elm_Tooltip_Item_Content_Cb)(void *data, Evas_Object *obj, Evas_Object *tooltip, void *item)

Called back when a widget's item tooltip is activated and needs content.

Since :
2.3
Parameters:
[in]dataThe user-data given to elm_object_tooltip_content_cb_set()
[in]objThe owner widget
[in]tooltipThe tooltip object (affix content to this!)
[in]itemThe context dependent item. As an example, if tooltip was set on elm_list item, then it is of this type.

Function Documentation

double elm_config_tooltip_delay_get ( void  )

Gets the duration after which a tooltip is shown.

Since :
2.3
Returns:
The duration after which a tooltip is shown
void elm_config_tooltip_delay_set ( double  delay)

Sets the duration after which a tooltip is shown.

Since :
2.3
Parameters:
[in]delayThe delay duration
Returns:
EINA_TRUE if the value is set, otherwise EINA_FALSE
void elm_object_tooltip_content_cb_set ( Evas_Object obj,
Elm_Tooltip_Content_Cb  func,
const void *  data,
Evas_Smart_Cb  del_cb 
)

Set the content to be shown in the tooltip object.

Since :
2.3
Parameters:
[in]objThe object being attached a tooltip.
[in]funcThe function used to create the tooltip contents.
[in]dataWhat to provide to func as callback data/context.
[in]del_cbFunction called when data is not needed anymore, either when another callback replaces func, the tooltip is unset with elm_object_tooltip_unset() or the owner object obj dies. This callback receives as the first parameter the given data, and event_info is NULL.

Setup the tooltip to object. The object can have only one tooltip, so any previous tooltip data is removed. func(with data) will be called every time that need show the tooltip and it should return a valid Evas_Object. This object is then managed fully by tooltip system and is deleted when the tooltip is gone.

Force hide tooltip of object.

Force hide the tooltip and (re)enable future mouse interations.

Since :
2.3
Parameters:
[in]objTarget object

Force show tooltip of object.

Force show the tooltip and disable hide on mouse_out. If another content is set as tooltip, the visible tooltip will hididen and showed again with new content. This can force show more than one tooltip at a time.

Since :
2.3
Parameters:
[in]objTarget object
const char* elm_object_tooltip_style_get ( const Evas_Object obj)

Gets the style for this object tooltip.

Since :
2.3
Parameters:
[in]objAn object with tooltip already set
Returns:
style The theme style in use, defaults to "default"
If the object does not have a tooltip set, then NULL is returned.
void elm_object_tooltip_style_set ( Evas_Object obj,
const char *  style 
)

Sets a different style for this object tooltip.

Since :
2.3
Remarks:
Before you set a style you should define a tooltip with elm_object_tooltip_content_cb_set() or elm_object_tooltip_text_set().
Parameters:
[in]objan object with tooltip already set
[in]styleThe theme style to use (default, transparent, ...)
void elm_object_tooltip_text_set ( Evas_Object obj,
const char *  text 
)

Set the text to be displayed inside the tooltip.

Since :
2.3
Parameters:
[in]objThe tooltip object
[in]textThe text to be displayed

Unset tooltip from object.

Since :
2.3
Parameters:
[in]objTarget object

Remove tooltip from object. The callback provided as del_cb to elm_object_tooltip_content_cb_set() will be called to notify it is not used anymore.

See also:
elm_object_tooltip_content_cb_set()

Retrieves size restriction state of an object's tooltip.

This function returns whether a tooltip is allowed to expand beyond its parent window's canvas. It will instead be limited only by the size of the display.

Since :
2.3
Parameters:
[in]objThe tooltip's anchor object
Returns:
EINA_TRUE if size restrictions are disabled, otherwise EINA_FALSE

Disables size restrictions on an object's tooltip.

This function allows a tooltip to expand beyond its parent window's canvas. It will instead be limited only by the size of the display.

Since :
2.3
Parameters:
[in]objThe tooltip's anchor object
[in]disableIf EINA_TRUE, size restrictions are disabled, otherwise EINA_FALSE
Returns:
EINA_TRUE on success, otherwise EINA_FALSE on failure

Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause.
For details, see the Content License