# Module `wibox.drawable`

### Info:

- Copyright: 2012 Uli Schlachter
- Release: v3.5.4
- Author: Uli Schlachter

## Functions

widget_at (widget, x, y, width, height) | Register a widget's position.
find_widgets (x, y) | Find a widget by a point.
set_widget (widget) | Set the widget that the drawable displays
set_bg (drawable, c) | Set the background of the drawable
set_fg (drawable, c) | Set the foreground of the drawable

## Tables

drawable | Handling of drawables.

## Functions

widget_at (widget, x, y, width, height)
  Register a widget's position. This is internal, don't call it yourself! Only wibox.layout.base.draw_widget is allowed to call this.

  ### Parameters:

  - widget
  - x
  - y
  - width
  - height
find_widgets (x, y)
  Find a widget by a point. The drawable must have drawn itself at least once for this to work.

  ### Parameters:

  - x X coordinate of the point
  - y Y coordinate of the point

  ### Returns:

  A sorted table with all widgets that contain the given point. The widgets are sorted by relevance.
set_widget (widget)
  Set the widget that the drawable displays

  ### Parameters:

  - widget
set_bg (drawable, c)
  Set the background of the drawable

  ### Parameters:

  - drawable The drawable to use
  - c The background to use. This must either be a cairo pattern object, nil or a string that gears.color() understands.
set_fg (drawable, c)
  Set the foreground of the drawable

  ### Parameters:

  - drawable The drawable to use
  - c The foreground to use. This must either be a cairo pattern object, nil or a string that gears.color() understands.

## Tables

drawable
  Handling of drawables. A drawable is something that can be drawn to.

generated by LDoc 1.4.2