awful.remote: enhance description
[awesome.git] / luadoc / widget.lua
blobe7f40c79d54ceb80f1c93aec8ae267337d2dca68
1 --- awesome widget API
2 -- @author Julien Danjou <julien@danjou.info>
3 -- @copyright 2008-2009 Julien Danjou
4 module("widget")
6 --- Generic widget.
7 -- @field visible The widget visibility.
8 -- @field type The widget type. Can only be set using constructor. Type can be either textbox,
9 -- imagebox or systray.
10 -- @class table
11 -- @name widget
13 --- Set the widget buttons. It will receive a press or release event when of this buttons is
14 -- pressed.
15 -- @param buttons_table A table with buttons, or nil if you do not want to modify it.
16 -- @return A table with buttons the widget is listening to.
17 -- @name buttons
18 -- @class function
20 --- Get the widget extents, i.e., the size the widgets needs to be drawn.
21 -- @param -
22 -- @return A table with x, y, width and height.
23 -- @name extents
24 -- @class function
26 --- Textbox widgets.
27 -- @field text The text to display.
28 -- @field width The width of the textbox. Set to 0 for auto.
29 -- @field wrap The wrap mode: word, char, word_char.
30 -- @field ellipsize The ellipsize mode: start, middle or end.
31 -- @field border_width The border width to draw around.
32 -- @field border_color The border color.
33 -- @field align Text alignment, left, center or right.
34 -- @field margin Method to pass text margin: a table with top, left, right and bottom keys.
35 -- @field bg Background color.
36 -- @field bg_image Background image.
37 -- @field bg_align Background image alignment, left, center, right, bottom, top or middle
38 -- @field bg_resize Background resize.
39 -- @class table
40 -- @name textbox
42 --- Imagebox widget.
43 -- @field image The image to display.
44 -- @field bg The background color to use.
45 -- @class table
46 -- @name imagebox
48 --- Systray widget.
49 -- @class table
50 -- @name systray
52 --- Add a signal.
53 -- @param name A signal name.
54 -- @param func A function to call when the signal is emited.
55 -- @name add_signal
56 -- @class function
58 --- Remove a signal.
59 -- @param name A signal name.
60 -- @param func A function to remove.
61 -- @name remove_signal
62 -- @class function
64 --- Emit a signal.
65 -- @param name A signal name.
66 -- @param ... Various arguments, optional.
67 -- @name emit_signal
68 -- @class function