Handling of drawables.
A drawable is something that can be drawn to.
- Copyright: 2012 Uli Schlachter
- Author: Uli Schlachter
|wibox.drawable:find_widgets (x, y)||Find a widget by a point.|
|wibox.drawable:set_widget (widget)||Set the widget that the drawable displays|
|wibox.drawable:set_bg (c)||Set the background of the drawable|
|wibox.drawable:set_bgimage (image)||Set the background image of the drawable
|wibox.drawable:set_fg (c)||Set the foreground of the drawable|
- wibox.drawable:find_widgets (x, y)
Find a widget by a point.
The drawable must have drawn itself at least once for this to work.
- x X coordinate of the point
- y Y coordinate of the point
A table containing a description of all the widgets that
contain the given point. Each entry is a table containing this drawable as
.drawableentry, the widget under
.widgetand the instance of wibox.hierarchy describing the size and position of the widget under
.hierarchy. For convenience,
.heightcontain an approximation of the widget’s extents on the surface.
widget_heightcontain the exact size of the widget in its own, local coordinate system (which may e.g. be rotated and scaled).
- wibox.drawable:set_widget (widget)
Set the widget that the drawable displays
- wibox.drawable:set_bg (c)
Set the background of the drawable
- c The background to use. This must either be a cairo pattern object, nil or a string that gears.color() understands.
- wibox.drawable:set_bgimage (image)
Set the background image of the drawable
imageis a function, it will be called with
(context, cr, width, height)as arguments. Any other arguments passed to this method will be appended.
- image A background image or a function
- wibox.drawable:set_fg (c)
Set the foreground of the drawable
- c The foreground to use. This must either be a cairo pattern object, nil or a string that gears.color() understands.