awesome/lib/wibox/widget
Alex Belykh ff882f1d80 Add group_start and group_finish properties to graph widget
These two are callbacks, that should allow the user to tap
more deeply into drawing process, beyond simply specifying
the step_shape.

They are called before and after rendering each data_group
respectively, with 3 parameters
(cairo_context, group_idx, options),
to do whatever is needed that intermediate step_shape()-s
of the data group are rendered as the user wishes.

options parameter is a table of various data that could
be useful for user during drawing, such as
_graph: the widget itself.
_width and _height: graph data area drawing dimensions.
_step_width and _step_spacing: respective (non-nil) numbers.
_group_idx: currently drawn data group.

The user can add their own values to the options table to
conveniently pass data between callbacks, but all
_-prefixed keys are reserved for future use by the widget.

When group_start is nil (default), the default implementation
is used, which does cr:set_source(data group's color).
It is user's responsibility to set colors how they wish,
if they set this property to their own function.

group_start() callback may return a number, which would be added
to the x coordinate of all shapes of the current group,
i.e. shifting its bars horizontally. This can be useful e.g.
for ensuring vertical lines' sharpness. User mustn't return
more values from the callback, they are reserved for future use.

As a convenience, group_start property can be set to a number,
then this number will be used for bar shifting of all groups as
described above. The group's color will be set appropriately too,
as with group_start = nil.

When group_finish is nil (default), the default implementation
is used, which does cr:fill().
2021-05-21 23:22:49 +07:00
..
background.lua Move awful.util.deprecate and awful.util.deprecate_class to gears.debug 2017-03-15 20:08:22 -05:00
base.lua widget: Emit "property::widget" 2021-04-24 23:28:18 -07:00
calendar.lua Fix ldoc modules summaries missing the final `.`. 2019-11-28 13:53:59 +01:00
checkbox.lua doc(@supermodule): Add to wibox.widget modules 2021-04-02 19:24:07 +02:00
graph.lua Add group_start and group_finish properties to graph widget 2021-05-21 23:22:49 +07:00
imagebox.lua imagebox: Extend to add enough knobs for the wallpaper API. 2021-04-28 00:06:08 -07:00
init.lua doc: Use an explicit tag for all static functions. 2019-06-08 18:14:13 -04:00
piechart.lua doc(@supermodule): Add to wibox.widget modules 2021-04-02 19:24:07 +02:00
progressbar.lua doc(@supermodule): Add to wibox.widget modules 2021-04-02 19:24:07 +02:00
separator.lua doc(@supermodule): Add to wibox.widget modules 2021-04-02 19:24:07 +02:00
slider.lua slider: Fix an aliasing issue. 2021-04-24 23:28:18 -07:00
systray.lua doc(@supermodule): Add to wibox.widget modules 2021-04-02 19:24:07 +02:00
textbox.lua fix(wibox: textbox): remove ldoc tags added by merge mistake 2021-04-25 20:55:44 +02:00
textclock.lua doc(wibox.widget.textclock): Widget definition. 2021-04-07 01:38:53 -07:00