Module: awful.widget.common
This module contains helper functions to manage a layout widgets.
This is the boilerplate code to manage a "list" of objects and display
them in a wibox.layout. It uses signals to detect when an object change
and its widget be updated.
Info:
- Copyright: 2008-2009 Julien Danjou
-
Originally authored by: Julien Danjou <[email protected]>
(Full contributors list available on our github project)
Methods
| :create_buttons (buttons, object) | Common method to create buttons. | |
| :list_update (w, buttons, label, data, objects, args) | Common update method. |
Methods
- 🔗 :create_buttons (buttons, object)
-
Common method to create buttons.
Parameters:
Name Type(s) Description buttons table object Returns:
- 🔗 :list_update (w, buttons, label, data, objects, args)
-
Common update method.
Parameters:
Name Type(s) Description Default value w The widget. Not applicable buttons table Not applicable label function Function to generate label parameters from an object. The function gets passed an object from objects, and has to returntext,bg,bg_image,icon.Not applicable data table Current data/cache, indexed by objects. Not applicable objects table Objects to be displayed / updated. Not applicable args Optional table {}