Module wibox.drawable
Info:
- Release: v3.5.5
- Author: Uli Schlachter
- Copyright: 2012 Uli Schlachter
Functions
drawable:widget_at (widget, x, y, width, height) | Register a widget's position. |
drawable:find_widgets (x, y) | Find a widget by a point. |
drawable:set_widget (widget) | Set the widget that the drawable displays |
drawable:set_bg (drawable, c) | Set the background of the drawable |
drawable:set_fg (drawable, c) | Set the foreground of the drawable |
Tables
drawable | Handling of drawables. |
Functions
- drawable: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
- drawable:find_widgets (x, y)
-
Find a widget by a point.
The drawable must have drawn itself at least once for this to work.
widgets are sorted by relevance.
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
- drawable:set_widget (widget)
-
Set the widget that the drawable displays
Parameters:
- widget
- drawable:set_bg (drawable, c)
-
Set the background of the drawable
nil or a string that gears.color() understands.
Parameters:
- drawable The drawable to use
- c The background to use. This must either be a cairo pattern object,
- drawable:set_fg (drawable, c)
-
Set the foreground of the drawable
nil or a string that gears.color() understands.
Parameters:
- drawable The drawable to use
- c The foreground to use. This must either be a cairo pattern object,