widget: Fix documentation

This commit is contained in:
Emmanuel Lepage Vallee 2016-05-23 02:54:01 -04:00
parent fd3e27c38b
commit be23bf0f15
5 changed files with 17 additions and 3 deletions

View File

@ -243,7 +243,8 @@ end
--- Create a graph widget.
-- @param args Standard widget() arguments. You should add width and height
-- key to set graph geometry.
-- @return A graph widget.
-- @return A new graph widget.
-- @function wibox.widget.graph
function graph.new(args)
args = args or {}

View File

@ -133,12 +133,14 @@ function imagebox:set_resize(allowed)
self:emit_signal("widget::layout_changed")
end
--- Returns a new imagebox
--- Returns a new imagebox.
-- Any other arguments will be passed to the clip shape function
-- @param image the image to display, may be nil
-- @param resize_allowed If false, the image will be clipped, else it will be resized
-- to fit into the available space.
-- @param clip_shape A `gears.shape` compatible function
-- @treturn table A new `imagebox`
-- @function wibox.widget.imagebox
local function new(image, resize_allowed, clip_shape)
local ret = base.make_widget()

View File

@ -199,6 +199,7 @@ end
-- @param args Standard widget() arguments. You should add width and height
-- key to set progressbar geometry.
-- @return A progressbar widget.
-- @function wibox.widget.progressbar
function progressbar.new(args)
args = args or {}
local width = args.width or 100

View File

@ -138,6 +138,12 @@ function systray:set_screen(s)
end
end
--- Create the systray widget.
-- Note that this widget can only exist once.
-- @tparam boolean revers Show in the opposite direction
-- @treturn table The new `systray` widget
-- @function wibox.widget.systray
local function new(revers)
local ret = wbase.make_widget()

View File

@ -228,7 +228,11 @@ function textbox:set_font(font)
self:emit_signal("widget::layout_changed")
end
-- Returns a new textbox
--- Create a new textbox.
-- @tparam[opt=""] string text The textbox content
-- @tparam[opt=false] boolean ignore_markup Ignore the pango/HTML markup
-- @treturn table A new textbox widget
-- @function wibox.widget.textbox
local function new(text, ignore_markup)
local ret = base.make_widget()