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