1
0
mirror of https://github.com/elua/elua.git synced 2025-01-08 20:56:17 +08:00
elua/doc/eluadoc/refman_gen_term.lua
Dado Sutter 17487f9ebe - doc folder replaced by some work done on Led Lab for the new doc and site
- This should actually be a merge but we made a mistake on the initial repo creation
  and a merge was not possible.
- Below there is a resumed log of the commit messages for the few steps, just for
  the record.

- The merged commit messages for this work are:

 - Removing Portuguese doc content
 - Ignore folder names fixed on .gitignore
 - Removed doc files which content migrated to the CMS
 - docdata.lua updated accordingly
 - Doc build checked ok
 - Overall doc structure and contents still being refined
 - Removing folder cache from git versioning
 - Removing folder dist from git versioning. The folders above are generated by the buildall.lua script and are not part of the sources
 - Adding .gitignore file with objects info to inform git what to ignore
 - Removed file
 - Merge branch 'master' of git@repos.giga.puc-rio.br:elua-doc.git
 - Moving all files and folders to a working doc folder
 - Css updated
 - Index page added and CSS adjusts
 - Merge branch 'master' of git@repos.giga.puc-rio.br:elua-doc.git
 - Signed-off-by: Guilherme Sanchez <guilhermesanchezpacheco@gmail.com>
 - Merge branch 'master' of git@repos.giga.puc-rio.br:elua-doc.git
 - files deleted
 - Changed function that creates functions submenus.
 - Menu inserted with árvore, CSS adjusts, google search
 - Changed past design to new design
 - CSS updated
 - initial import

- The commit ids were also preserved but they are related to this "other"
  work done on Led Lab. We'll keep the repo just in case.

4dce3f77c47b0c3001a2075a946e80ee52759b49 - Removing Portuguese doc content
78d8847525cacf045fe7e672cff6bd1e058a6a4b Ignore folder names fixed on .gitignore
48dee6b7962168ab1098bf709ead6f3cfe6b7964 - Removed doc files which content migrated to the CMS - docdata.lua updated accordingly - Doc build checked ok - Overall doc structure and contents still being refined
2aa2fe0c554db03dbc7029c34d0f4500fe625b37 - Removing folder cache from git versioning - Removing folder dist from git versioning   The folders above are generated by the buildall.lua script and are not part of the sources - Adding .gitignore file with objects info to inform git what to ignore
af6cc2890edf1855af319dc999a03feee5f9bee0 Removed file
6a180e72eb4f4860620cafc0685000e9f2174cfe Merge branch 'master' of git@repos.giga.puc-rio.br:elua-doc.git
eb430112e78ae537459ab315e228ebca84bdf2d4 Moving all files and folders to a working doc folder
d28a7c99489915630bd2625f3756fecf0d08ce37 Css updated
32836ffe382f04ab07c3e6f018c7b449a20d7a8d Index page added and CSS adjusts
1461d9957d9d25a1467cb57ab8717aa213a37e8d Merge branch 'master' of git@repos.giga.puc-rio.br:elua-doc.git
ae1934c04f35a29e25bb4495ae8a31cd9c000b5b Signed-off-by: Guilherme Sanchez <guilhermesanchezpacheco@gmail.com>
b5f31d70f1fac8d3fba325c9867a03f976775698 Merge branch 'master' of git@repos.giga.puc-rio.br:elua-doc.git
ec9ad8446b7ea38b252c6a416e70774349835e45 files deleted
bd7a80151b2030720ba8d8a303467d8c25a4b4b2 Changed function that creates functions submenus.
6a7494acaec694fadbb13520bcbccc51a6b95dfe Inserido menu com árvore, ajustes no CSS, busca do google
e979f1c259d425c9a3be83f9cda20eddffe073bb Changed past design to new design.
381459e95286886b052103a0253e60b29e064d7a CSS updated
4f81d2f1195efe733fe5f97517be325d75937bc3 initial import
2011-05-06 06:49:21 -03:00

160 lines
4.2 KiB
Lua

-- eLua reference manual - term module
data_en =
{
-- Title
title = "eLua reference manual - term module",
-- Menu name
menu_name = "term",
-- Overview
overview = [[This module contains functions for accessing ANSI-compatible terminals (and terminal emulators) from Lua.]],
-- Functions
funcs =
{
{ sig = "#term.clrscr#()",
desc = "Clear the screen",
},
{ sig = "#term.clreol#()",
desc = "Clear from the current cursor position to the end of the line",
},
{ sig = "#term.moveto#( x, y )",
desc = "Move the cursor to the specified coordinates",
args=
{
"$x$ - the column (starting with 1)",
"$y$ - the line (starting with 1)"
}
},
{ sig = "#term.moveup#( delta )",
desc = "Move the cursor up",
args = "$delta$ - number of lines to move the cursor up"
},
{ sig = "#term.movedown#( delta )",
desc = "Move the cursor down",
args = "$delta$ - number of lines to move the cursor down",
},
{ sig = "#term.moveleft#( delta )",
desc = "Move the cursor left",
args = "$delta$ - number of columns to move the cursor left",
},
{ sig = "#term.moveright#( delta )",
desc = "Move the cursor right",
args = "$delta$ - number of columns to move the cursor right",
},
{ sig = "numlines = #term.getlines#()",
desc = "Get the number of lines in the terminal",
ret = "The number of lines in the terminal",
},
{ sig = "numcols = #term.getcols#()",
desc = "Get the number of columns in the terminal",
ret = "The number of columns in the terminal",
},
{ sig = "#term.print#( [ x, y ], str1, [ str2, ..., strn ] )",
desc = "Write one or more strings in the terminal",
args =
{
"$x (optional)$ - write the string at this column. If $x$ is specified, $y$ must also be specified",
"$y (optional)$ - write the string at this line. If $y$ is specified, $x$ must also be specified",
"$str1$ - the first string to write",
"$str2 (optional)$ - the second string to write",
"$strn (optional)$ - the nth string to write"
}
},
{ sig = "cx = #term.getcx#()",
desc = "Get the current column of the cursor",
ret = "The column of the cursor"
},
{ sig = "cy = #term.getcy#()",
desc = "Get the current line of the cursor",
ret = "The line of the cursor"
},
{ sig = "ch = #term.getchar#( [ mode ] )",
desc = "Read a char (a key press) from the terminal",
args = [[$mode (optional)$ - terminal input mode. It can be either:</p>
<ul>
<li>$term.WAIT$ - wait for a key to be pressed, then return it. This is the default behaviour if $mode$ is not specified. </li>
<li>$term.NOWAIT$ - if a key was pressed on the terminal return it, otherwise return -1.</li>
</ul><p>]],
ret = [[The char read from a terminal or -1 if no char is available. The 'char' can be an actual ASCII char, or a 'pseudo-char' which encodes special keys on
the keyboard. The list of the special chars and their meaning is given in the table below:</p>
<table style="text-align: left; margin-left: 2em;">
<tbody>
<tr>
<th style="text-align: left;">Key code</th>
<th style="text-align: left;">Meaning</th>
</tr>
<tr>
<td>$KC_UP$</td>
<td>the UP key on the terminal</td>
</tr>
<tr>
<td>$KC_DOWN$</td>
<td>the DOWN key on the terminal</td>
</tr>
<tr>
<td>$KC_LEFT$</td>
<td>the LEFT key on the terminal</td>
</tr>
<tr>
<td>$KC_RIGHT$</td>
<td>the RIGHT key on the terminal</td>
</tr>
<tr>
<td>$KC_HOME$</td>
<td>the HOME key on the terminal</td>
</tr>
<tr>
<td>$KC_END$</td>
<td>the END key on the terminal</td>
</tr>
<tr>
<td>$KC_PAGEUP$</td>
<td>the PAGE UP key on the terminal</td>
</tr>
<tr>
<td>$KC_PAGEDOWN$</td>
<td>the PAGE DOWN key on the terminal</td>
</tr>
<tr>
<td>$KC_ENTER$</td>
<td>the ENTER (CR) key on the terminal</td>
</tr>
<tr>
<td>$KC_TAB$</td>
<td>the TAB key on the terminal</td>
</tr>
<tr>
<td>$KC_BACKSPACE$</td>
<td>the BACKSPACE key on the terminal</td>
</tr>
<tr>
<td>$KC_ESC$</td>
<td>the ESC (escape) key on the terminal</td>
</tr>
</tbody>
</table>
<p>]]
},
},
}
data_pt = data_en