blingbling.progress_graph.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  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><a href="../modules/blingbling.widget.html">blingbling.widget</a></li>
  35. <li><a href="../modules/blingbling.popups.html">blingbling.popups</a></li>
  36. <li><strong>blingbling.progress_graph</strong></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.progress_graph</code></h1>
  51. <p>A progress graph widget.</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_background_color">set_background_color (graph, color)</a></td>
  57. <td class="summary">Fill all the widget (width * height) with this color (default is none ).</td>
  58. </tr>
  59. <tr>
  60. <td class="name" nowrap><a href="#set_graph_background_color">set_graph_background_color (graph, color)</a></td>
  61. <td class="summary">Fill the graph area background with this color (default is none).</td>
  62. </tr>
  63. <tr>
  64. <td class="name" nowrap><a href="#set_rounded_size">set_rounded_size (graph, rounded_size)</a></td>
  65. <td class="summary">Set rounded corners for background and graph background.</td>
  66. </tr>
  67. <tr>
  68. <td class="name" nowrap><a href="#set_v_margin">set_v_margin (graph, margin)</a></td>
  69. <td class="summary">Define the top and bottom margin for the graph area.</td>
  70. </tr>
  71. <tr>
  72. <td class="name" nowrap><a href="#set_h_margin">set_h_margin (graph, margin)</a></td>
  73. <td class="summary">Define the left and right margin for the graph area.</td>
  74. </tr>
  75. <tr>
  76. <td class="name" nowrap><a href="#set_graph_color">set_graph_color (graph, color)</a></td>
  77. <td class="summary">Define the graph color.</td>
  78. </tr>
  79. <tr>
  80. <td class="name" nowrap><a href="#set_graph_line_color">set_graph_line_color (graph, color)</a></td>
  81. <td class="summary">Define the graph outline.</td>
  82. </tr>
  83. <tr>
  84. <td class="name" nowrap><a href="#set_show_text">set_show_text (graph, boolean)</a></td>
  85. <td class="summary">Display text on the graph or not.</td>
  86. </tr>
  87. <tr>
  88. <td class="name" nowrap><a href="#set_value_format">set_value_format (graph, printf)</a></td>
  89. <td class="summary">Define displayed text value format string</td>
  90. </tr>
  91. <tr>
  92. <td class="name" nowrap><a href="#set_text_color">set_text_color (graph, color)</a></td>
  93. <td class="summary">Define the color of the text.</td>
  94. </tr>
  95. <tr>
  96. <td class="name" nowrap><a href="#set_text_background_color">set_text_background_color (graph, color)</a></td>
  97. <td class="summary">Define the background color of the text.</td>
  98. </tr>
  99. <tr>
  100. <td class="name" nowrap><a href="#set_font_size">set_font_size (graph, size)</a></td>
  101. <td class="summary">Define the text font size.</td>
  102. </tr>
  103. <tr>
  104. <td class="name" nowrap><a href="#set_label">set_label (graph, text)</a></td>
  105. <td class="summary">Define the template of the text to display.</td>
  106. </tr>
  107. <tr>
  108. <td class="name" nowrap><a href="#set_horizontal">set_horizontal (graph, boolean)</a></td>
  109. <td class="summary">Define if the graph should increase/decrease horizontaly.</td>
  110. </tr>
  111. <tr>
  112. <td class="name" nowrap><a href="#set_value">set_value (p_graph, value)</a></td>
  113. <td class="summary">Set the p_graph value.</td>
  114. </tr>
  115. <tr>
  116. <td class="name" nowrap><a href="#progressgraph:set_height">progressgraph:set_height (height)</a></td>
  117. <td class="summary">Set the p_graph height.</td>
  118. </tr>
  119. <tr>
  120. <td class="name" nowrap><a href="#progressgraph:set_width">progressgraph:set_width (width)</a></td>
  121. <td class="summary">Set the p_graph width.</td>
  122. </tr>
  123. <tr>
  124. <td class="name" nowrap><a href="#progressgraph.new">progressgraph.new (args)</a></td>
  125. <td class="summary">Create a p_graph widget.</td>
  126. </tr>
  127. </table>
  128. <br/>
  129. <br/>
  130. <h2><a name="Functions"></a>Functions</h2>
  131. <dl class="function">
  132. <dt>
  133. <a name = "set_background_color"></a>
  134. <strong>set_background_color (graph, color)</strong>
  135. </dt>
  136. <dd>
  137. Fill all the widget (width * height) with this color (default is none ).
  138. <h3>Parameters:</h3>
  139. <ul>
  140. <li><span class="parameter">graph</span>
  141. the graph
  142. </li>
  143. <li><span class="parameter">color</span>
  144. a string "#rrggbbaa" or "#rrggbb"
  145. </li>
  146. </ul>
  147. <h3>Usage:</h3>
  148. <ul>
  149. <pre class="example">mygraph:set_background_color(<span class="global">string</span>) --&gt;<span class="string">"#rrggbbaa"</span></pre>
  150. </ul>
  151. </dd>
  152. <dt>
  153. <a name = "set_graph_background_color"></a>
  154. <strong>set_graph_background_color (graph, color)</strong>
  155. </dt>
  156. <dd>
  157. Fill the graph area background with this color (default is none).
  158. <h3>Parameters:</h3>
  159. <ul>
  160. <li><span class="parameter">graph</span>
  161. the graph
  162. </li>
  163. <li><span class="parameter">color</span>
  164. a string "#rrggbbaa" or "#rrggbb"
  165. </li>
  166. </ul>
  167. <h3>Usage:</h3>
  168. <ul>
  169. <pre class="example">mygraph:set_graph_background_color(<span class="global">string</span>) --&gt;<span class="string">"#rrggbbaa"</span></pre>
  170. </ul>
  171. </dd>
  172. <dt>
  173. <a name = "set_rounded_size"></a>
  174. <strong>set_rounded_size (graph, rounded_size)</strong>
  175. </dt>
  176. <dd>
  177. Set rounded corners for background and graph background.
  178. <h3>Parameters:</h3>
  179. <ul>
  180. <li><span class="parameter">graph</span>
  181. the graph
  182. </li>
  183. <li><span class="parameter">rounded_size</span>
  184. float in [0,1]
  185. </li>
  186. </ul>
  187. <h3>Usage:</h3>
  188. <ul>
  189. <pre class="example">mygraph:set_rounded_size(a) -&gt; a <span class="keyword">in</span> [<span class="number">0</span>,<span class="number">1</span>]</pre>
  190. </ul>
  191. </dd>
  192. <dt>
  193. <a name = "set_v_margin"></a>
  194. <strong>set_v_margin (graph, margin)</strong>
  195. </dt>
  196. <dd>
  197. Define the top and bottom margin for the graph area.
  198. <h3>Parameters:</h3>
  199. <ul>
  200. <li><span class="parameter">graph</span>
  201. the graph
  202. </li>
  203. <li><span class="parameter">margin</span>
  204. an integer for top and bottom margin
  205. </li>
  206. </ul>
  207. <h3>Usage:</h3>
  208. <ul>
  209. <pre class="example">mygraph:set_v_margin(integer)</pre>
  210. </ul>
  211. </dd>
  212. <dt>
  213. <a name = "set_h_margin"></a>
  214. <strong>set_h_margin (graph, margin)</strong>
  215. </dt>
  216. <dd>
  217. Define the left and right margin for the graph area.
  218. <h3>Parameters:</h3>
  219. <ul>
  220. <li><span class="parameter">graph</span>
  221. the graph
  222. </li>
  223. <li><span class="parameter">margin</span>
  224. an integer for left and right margin
  225. </li>
  226. </ul>
  227. <h3>Usage:</h3>
  228. <ul>
  229. <pre class="example">mygraph:set_h_margin(integer)</pre>
  230. </ul>
  231. </dd>
  232. <dt>
  233. <a name = "set_graph_color"></a>
  234. <strong>set_graph_color (graph, color)</strong>
  235. </dt>
  236. <dd>
  237. Define the graph color.
  238. <h3>Parameters:</h3>
  239. <ul>
  240. <li><span class="parameter">graph</span>
  241. the graph
  242. </li>
  243. <li><span class="parameter">color</span>
  244. a string "#rrggbbaa" or "#rrggbb"
  245. </li>
  246. </ul>
  247. <h3>Usage:</h3>
  248. <ul>
  249. <pre class="example">mygraph:set_graph_color(<span class="global">string</span>) --&gt;<span class="string">"#rrggbbaa"</span></pre>
  250. </ul>
  251. </dd>
  252. <dt>
  253. <a name = "set_graph_line_color"></a>
  254. <strong>set_graph_line_color (graph, color)</strong>
  255. </dt>
  256. <dd>
  257. Define the graph outline.
  258. <h3>Parameters:</h3>
  259. <ul>
  260. <li><span class="parameter">graph</span>
  261. the graph
  262. </li>
  263. <li><span class="parameter">color</span>
  264. a string "#rrggbbaa" or "#rrggbb"
  265. </li>
  266. </ul>
  267. <h3>Usage:</h3>
  268. <ul>
  269. <pre class="example">mygraph:set_graph_line_color(<span class="global">string</span>) --&gt;<span class="string">"#rrggbbaa"</span></pre>
  270. </ul>
  271. </dd>
  272. <dt>
  273. <a name = "set_show_text"></a>
  274. <strong>set_show_text (graph, boolean)</strong>
  275. </dt>
  276. <dd>
  277. Display text on the graph or not.
  278. <h3>Parameters:</h3>
  279. <ul>
  280. <li><span class="parameter">graph</span>
  281. the graph
  282. </li>
  283. <li><span class="parameter">boolean</span>
  284. true or false (default is false)
  285. </li>
  286. </ul>
  287. <h3>Usage:</h3>
  288. <ul>
  289. <pre class="example">mygraph:set_show_text(boolean) --&gt; <span class="keyword">true</span> <span class="keyword">or</span> <span class="keyword">false</span></pre>
  290. </ul>
  291. </dd>
  292. <dt>
  293. <a name = "set_value_format"></a>
  294. <strong>set_value_format (graph, printf)</strong>
  295. </dt>
  296. <dd>
  297. Define displayed text value format string
  298. <h3>Parameters:</h3>
  299. <ul>
  300. <li><span class="parameter">graph</span>
  301. the graph
  302. </li>
  303. <li><span class="parameter">printf</span>
  304. format string for display text
  305. </li>
  306. </ul>
  307. <h3>Usage:</h3>
  308. <ul>
  309. <pre class="example">mygraph:set_value_format(<span class="global">string</span>) --&gt; <span class="string">"%2.f"</span></pre>
  310. </ul>
  311. </dd>
  312. <dt>
  313. <a name = "set_text_color"></a>
  314. <strong>set_text_color (graph, color)</strong>
  315. </dt>
  316. <dd>
  317. Define the color of the text.
  318. <h3>Parameters:</h3>
  319. <ul>
  320. <li><span class="parameter">graph</span>
  321. the graph
  322. </li>
  323. <li><span class="parameter">color</span>
  324. a string "#rrggbbaa" or "#rrggbb" defaul is white
  325. </li>
  326. </ul>
  327. <h3>Usage:</h3>
  328. <ul>
  329. <pre class="example">mygraph:set_text_color(<span class="global">string</span>) --&gt;<span class="string">"#rrggbbaa"</span></pre>
  330. </ul>
  331. </dd>
  332. <dt>
  333. <a name = "set_text_background_color"></a>
  334. <strong>set_text_background_color (graph, color)</strong>
  335. </dt>
  336. <dd>
  337. Define the background color of the text.
  338. <h3>Parameters:</h3>
  339. <ul>
  340. <li><span class="parameter">graph</span>
  341. the graph
  342. </li>
  343. <li><span class="parameter">color</span>
  344. a string "#rrggbbaa" or "#rrggbb"
  345. </li>
  346. </ul>
  347. <h3>Usage:</h3>
  348. <ul>
  349. <pre class="example">mygraph:set_text_background_color(<span class="global">string</span>) --&gt;<span class="string">"#rrggbbaa"</span></pre>
  350. </ul>
  351. </dd>
  352. <dt>
  353. <a name = "set_font_size"></a>
  354. <strong>set_font_size (graph, size)</strong>
  355. </dt>
  356. <dd>
  357. Define the text font size.
  358. <h3>Parameters:</h3>
  359. <ul>
  360. <li><span class="parameter">graph</span>
  361. the graph
  362. </li>
  363. <li><span class="parameter">size</span>
  364. the font size
  365. </li>
  366. </ul>
  367. <h3>Usage:</h3>
  368. <ul>
  369. <pre class="example">mygraph:set_font_size(integer)</pre>
  370. </ul>
  371. </dd>
  372. <dt>
  373. <a name = "set_label"></a>
  374. <strong>set_label (graph, text)</strong>
  375. </dt>
  376. <dd>
  377. Define the template of the text to display.
  378. <h3>Parameters:</h3>
  379. <ul>
  380. <li><span class="parameter">graph</span>
  381. the graph
  382. </li>
  383. <li><span class="parameter">text</span>
  384. the text to display
  385. </li>
  386. </ul>
  387. <h3>Usage:</h3>
  388. <ul>
  389. <pre class="example"> mygraph:set_label(<span class="global">string</span>)
  390. By default the text is : (value_send_to_the_widget *<span class="number">100</span>) .. <span class="string">"%"</span>
  391. static <span class="global">string</span>: example set_label(<span class="string">"CPU usage:"</span>) will display <span class="string">"CUP usage:"</span> on the graph
  392. dynamic <span class="global">string</span>: use $percent <span class="keyword">in</span> the <span class="global">string</span> example set_label(<span class="string">"Load $percent %"</span>) will display <span class="string">"Load 10%"</span> </pre>
  393. </ul>
  394. </dd>
  395. <dt>
  396. <a name = "set_horizontal"></a>
  397. <strong>set_horizontal (graph, boolean)</strong>
  398. </dt>
  399. <dd>
  400. Define if the graph should increase/decrease horizontaly.
  401. <h3>Parameters:</h3>
  402. <ul>
  403. <li><span class="parameter">graph</span>
  404. the graph
  405. </li>
  406. <li><span class="parameter">boolean</span>
  407. true or false (false by default)
  408. </li>
  409. </ul>
  410. <h3>Usage:</h3>
  411. <ul>
  412. <pre class="example">mygraph:set_horizontal(boolean) --&gt; <span class="keyword">true</span> <span class="keyword">or</span> <span class="keyword">false</span></pre>
  413. </ul>
  414. </dd>
  415. <dt>
  416. <a name = "set_value"></a>
  417. <strong>set_value (p_graph, value)</strong>
  418. </dt>
  419. <dd>
  420. Set the p_graph value.
  421. <h3>Parameters:</h3>
  422. <ul>
  423. <li><span class="parameter">p_graph</span>
  424. The progress bar.
  425. </li>
  426. <li><span class="parameter">value</span>
  427. The progress bar value between 0 and 1.
  428. </li>
  429. </ul>
  430. </dd>
  431. <dt>
  432. <a name = "progressgraph:set_height"></a>
  433. <strong>progressgraph:set_height (height)</strong>
  434. </dt>
  435. <dd>
  436. Set the p_graph height.
  437. <h3>Parameters:</h3>
  438. <ul>
  439. <li><span class="parameter">height</span>
  440. The height to set.
  441. </li>
  442. </ul>
  443. </dd>
  444. <dt>
  445. <a name = "progressgraph:set_width"></a>
  446. <strong>progressgraph:set_width (width)</strong>
  447. </dt>
  448. <dd>
  449. Set the p_graph width.
  450. <h3>Parameters:</h3>
  451. <ul>
  452. <li><span class="parameter">width</span>
  453. The width to set.
  454. </li>
  455. </ul>
  456. </dd>
  457. <dt>
  458. <a name = "progressgraph.new"></a>
  459. <strong>progressgraph.new (args)</strong>
  460. </dt>
  461. <dd>
  462. Create a p_graph widget.
  463. <h3>Parameters:</h3>
  464. <ul>
  465. <li><span class="parameter">args</span>
  466. Standard widget() arguments. You should add width and height
  467. key to set p_graph geometry.
  468. </li>
  469. </ul>
  470. <h3>Returns:</h3>
  471. <ol>
  472. A p_graph widget.
  473. </ol>
  474. </dd>
  475. </dl>
  476. </div> <!-- id="content" -->
  477. </div> <!-- id="main" -->
  478. <div id="about">
  479. <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
  480. <i style="float:right;">Last updated 2015-08-04 10:16:50 </i>
  481. </div> <!-- id="about" -->
  482. </div> <!-- id="container" -->
  483. </body>
  484. </html>