Module blingbling.triangular_progress_graph
Triangular progress graph widget.
Functions
set_background_color (color) | Fill all the widget (width * height) with this color (default is transparent ). |
set_bar (boolean) | Define the form of the graph: use five growing bars instead of a triangle. |
set_v_margin (margin) | Define the top and bottom margin for the graph. |
set_h_margin (margin) | Define the left and right margin for the graph. |
set_graph_background_color (color) | Set the color of the graph background. |
set_graph_color (color) | Define the graph color. |
set_graph_line_color (color) | Define the color of the outline of the graph. |
set_show_text (boolean) | Display text on the graph or not. |
set_value_format (printf) | Define displayed text value format string |
set_text_color (color) | Define the color of the text. |
set_text_background_color (color) | Define the background color of the text. |
set_font_size (size) | Define the text font size. |
set_font (the) | Define the text font. |
set_label (text) | Define the template of the text to display. |
triangular_progressgraph:set_height (height) | Set the tp_graph height. |
triangular_progressgraph:set_width (width) | Set the tp_graph width. |
triangular_progressgraph.new (args) | Create a tp_graph widget. |
Functions
- set_background_color (color)
-
Fill all the widget (width * height) with this color (default is transparent ).
Parameters:
- color a string "#rrggbbaa" or "#rrggbb"
Usage:
mypgraph:set_background_color(string) -->"#rrggbbaa"
- set_bar (boolean)
-
Define the form of the graph: use five growing bars instead of a triangle.
Parameters:
- boolean true or false (default is false)
Usage:
mypgraph:set_bar(boolean) --> true or false
- set_v_margin (margin)
-
Define the top and bottom margin for the graph.
Parameters:
- margin an integer for top and bottom margin
Usage:
mypgraph:set_v_margin(integer)
- set_h_margin (margin)
-
Define the left and right margin for the graph.
Parameters:
- margin an integer for left and right margin
Usage:
mypgraph:set_h_margin(integer)
- set_graph_background_color (color)
-
Set the color of the graph background.
Parameters:
- color a string "#rrggbbaa" or "#rrggbb"
Usage:
mypgraph:set_graph_background_color(string) -->"#rrggbbaa"
- set_graph_color (color)
-
Define the graph color.
Parameters:
- color a string "#rrggbbaa" or "#rrggbb"
Usage:
mypgraph:set_graph_color(string) -->"#rrggbbaa"
- set_graph_line_color (color)
-
Define the color of the outline of the graph.
Parameters:
- color a string "#rrggbbaa" or "#rrggbb"
Usage:
mypgraph:set_graph_line_color(string) -->"#rrggbbaa"
- set_show_text (boolean)
-
Display text on the graph or not.
Parameters:
- boolean true or false (default is false)
Usage:
mypgraph:set_show_text(boolean) --> true or false
- set_value_format (printf)
-
Define displayed text value format string
Parameters:
- printf format string for display text
Usage:
mypgraph:set_value_format(string) --> "%2.f"
- set_text_color (color)
-
Define the color of the text.
Parameters:
- color a string "#rrggbbaa" or "#rrggbb" defaul is white
Usage:
mypgraph:set_text_color(string) -->"#rrggbbaa"
- set_text_background_color (color)
-
Define the background color of the text.
Parameters:
- color a string "#rrggbbaa" or "#rrggbb"
Usage:
mypgraph:set_text_background_color(string) -->"#rrggbbaa"
- set_font_size (size)
-
Define the text font size.
Parameters:
- size the font size
Usage:
mypgraph:set_font_size(integer)
- set_font (the)
-
Define the text font.
Parameters:
- the font to use
Usage:
mypgraph:set_font(string|table) The argument can be a string for the font name or a table that contains the cairo font informations
- set_label (text)
-
Define the template of the text to display.
Parameters:
- text the text to display
Usage:
mypgraph:set_label(string) By default the text is : (value_send_to_the_widget *100) .. "%" static string: example set_label("Volume:") will display "Volume:" on the graph dynamic string: use $percent in the string example set_label("Volume $percent %") will display "Volume 10%"
- triangular_progressgraph:set_height (height)
-
Set the tp_graph height.
Parameters:
- height The height to set.
- triangular_progressgraph:set_width (width)
-
Set the tp_graph width.
Parameters:
- width The width to set.
- triangular_progressgraph.new (args)
-
Create a tp_graph widget.
Parameters:
- args Standard widget() arguments. You should add width and height key to set graph geometry.
Returns:
-
A graph widget.