doc: Add a default widget documentation.

This will avoid copy/pasting.

This assume the widget use the property system.
This commit is contained in:
Emmanuel Lepage Vallee 2016-05-26 01:59:20 -04:00
parent c9dd32424f
commit 8d9e7aacce
1 changed files with 41 additions and 0 deletions

41
docs/common/widget.ldoc Normal file
View File

@ -0,0 +1,41 @@
--- Get a widex index.
-- @param widget The widget to look for
-- @param[opt] recursive Also check sub-widgets
-- @param[opt] ... Aditional widgets to add at the end of the "path"
-- @return The index
-- @return The parent layout
-- @return The path between "self" and "widget"
-- @function index
--- Get all direct and indirect children widgets.
-- This will scan all containers recursively to find widgets
-- Warning: This method it prone to stack overflow id the widget, or any of its
-- children, contain (directly or indirectly) itself.
-- @treturn table The children
-- @function get_all_children
--- Set a declarative widget hierarchy description.
-- See [The declarative layout system](../documentation/03-declarative-layout.md.html)
-- @param args An array containing the widgets disposition
-- @function setup
--- Force a widget height.
-- @property forced_height
-- @tparam number|nil height The height (`nil` for automatic)
--- Force a widget width.
-- @property forced_width
-- @tparam number|nil width The width (`nil` for automatic)
--- The widget opacity (transparency).
-- @property opacity
-- @tparam[opt=1] number opacity The opacity (between 0 and 1)
--- The widget visibility.
-- @property visible
-- @param boolean
--- Set/get a widget's buttons.
-- @param _buttons The table of buttons that should bind to the widget.
-- @function buttons