Module wibox.layout.base
Info:
- Copyright: 2010 Uli Schlachter
- Release: v3.5.2
- Author: Uli Schlachter
Functions
rect_to_device_geometry (cr, x, y, width, height) | Figure out the geometry in device coordinate space. |
fit_widget (widget, width, height) | Fit a widget for the given available width and height |
draw_widget (wibox, cr, widget, x, y, width, height) | Draw a widget via a cairo context |
Functions
- rect_to_device_geometry (cr, x, y, width, height)
-
Figure out the geometry in device coordinate space. This will break if
someone rotates the coordinate space by a non-multiple of 90°.
Parameters:
- cr
- x
- y
- width
- height
- fit_widget (widget, width, height)
-
Fit a widget for the given available width and height
Parameters:
- widget The widget to fit (this uses widget:fit(width, height)).
- width The available width for the widget
- height The available height for the widget
Returns:
-
The width and height that the widget wants to use
- draw_widget (wibox, cr, widget, x, y, width, height)
-
Draw a widget via a cairo context
Parameters:
- wibox The wibox on which we are drawing
- cr The cairo context used
- widget The widget to draw (this uses widget:draw(cr, width, height)).
- x The position that the widget should get
- y The position that the widget should get
- width The widget's width
- height The widget's height