# Module `blingbling.widget`

Net widget displays two arrows as graph for download/upload activities

## Functions

set_interface (interface) | Set the net interface used to get information, default is eth0.
set_v_margin (margin) | Define the top and bottom margin for the graph area.
set_h_margin (margin) | Define the left and right margin for the graph area.
set_background_color (color) | Fill all the widget (width * height) with this color (default is none ).
set_background_graph_color (color) | Fill the graph area background with this color (default is none).
set_graph_color (color) | Define the graph/arrows color.
set_graph_line_color (color) | Set an outline on the arrows with this color.
set_show_text (boolean) | Display or not upload/download informations.
set_text_color (color) | Define the text color.
set_text_background_color (color) | Set a color behind the text.
set_font_size (size) | Set the size of the font to use.
set_font (font) | Set the font to use.
net:set_ippopup () | Add a popup on the widget that displays informations on the current network connection.
net:set_height (height) | Set the n_graph height.
net:set_width (width) | Set the graph width.
net.new (args) | Create a n_graph widget.

## Functions

set_interface (interface)
  Set the net interface used to get information, default is eth0.

  ### Parameters:

  - interface a string

  ### Usage:

      mynet:set_interface(string)

set_v_margin (margin)
  Define the top and bottom margin for the graph area.

  ### Parameters:

  - margin an integer for top and bottom margin

  ### Usage:

      mynet:set_v_margin(integer)

set_h_margin (margin)
  Define the left and right margin for the graph area.

  ### Parameters:

  - margin an integer for left and right margin

  ### Usage:

      mynet:set_h_margin()

set_background_color (color)
  Fill all the widget (width * height) with this color (default is none ).

  ### Parameters:

  - color a string "#rrggbbaa" or "#rrggbb"

  ### Usage:

      mynet:set_background_color(string) -->"#rrggbbaa"

set_background_graph_color (color)
  Fill the graph area background with this color (default is none).

  ### Parameters:

  - color a string "#rrggbbaa" or "#rrggbb"

  ### Usage:

      mynet:set_background_graph_color(string) -->"#rrggbbaa"

set_graph_color (color)
  Define the graph/arrows color.

  ### Parameters:

  - color a string "#rrggbbaa" or "#rrggbb"

  ### Usage:

      mynet:set_graph_color(string) -->"#rrggbbaa"

set_graph_line_color (color)
  Set an outline on the arrows with this color.

  ### Parameters:

  - color a string "#rrggbbaa" or "#rrggbb"

  ### Usage:

      mynet:set_graph_line_color(string) -->"#rrggbbaa"

set_show_text (boolean)
  Display or not upload/download informations.

  ### Parameters:

  - boolean true or false default is false

  ### Usage:

      mynet:set_show_text(boolean) --> true or false

set_text_color (color)
  Define the text color.

  ### Parameters:

  - color a string "#rrggbbaa" or "#rrggbb"

  ### Usage:

      mynet:set_text_color(string) -->"#rrggbbaa"

set_text_background_color (color)
  Set a color behind the text.

  ### Parameters:

  - color a string "#rrggbbaa" or "#rrggbb"

  ### Usage:

      mynet:set_text_background_color(string) -->"#rrggbbaa"

set_font_size (size)
  Set the size of the font to use.

  ### Parameters:

  - size the font size

  ### Usage:

      mynet:set_font_size(integer)

set_font (font)
  Set the font to use.

  ### Parameters:

  - font a string that contains the font name family and weight

  ### Usage:

      mynet:set_font(string)

net:set_ippopup ()
  Add a popup on the widget that displays informations on the current network connection.

  ### Usage:

      mynet:set_ippopup()

net:set_height (height)
  Set the n_graph height.

  ### Parameters:

  - height The height to set.
net:set_width (width)
  Set the graph width.

  ### Parameters:

  - width The width to set.
net.new (args)
  Create a n_graph widget.

  ### Parameters:

  - args Standard widget() arguments. You should add width and height and interface

  ### Returns:

  A graph widget.

  ### Usage:

      mynet = blingbling.net({width = 100, height = 20, interface = "eth0"})

generated by LDoc 1.4.2