Reference

# Module `awful.tooltip`

Tooltip module for awesome objects. A tooltip is a small hint displayed when the mouse cursor hovers a specific item. In awesome, a tooltip can be linked with almost any object having a `add_signal()` method and receiving `mouse::enter` and `mouse::leave` signals.

How to create a tooltip?
`myclock = awful.widget.textclock({}, "%T", 1)
myclock_t = awful.tooltip({
objects = { K },
timer_function = function()
return os.date("Today is %A %B %d %Y\nThe time is %T")
end,
})
`

How to add the same tooltip to several objects?
`myclock_t:add_to_object(obj1)
myclock_t:add_to_object(obj2)
` Now the same tooltip is attached to `K`, `obj1`, `obj2`.

How to remove tooltip from many objects?
`myclock_t:remove_from_object(obj1)
myclock_t:remove_from_object(obj2)
` Now the same tooltip is only attached to `K`.

Author:

Sébastien Gross <seb•ɱɩɲʋʃ•awesome•ɑƬ•chezwam•ɖɵʈ•org>

Copyright© 2009 Sébastien Gross

Release: v3.4.9

## Functions

add_to_object (self, object) | Add tooltip to an object.
new (args) | Create a new tooltip and link it to a widget.
remove_from_object (self, object) | Remove tooltip from an object.
set_text (self, text) | Change displayed text.
set_timeout (self, timeout) | Change the tooltip's update interval.

## Tables

tooltip | Tooltip object definition.

## Functions

add_to_object (self, object)
  Add tooltip to an object.

  ### Parameters

  - self: The tooltip.
  - object: An object.
new (args)
  Create a new tooltip and link it to a widget.

  ### Parameters

  - args: Arguments for tooltip creation may containt:
    `timeout`: The timeout value for update_func.
    `timer_function`: A function to dynamicaly change the tooltip text.
    `objects`: A list of objects linked to the tooltip.

  ### Return value:

  The created tooltip.

  ### See also:

  - add_to_object
  - set_timeout
  - set_text
remove_from_object (self, object)
  Remove tooltip from an object.

  ### Parameters

  - self: The tooltip.
  - object: An object.
set_text (self, text)
  Change displayed text.

  ### Parameters

  - self: The tooltip object.
  - text: New tooltip text.
set_timeout (self, timeout)
  Change the tooltip's update interval.

  ### Parameters

  - self: A tooltip object.
  - timeout: The timeout value.

## Tables

tooltip
  Tooltip object definition. Fields
  - wibox: The wibox displaying the tooltip.
  - visible: True if tooltip is visible.