blingbling.widget.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  5. <head>
  6. <title>Reference</title>
  7. <link rel="stylesheet" href="../ldoc.css" type="text/css" />
  8. </head>
  9. <body>
  10. <div id="container">
  11. <div id="product">
  12. <div id="product_logo"></div>
  13. <div id="product_name"><big><b></b></big></div>
  14. <div id="product_description"></div>
  15. </div> <!-- id="product" -->
  16. <div id="main">
  17. <!-- Menu -->
  18. <div id="navigation">
  19. <br/>
  20. <h1>ldoc</h1>
  21. <ul>
  22. <li><a href="../index.html">Index</a></li>
  23. </ul>
  24. <h2>Contents</h2>
  25. <ul>
  26. <li><a href="#Functions">Functions</a></li>
  27. </ul>
  28. <h2>Modules</h2>
  29. <ul class="$(kind=='Topics' and '' or 'nowrap'">
  30. <li><a href="../modules/blingbling.calendar.html">blingbling.calendar</a></li>
  31. <li><a href="../modules/blingbling.clock.html">blingbling.clock</a></li>
  32. <li><a href="../modules/blingbling.helpers.html">blingbling.helpers</a></li>
  33. <li><a href="../modules/blingbling.linegraph.html">blingbling.linegraph</a></li>
  34. <li><strong>blingbling.widget</strong></li>
  35. <li><a href="../modules/blingbling.popups.html">blingbling.popups</a></li>
  36. <li><a href="../modules/blingbling.progress_graph.html">blingbling.progress_graph</a></li>
  37. <li><a href="../modules/blingbling.system.html">blingbling.system</a></li>
  38. <li><a href="../modules/blingbling.tagslist.html">blingbling.tagslist</a></li>
  39. <li><a href="../modules/blingbling.task_warrior.html">blingbling.task_warrior</a></li>
  40. <li><a href="../modules/blingbling.text_box.html">blingbling.text_box</a></li>
  41. <li><a href="../modules/blingbling.transient.html">blingbling.transient</a></li>
  42. <li><a href="../modules/blingbling.triangular_progress_graph.html">blingbling.triangular_progress_graph</a></li>
  43. <li><a href="../modules/blingbling.udisks_glue.html">blingbling.udisks_glue</a></li>
  44. <li><a href="../modules/blingbling.value_text_box.html">blingbling.value_text_box</a></li>
  45. <li><a href="../modules/blingbling.volume.html">blingbling.volume</a></li>
  46. <li><a href="../modules/blingbling.wlourf_circle_graph.html">blingbling.wlourf_circle_graph</a></li>
  47. </ul>
  48. </div>
  49. <div id="content">
  50. <h1>Module <code>blingbling.widget</code></h1>
  51. <p>Net widget displays two arrows as graph for download/upload activities</p>
  52. <p></p>
  53. <h2><a href="#Functions">Functions</a></h2>
  54. <table class="function_list">
  55. <tr>
  56. <td class="name" nowrap><a href="#set_interface">set_interface (interface)</a></td>
  57. <td class="summary">Set the net interface used to get information, default is eth0.</td>
  58. </tr>
  59. <tr>
  60. <td class="name" nowrap><a href="#set_v_margin">set_v_margin (margin)</a></td>
  61. <td class="summary">Define the top and bottom margin for the graph area.</td>
  62. </tr>
  63. <tr>
  64. <td class="name" nowrap><a href="#set_h_margin">set_h_margin (margin)</a></td>
  65. <td class="summary">Define the left and right margin for the graph area.</td>
  66. </tr>
  67. <tr>
  68. <td class="name" nowrap><a href="#set_background_color">set_background_color (color)</a></td>
  69. <td class="summary">Fill all the widget (width * height) with this color (default is none ).</td>
  70. </tr>
  71. <tr>
  72. <td class="name" nowrap><a href="#set_background_graph_color">set_background_graph_color (color)</a></td>
  73. <td class="summary">Fill the graph area background with this color (default is none).</td>
  74. </tr>
  75. <tr>
  76. <td class="name" nowrap><a href="#set_graph_color">set_graph_color (color)</a></td>
  77. <td class="summary">Define the graph/arrows color.</td>
  78. </tr>
  79. <tr>
  80. <td class="name" nowrap><a href="#set_graph_line_color">set_graph_line_color (color)</a></td>
  81. <td class="summary">Set an outline on the arrows with this color.</td>
  82. </tr>
  83. <tr>
  84. <td class="name" nowrap><a href="#set_show_text">set_show_text (boolean)</a></td>
  85. <td class="summary">Display or not upload/download informations.</td>
  86. </tr>
  87. <tr>
  88. <td class="name" nowrap><a href="#set_text_color">set_text_color (color)</a></td>
  89. <td class="summary">Define the text color.</td>
  90. </tr>
  91. <tr>
  92. <td class="name" nowrap><a href="#set_text_background_color">set_text_background_color (color)</a></td>
  93. <td class="summary">Set a color behind the text.</td>
  94. </tr>
  95. <tr>
  96. <td class="name" nowrap><a href="#set_font_size">set_font_size (size)</a></td>
  97. <td class="summary">Set the size of the font to use.</td>
  98. </tr>
  99. <tr>
  100. <td class="name" nowrap><a href="#set_font">set_font (font)</a></td>
  101. <td class="summary">Set the font to use.</td>
  102. </tr>
  103. <tr>
  104. <td class="name" nowrap><a href="#net:set_ippopup">net:set_ippopup ()</a></td>
  105. <td class="summary">Add a popup on the widget that displays informations on the current network connection.</td>
  106. </tr>
  107. <tr>
  108. <td class="name" nowrap><a href="#net:set_height">net:set_height (height)</a></td>
  109. <td class="summary">Set the n_graph height.</td>
  110. </tr>
  111. <tr>
  112. <td class="name" nowrap><a href="#net:set_width">net:set_width (width)</a></td>
  113. <td class="summary">Set the graph width.</td>
  114. </tr>
  115. <tr>
  116. <td class="name" nowrap><a href="#net.new">net.new (args)</a></td>
  117. <td class="summary">Create a n_graph widget.</td>
  118. </tr>
  119. </table>
  120. <br/>
  121. <br/>
  122. <h2><a name="Functions"></a>Functions</h2>
  123. <dl class="function">
  124. <dt>
  125. <a name = "set_interface"></a>
  126. <strong>set_interface (interface)</strong>
  127. </dt>
  128. <dd>
  129. Set the net interface used to get information, default is eth0.
  130. <h3>Parameters:</h3>
  131. <ul>
  132. <li><span class="parameter">interface</span>
  133. a string
  134. </li>
  135. </ul>
  136. <h3>Usage:</h3>
  137. <ul>
  138. <pre class="example">mynet:set_interface(<span class="global">string</span>)</pre>
  139. </ul>
  140. </dd>
  141. <dt>
  142. <a name = "set_v_margin"></a>
  143. <strong>set_v_margin (margin)</strong>
  144. </dt>
  145. <dd>
  146. Define the top and bottom margin for the graph area.
  147. <h3>Parameters:</h3>
  148. <ul>
  149. <li><span class="parameter">margin</span>
  150. an integer for top and bottom margin
  151. </li>
  152. </ul>
  153. <h3>Usage:</h3>
  154. <ul>
  155. <pre class="example">mynet:set_v_margin(integer)</pre>
  156. </ul>
  157. </dd>
  158. <dt>
  159. <a name = "set_h_margin"></a>
  160. <strong>set_h_margin (margin)</strong>
  161. </dt>
  162. <dd>
  163. Define the left and right margin for the graph area.
  164. <h3>Parameters:</h3>
  165. <ul>
  166. <li><span class="parameter">margin</span>
  167. an integer for left and right margin
  168. </li>
  169. </ul>
  170. <h3>Usage:</h3>
  171. <ul>
  172. <pre class="example">mynet:set_h_margin()</pre>
  173. </ul>
  174. </dd>
  175. <dt>
  176. <a name = "set_background_color"></a>
  177. <strong>set_background_color (color)</strong>
  178. </dt>
  179. <dd>
  180. Fill all the widget (width * height) with this color (default is none ).
  181. <h3>Parameters:</h3>
  182. <ul>
  183. <li><span class="parameter">color</span>
  184. a string "#rrggbbaa" or "#rrggbb"
  185. </li>
  186. </ul>
  187. <h3>Usage:</h3>
  188. <ul>
  189. <pre class="example">mynet:set_background_color(<span class="global">string</span>) --&gt;<span class="string">"#rrggbbaa"</span></pre>
  190. </ul>
  191. </dd>
  192. <dt>
  193. <a name = "set_background_graph_color"></a>
  194. <strong>set_background_graph_color (color)</strong>
  195. </dt>
  196. <dd>
  197. Fill the graph area background with this color (default is none).
  198. <h3>Parameters:</h3>
  199. <ul>
  200. <li><span class="parameter">color</span>
  201. a string "#rrggbbaa" or "#rrggbb"
  202. </li>
  203. </ul>
  204. <h3>Usage:</h3>
  205. <ul>
  206. <pre class="example">mynet:set_background_graph_color(<span class="global">string</span>) --&gt;<span class="string">"#rrggbbaa"</span></pre>
  207. </ul>
  208. </dd>
  209. <dt>
  210. <a name = "set_graph_color"></a>
  211. <strong>set_graph_color (color)</strong>
  212. </dt>
  213. <dd>
  214. Define the graph/arrows color.
  215. <h3>Parameters:</h3>
  216. <ul>
  217. <li><span class="parameter">color</span>
  218. a string "#rrggbbaa" or "#rrggbb"
  219. </li>
  220. </ul>
  221. <h3>Usage:</h3>
  222. <ul>
  223. <pre class="example">mynet:set_graph_color(<span class="global">string</span>) --&gt;<span class="string">"#rrggbbaa"</span></pre>
  224. </ul>
  225. </dd>
  226. <dt>
  227. <a name = "set_graph_line_color"></a>
  228. <strong>set_graph_line_color (color)</strong>
  229. </dt>
  230. <dd>
  231. Set an outline on the arrows with this color.
  232. <h3>Parameters:</h3>
  233. <ul>
  234. <li><span class="parameter">color</span>
  235. a string "#rrggbbaa" or "#rrggbb"
  236. </li>
  237. </ul>
  238. <h3>Usage:</h3>
  239. <ul>
  240. <pre class="example">mynet:set_graph_line_color(<span class="global">string</span>) --&gt;<span class="string">"#rrggbbaa"</span></pre>
  241. </ul>
  242. </dd>
  243. <dt>
  244. <a name = "set_show_text"></a>
  245. <strong>set_show_text (boolean)</strong>
  246. </dt>
  247. <dd>
  248. Display or not upload/download informations.
  249. <h3>Parameters:</h3>
  250. <ul>
  251. <li><span class="parameter">boolean</span>
  252. true or false default is false
  253. </li>
  254. </ul>
  255. <h3>Usage:</h3>
  256. <ul>
  257. <pre class="example">mynet:set_show_text(boolean) --&gt; <span class="keyword">true</span> <span class="keyword">or</span> <span class="keyword">false</span></pre>
  258. </ul>
  259. </dd>
  260. <dt>
  261. <a name = "set_text_color"></a>
  262. <strong>set_text_color (color)</strong>
  263. </dt>
  264. <dd>
  265. Define the text color.
  266. <h3>Parameters:</h3>
  267. <ul>
  268. <li><span class="parameter">color</span>
  269. a string "#rrggbbaa" or "#rrggbb"
  270. </li>
  271. </ul>
  272. <h3>Usage:</h3>
  273. <ul>
  274. <pre class="example">mynet:set_text_color(<span class="global">string</span>) --&gt;<span class="string">"#rrggbbaa"</span></pre>
  275. </ul>
  276. </dd>
  277. <dt>
  278. <a name = "set_text_background_color"></a>
  279. <strong>set_text_background_color (color)</strong>
  280. </dt>
  281. <dd>
  282. Set a color behind the text.
  283. <h3>Parameters:</h3>
  284. <ul>
  285. <li><span class="parameter">color</span>
  286. a string "#rrggbbaa" or "#rrggbb"
  287. </li>
  288. </ul>
  289. <h3>Usage:</h3>
  290. <ul>
  291. <pre class="example">mynet:set_text_background_color(<span class="global">string</span>) --&gt;<span class="string">"#rrggbbaa"</span></pre>
  292. </ul>
  293. </dd>
  294. <dt>
  295. <a name = "set_font_size"></a>
  296. <strong>set_font_size (size)</strong>
  297. </dt>
  298. <dd>
  299. Set the size of the font to use.
  300. <h3>Parameters:</h3>
  301. <ul>
  302. <li><span class="parameter">size</span>
  303. the font size
  304. </li>
  305. </ul>
  306. <h3>Usage:</h3>
  307. <ul>
  308. <pre class="example">mynet:set_font_size(integer)</pre>
  309. </ul>
  310. </dd>
  311. <dt>
  312. <a name = "set_font"></a>
  313. <strong>set_font (font)</strong>
  314. </dt>
  315. <dd>
  316. Set the font to use.
  317. <h3>Parameters:</h3>
  318. <ul>
  319. <li><span class="parameter">font</span>
  320. a string that contains the font name family and weight
  321. </li>
  322. </ul>
  323. <h3>Usage:</h3>
  324. <ul>
  325. <pre class="example">mynet:set_font(<span class="global">string</span>)</pre>
  326. </ul>
  327. </dd>
  328. <dt>
  329. <a name = "net:set_ippopup"></a>
  330. <strong>net:set_ippopup ()</strong>
  331. </dt>
  332. <dd>
  333. Add a popup on the widget that displays informations on the current network connection.
  334. <h3>Usage:</h3>
  335. <ul>
  336. <pre class="example">mynet:set_ippopup()</pre>
  337. </ul>
  338. </dd>
  339. <dt>
  340. <a name = "net:set_height"></a>
  341. <strong>net:set_height (height)</strong>
  342. </dt>
  343. <dd>
  344. Set the n_graph height.
  345. <h3>Parameters:</h3>
  346. <ul>
  347. <li><span class="parameter">height</span>
  348. The height to set.
  349. </li>
  350. </ul>
  351. </dd>
  352. <dt>
  353. <a name = "net:set_width"></a>
  354. <strong>net:set_width (width)</strong>
  355. </dt>
  356. <dd>
  357. Set the graph width.
  358. <h3>Parameters:</h3>
  359. <ul>
  360. <li><span class="parameter">width</span>
  361. The width to set.
  362. </li>
  363. </ul>
  364. </dd>
  365. <dt>
  366. <a name = "net.new"></a>
  367. <strong>net.new (args)</strong>
  368. </dt>
  369. <dd>
  370. Create a n_graph widget.
  371. <h3>Parameters:</h3>
  372. <ul>
  373. <li><span class="parameter">args</span>
  374. Standard widget() arguments. You should add width and height and interface
  375. </li>
  376. </ul>
  377. <h3>Returns:</h3>
  378. <ol>
  379. A graph widget.
  380. </ol>
  381. <h3>Usage:</h3>
  382. <ul>
  383. <pre class="example">mynet = blingbling.net({width = <span class="number">100</span>, height = <span class="number">20</span>, interface = <span class="string">"eth0"</span>})</pre>
  384. </ul>
  385. </dd>
  386. </dl>
  387. </div> <!-- id="content" -->
  388. </div> <!-- id="main" -->
  389. <div id="about">
  390. <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
  391. <i style="float:right;">Last updated 2015-08-04 10:16:50 </i>
  392. </div> <!-- id="about" -->
  393. </div> <!-- id="container" -->
  394. </body>
  395. </html>