Macros | Typedefs | Enumerations | Functions
Tooltips

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. More...

Macros

#define elm_object_tooltip_translatable_text_set(obj, text)   elm_object_tooltip_domain_translatable_text_set((obj), NULL, (text))
 

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. More...
 
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. More...
 

Enumerations

enum  Elm_Tooltip_Orient {
  ELM_TOOLTIP_ORIENT_NONE = 0 ,
  ELM_TOOLTIP_ORIENT_TOP_LEFT ,
  ELM_TOOLTIP_ORIENT_TOP ,
  ELM_TOOLTIP_ORIENT_TOP_RIGHT ,
  ELM_TOOLTIP_ORIENT_LEFT ,
  ELM_TOOLTIP_ORIENT_CENTER ,
  ELM_TOOLTIP_ORIENT_RIGHT ,
  ELM_TOOLTIP_ORIENT_BOTTOM_LEFT ,
  ELM_TOOLTIP_ORIENT_BOTTOM ,
  ELM_TOOLTIP_ORIENT_BOTTOM_RIGHT ,
  ELM_TOOLTIP_ORIENT_LAST
}
 Possible orient values for tooltip. More...
 

Functions

void elm_object_tooltip_move_freeze_push (Evas_Object *obj)
 This increments the tooltip movement freeze count by one. More...
 
void elm_object_tooltip_move_freeze_pop (Evas_Object *obj)
 This decrements the tooltip freeze count by one. More...
 
int elm_object_tooltip_move_freeze_get (const Evas_Object *obj)
 Get the movement freeze count. More...
 
void elm_object_tooltip_orient_set (Evas_Object *obj, Elm_Tooltip_Orient orient)
 Sets the orientation of the tooltip around the owner region. More...
 
Elm_Tooltip_Orient elm_object_tooltip_orient_get (const Evas_Object *obj)
 Returns the orientation of Tooltip. More...
 
void elm_object_tooltip_show (Evas_Object *obj)
 Force show tooltip of object. More...
 
void elm_object_tooltip_hide (Evas_Object *obj)
 Force hide tooltip of object. More...
 
void elm_object_tooltip_text_set (Evas_Object *obj, const char *text)
 Set the text to be displayed inside the tooltip. More...
 
void elm_object_tooltip_domain_translatable_text_set (Evas_Object *obj, const char *domain, const char *text)
 
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. More...
 
void elm_object_tooltip_unset (Evas_Object *obj)
 Unset tooltip from object. More...
 
void elm_object_tooltip_style_set (Evas_Object *obj, const char *style)
 Set a different style for this object tooltip. More...
 
const char * elm_object_tooltip_style_get (const Evas_Object *obj)
 Get the style for this object tooltip. More...
 
Eina_Bool elm_object_tooltip_window_mode_set (Evas_Object *obj, Eina_Bool disable)
 Disable size restrictions on an object's tooltip. More...
 
Eina_Bool elm_object_tooltip_window_mode_get (const Evas_Object *obj)
 Get size restriction state of an object's tooltip. More...
 
double elm_config_tooltip_delay_get (void)
 Get the duration after which tooltip will be shown. More...
 
void elm_config_tooltip_delay_set (double delay)
 Set the duration after which tooltip will be shown. More...
 

Detailed Description

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

◆ Elm_Tooltip_Content_Cb

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.

Parameters
datauser-data given to elm_object_tooltip_content_cb_set()
objowner widget.
tooltipThe tooltip object (affix content to this!)

◆ Elm_Tooltip_Item_Content_Cb

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.

Parameters
datauser-data given to elm_object_tooltip_content_cb_set()
objowner widget.
tooltipThe tooltip object (affix content to this!)
itemcontext dependent item. As an example, if tooltip was set on elm_list item, then it is of this type.

Enumeration Type Documentation

◆ Elm_Tooltip_Orient

Possible orient values for tooltip.

These values should be used in conjunction to elm_object_tooltip_orient_set() to set the position around which the tooltip should appear(relative to its parent)

Enumerator
ELM_TOOLTIP_ORIENT_NONE 

Default value, Tooltip moves with mouse pointer.

ELM_TOOLTIP_ORIENT_TOP_LEFT 

Tooltip should appear at the top left of parent.

ELM_TOOLTIP_ORIENT_TOP 

Tooltip should appear at the top of parent.

ELM_TOOLTIP_ORIENT_TOP_RIGHT 

Tooltip should appear at the top right of parent.

ELM_TOOLTIP_ORIENT_LEFT 

Tooltip should appear at the left of parent.

ELM_TOOLTIP_ORIENT_CENTER 

Tooltip should appear at the center of parent.

ELM_TOOLTIP_ORIENT_RIGHT 

Tooltip should appear at the right of parent.

ELM_TOOLTIP_ORIENT_BOTTOM_LEFT 

Tooltip should appear at the bottom left of parent.

ELM_TOOLTIP_ORIENT_BOTTOM 

Tooltip should appear at the bottom of parent.

ELM_TOOLTIP_ORIENT_BOTTOM_RIGHT 

Tooltip should appear at the bottom right of parent.

ELM_TOOLTIP_ORIENT_LAST 

Sentinel value, don't use.

Function Documentation

◆ elm_config_tooltip_delay_get()

double elm_config_tooltip_delay_get ( void  )

Get the duration after which tooltip will be shown.

Returns
Duration after which tooltip will be shown.

◆ elm_object_tooltip_move_freeze_push()

void elm_object_tooltip_move_freeze_push ( Evas_Object obj)

This increments the tooltip movement freeze count by one.

If the count is more than 0, the tooltip position will be fixed.

Parameters
objThe tooltip's anchor object
See also
elm_object_tooltip_move_freeze_pop()
elm_object_tooltip_move_freeze_get()
Since
1.9

◆ elm_object_tooltip_move_freeze_pop()

void elm_object_tooltip_move_freeze_pop ( Evas_Object obj)

This decrements the tooltip freeze count by one.

Parameters
objThe tooltip's anchor object
See also
elm_object_tooltip_move_freeze_push()
Since
1.9

◆ elm_object_tooltip_move_freeze_get()

int elm_object_tooltip_move_freeze_get ( const Evas_Object obj)

Get the movement freeze count.

This gets the movement freeze count.

Parameters
objThe tooltip's anchor object
Returns
The movement freeze count
See also
elm_object_tooltip_move_freeze_push()
Since
1.9

◆ elm_object_tooltip_orient_set()

void elm_object_tooltip_orient_set ( Evas_Object obj,
Elm_Tooltip_Orient  orient 
)

Sets the orientation of the tooltip around the owner region.

Sets the position in which tooltip will appear around its owner. By default, ELM_TOOLTIP_ORIENT_NONE is set.

Parameters
objThe owner widget.
orientThe orientation of the tooltip.
See also
Elm_Tooltip_Orient for possible values.
Since
1.9

References ELM_TOOLTIP_ORIENT_LAST, and ELM_TOOLTIP_ORIENT_NONE.

◆ elm_object_tooltip_orient_get()

Elm_Tooltip_Orient elm_object_tooltip_orient_get ( const Evas_Object obj)

Returns the orientation of Tooltip.

Parameters
objThe owner object
Returns
The orientation of the tooltip
See also
elm_object_tooltip_orient_set() Elm_Tooltip_Orient for possible values.

References ELM_TOOLTIP_ORIENT_NONE.

◆ elm_object_tooltip_show()

void elm_object_tooltip_show ( Evas_Object obj)

Force show tooltip of object.

Parameters
objTarget object

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

References EINA_TRUE.

◆ elm_object_tooltip_hide()

void elm_object_tooltip_hide ( Evas_Object obj)

Force hide tooltip of object.

Parameters
objTarget object

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

References EINA_FALSE.

◆ elm_object_tooltip_text_set()

void elm_object_tooltip_text_set ( Evas_Object obj,
const char *  text 
)

Set the text to be displayed inside the tooltip.

Parameters
objThe tooltip object.
textThe text to be displayed.

References EINA_SAFETY_ON_NULL_RETURN, eina_stringshare_add(), elm_object_tooltip_content_cb_set(), elm_object_tooltip_unset(), and evas_object_data_get().

◆ elm_object_tooltip_content_cb_set()

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.

Parameters
objThe object being attached a tooltip.
funcThe function used to create the tooltip contents.
dataWhat to provide to func as callback data/context.
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.

Referenced by elm_object_tooltip_text_set().

◆ elm_object_tooltip_unset()

void elm_object_tooltip_unset ( Evas_Object obj)

Unset tooltip from object.

Parameters
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()

Referenced by elm_object_tooltip_text_set().

◆ elm_object_tooltip_style_set()

void elm_object_tooltip_style_set ( Evas_Object obj,
const char *  style 
)

Set 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().
Parameters
objan object with tooltip already set.
stylethe theme style to use (default, transparent, ...)

References eina_stringshare_replace().

◆ elm_object_tooltip_style_get()

const char * elm_object_tooltip_style_get ( const Evas_Object obj)

Get the style for this object tooltip.

Parameters
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.

◆ elm_object_tooltip_window_mode_set()

Eina_Bool elm_object_tooltip_window_mode_set ( Evas_Object obj,
Eina_Bool  disable 
)

Disable size restrictions on an object's tooltip.

Parameters
objThe tooltip's anchor object
disableIf EINA_TRUE, size restrictions are disabled
Returns
EINA_FALSE on failure, EINA_TRUE on success

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.

References EINA_FALSE.

◆ elm_object_tooltip_window_mode_get()

Eina_Bool elm_object_tooltip_window_mode_get ( const Evas_Object obj)

Get size restriction state of an object's tooltip.

Parameters
objThe tooltip's anchor object
Returns
If EINA_TRUE, size restrictions are disabled

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.

References EINA_FALSE.

◆ elm_config_tooltip_delay_set()

void elm_config_tooltip_delay_set ( double  delay)

Set the duration after which tooltip will be shown.

Returns
EINA_TRUE if value is set.

References EINA_TRUE.