Class wibox.layout.align

Usage:

    wibox.widget {
        generic_widget( 'first'  ),
        generic_widget( 'second' ),
        generic_widget( 'third'  ),
        layout  = wibox.layout.align.horizontal
    }

Info:

  • Copyright: 2010 Uli Schlachter
  • Author: Uli Schlachter

Functions

align.horizontal ([left[, middle[, right]]]) Returns a new horizontal align layout.
align.vertical ([top[, middle[, bottom]]]) Returns a new vertical align layout.

Object properties

wibox.layout.align.first Set the layout's first widget.
wibox.layout.align.second Set the layout's second widget.
wibox.layout.align.third Set the layout's third widget.
wibox.layout.align.children All direct children of this layout.
wibox.layout.align.expand Set the expand mode which determines how sub widgets expand to take up unused space.


Functions

align.horizontal ([left[, middle[, right]]])
Returns a new horizontal align layout. An align layout can display up to three widgets. The widget set via :set_left() is left-aligned. :set_right() sets a widget which will be right-aligned. The remaining space between those two will be given to the widget set via :set_middle().
  • left widget Widget to be put to the left.
  • middle widget Widget to be put to the middle.
  • right widget Widget to be put to the right.
align.vertical ([top[, middle[, bottom]]])
Returns a new vertical align layout. An align layout can display up to three widgets. The widget set via :set_top() is top-aligned. :set_bottom() sets a widget which will be bottom-aligned. The remaining space between those two will be given to the widget set via :set_middle().
  • top widget Widget to be put to the top.
  • middle widget Widget to be put to the middle.
  • bottom widget Widget to be put to the right.

Object properties

wibox.layout.align.first
Set the layout's first widget. This is the widget that is at the left/top
wibox.layout.align.second
Set the layout's second widget. This is the centered one.
wibox.layout.align.third
Set the layout's third widget. This is the widget that is at the right/bottom
wibox.layout.align.children
All direct children of this layout. This can be used to replace all 3 widgets at once.
wibox.layout.align.expand
Set the expand mode which determines how sub widgets expand to take up unused space.

Type:

  • mode string How to use unused space.

    * "inside" - Default option. Size of outside widgets is determined using their fit function. Second, middle, or center widget expands to fill remaining space. * "outside" - Center widget is sized using its fit function and placed in the center of the allowed space. Outside widgets expand (or contract) to fill remaining space on their side. * "none" - All widgets are sized using their fit function, drawn to only the returned space, or remaining space, whichever is smaller. Center widget gets priority. (default inside)

generated by LDoc 1.4.2