Module wibox.layout.margin
Info:
- Release: v3.5.5
- Author: Uli Schlachter
- Copyright: 2010 Uli Schlachter
Functions
margin:draw (wibox, cr, width, height) | Draw a margin layout |
margin:fit (width, height) | Fit a margin layout into the given space |
margin:set_widget (widget) | Set the widget that this layout adds a margin on. |
margin:set_margins (val) | Set all the margins to val. |
margin:set_color (color) | Set the margins color to color |
margin:reset () | Reset this layout. |
set_left (layout, margin) | Set the left margin that this layout adds to its widget. |
set_right (layout, margin) | Set the right margin that this layout adds to its widget. |
set_top (layout, margin) | Set the top margin that this layout adds to its widget. |
set_bottom (layout, margin) | Set the bottom margin that this layout adds to its widget. |
new (widget, left, right, top, bottom, color) | Returns a new margin layout. |
Functions
- margin:draw (wibox, cr, width, height)
-
Draw a margin layout
Parameters:
- wibox
- cr
- width
- height
- margin:fit (width, height)
-
Fit a margin layout into the given space
Parameters:
- width
- height
- margin:set_widget (widget)
-
Set the widget that this layout adds a margin on.
Parameters:
- widget
- margin:set_margins (val)
-
Set all the margins to val.
Parameters:
- val
- margin:set_color (color)
-
Set the margins color to color
Parameters:
- color
- margin:reset ()
- Reset this layout. The widget will be unreferenced, the margins set to 0 and the color erased
- set_left (layout, margin)
-
Set the left margin that this layout adds to its widget.
Parameters:
- layout The layout you are modifying.
- margin The new margin to use.
- set_right (layout, margin)
-
Set the right margin that this layout adds to its widget.
Parameters:
- layout The layout you are modifying.
- margin The new margin to use.
- set_top (layout, margin)
-
Set the top margin that this layout adds to its widget.
Parameters:
- layout The layout you are modifying.
- margin The new margin to use.
- set_bottom (layout, margin)
-
Set the bottom margin that this layout adds to its widget.
Parameters:
- layout The layout you are modifying.
- margin The new margin to use.
- new (widget, left, right, top, bottom, color)
-
Returns a new margin layout.
Parameters:
- widget A widget to use (optional)
- left A margin to use on the left side of the widget (optional)
- right A margin to use on the right side of the widget (optional)
- top A margin to use on the top side of the widget (optional)
- bottom A margin to use on the bottom side of the widget (optional)
- color A color for the margins (optional)