# Module `awful.tooltip`

### Info:

- Author: Sébastien Gross <seb•ɱɩɲʋʃ•awesome•ɑƬ•chezwam•ɖɵʈ•org>
- Copyright: 2009 Sébastien Gross
- Release: v3.5.1

## Functions

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

## Tables

tooltip | Tooltip module for awesome objects.
tooltip | Tooltip object definition.

## Functions

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.
add_to_object (self, object)
  Add tooltip to an object.

  ### Parameters:

  - self The tooltip.
  - object An object.
remove_from_object (self, object)
  Remove tooltip from an object.

  ### Parameters:

  - self The tooltip.
  - object An object.
new (args)
  Create a new tooltip and link it to a widget. `timeout`: The timeout value for update_func.
  `timer_function`: A function to dynamically change the tooltip text.
  `objects`: A list of objects linked to the tooltip.

  ### Parameters:

  - args Arguments for tooltip creation may containt:

  ### Returns:

  The created tooltip.

  ### see also:

  - add_to_object
  - set_timeout
  - set_text

## Tables

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 `connect_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 = { myclock },
  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 `myclock`, `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 `myclock`.

  awful.tooltip

  ### Fields:

  - mt
tooltip
  Tooltip object definition.

  ### Fields:

  - wibox The wibox displaying the tooltip.
  - visible True if tooltip is visible.

generated by LDoc 1.3