Class wibox.layout.stack

A stacked layout.

This layout display widgets on top of each other. It can be used to overlay a wibox.widget.textbox on top of a awful.widget.progressbar or manage "pages" where only one is visible at any given moment.

The indices are going from 1 (the bottom of the stack) up to the top of the stack. The order can be changed either using :swap or :raise.

Usage:

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

Info:

  • Copyright: 2016 Emmanuel Lepage Vallee
  • Author: Emmanuel Lepage Vallee

Functions

stack:raise (index) Raise a widget at index to the top of the stack
stack:raise_widget (widget[, recursive=false]) Raise the first instance of widget
wibox.layout.stack () Create a new stack layout.

Object properties

wibox.layout.stack.spacing Add spacing between each layout widgets
wibox.layout.stack.top_only If only the first stack widget is drawn

Methods

wibox.layout.stack:add (layout, ...) Add some widgets to the given stack layout
wibox.layout.stack:remove (The) Remove a widget from the layout
wibox.layout.stack:insert (index, widget) Insert a new widget in the layout at position index
wibox.layout.stack:remove_widgets (widget) Remove one or more widgets from the layout The last parameter can be a boolean, forcing a recursive seach of the widget(s) to remove.


Functions

stack:raise (index)
Raise a widget at index to the top of the stack
  • index number the widget index to raise
stack:raise_widget (widget[, recursive=false])
Raise the first instance of widget
  • widget The widget to raise
  • recursive boolean Also look deeper in the hierarchy to find the widget (default false)
wibox.layout.stack ()
Create a new stack layout.

Returns:

    widget A new stack layout

Object properties

wibox.layout.stack.spacing
Add spacing between each layout widgets

Type:

  • spacing number Spacing between widgets.
wibox.layout.stack.top_only
If only the first stack widget is drawn

Methods

wibox.layout.stack:add (layout, ...)
Add some widgets to the given stack layout
  • layout The layout you are modifying.
  • ... widget Widgets that should be added (must at least be one)
wibox.layout.stack:remove (The)
Remove a widget from the layout
  • The index widget index to remove

Returns:

    boolean index If the operation is successful
wibox.layout.stack:insert (index, widget)
Insert a new widget in the layout at position index
  • index number The position
  • widget The widget

Returns:

    boolean If the operation is successful
wibox.layout.stack:remove_widgets (widget)
Remove one or more widgets from the layout The last parameter can be a boolean, forcing a recursive seach of the widget(s) to remove.
  • widget ... Widgets that should be removed (must at least be one)

Returns:

    boolean If the operation is successful
generated by LDoc 1.4.2