123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html>
- <head>
- <title>Module goo.textinput</title>
- <link rel="stylesheet" href="../luadoc.css" type="text/css" />
- <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
- </head>
- <body>
- <div id="container">
- <div id="product">
- <div id="product_logo"></div>
- <div id="product_name"><big><b></b></big></div>
- <div id="product_description"></div>
- </div> <!-- id="product" -->
- <div id="main">
- <div id="navigation">
- <h1>Goo</h1>
- <ul>
-
- <li><a href="../index.html">Index</a></li>
-
- </ul>
- <!-- Module list -->
- <h1>Modules</h1>
- <ul>
- <li>
- <a href="../modules/anim.html">anim</a>
- </li>
- <li>
- <a href="../modules/goo.html">goo</a>
- </li>
- <li>
- <a href="../modules/goo.button.html">goo.button</a>
- </li>
- <li>
- <a href="../modules/goo.checkbox.html">goo.checkbox</a>
- </li>
- <li>
- <a href="../modules/goo.colorpick.html">goo.colorpick</a>
- </li>
- <li>
- <a href="../modules/goo.image.html">goo.image</a>
- </li>
- <li>
- <a href="../modules/goo.null.html">goo.null</a>
- </li>
- <li>
- <a href="../modules/goo.object.html">goo.object</a>
- </li>
- <li>
- <a href="../modules/goo.panel.html">goo.panel</a>
- </li>
- <li>
- <a href="../modules/goo.progressbar.html">goo.progressbar</a>
- </li>
- <li>
- <a href="../modules/goo.text.html">goo.text</a>
- </li>
- <li><strong>goo.textinput</strong></li>
-
- </ul>
- <!-- File list -->
- </div><!-- id="navigation" -->
- <div id="content">
- <h1>Module <code>goo.textinput</code></h1>
- <p>A box you can input text to. Supports all characters, lowercase and uppercase. Multiline text and caret movement.</p>
- <h2>Functions</h2>
- <table class="function_list">
- <tr>
- <td class="name" nowrap><a href="#goo.textinput:getCaretPos">goo.textinput:getCaretPos</a> ()</td>
- <td class="summary">Get the position of the caret on the current line.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.textinput:getLinePos">goo.textinput:getLinePos</a> ()</td>
- <td class="summary">Get the line number the caret is on.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.textinput:getMultiline">goo.textinput:getMultiline</a> ()</td>
- <td class="summary">Get's if the textinput is in multiline mode </td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.textinput:getText">goo.textinput:getText</a> ()</td>
- <td class="summary">Get the text inside the textinput.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.textinput:insert">goo.textinput:insert</a> (text, pos)</td>
- <td class="summary">Insert text on the current line at the specified position.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.textinput:newline">goo.textinput:newline</a> (line_pos)</td>
- <td class="summary">Create a new line </td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.textinput:onKeyReturn">goo.textinput:onKeyReturn</a> ()</td>
- <td class="summary">Callback function called when the return key is pressed </td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.textinput:onKeypressed">goo.textinput:onKeypressed</a> (key, unicode)</td>
- <td class="summary">Callback function when the key is pressed.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.textinput:remove">goo.textinput:remove</a> (pos, length)</td>
- <td class="summary">Remove text on the current line at the specified position.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.textinput:removeline">goo.textinput:removeline</a> (line_pos)</td>
- <td class="summary">Removes a line of text.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.textinput:setCaretPos">goo.textinput:setCaretPos</a> (caretpos)</td>
- <td class="summary">Set the position of the caret on the current line </td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.textinput:setLinePos">goo.textinput:setLinePos</a> (linepos)</td>
- <td class="summary">Sets the line position of the caret </td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.textinput:setMultiline">goo.textinput:setMultiline</a> (multiline)</td>
- <td class="summary">Set the text input's multiline mode.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.textinput:setText">goo.textinput:setText</a> (text)</td>
- <td class="summary">Sets the text of the box, new lines ignored if not multiline.</td>
- </tr>
- </table>
- <br/>
- <br/>
- <h2><a name="functions"></a>Functions</h2>
- <dl class="function">
- <dt><a name="goo.textinput:getCaretPos"></a><span>goo.textinput:</span><strong>getCaretPos</strong> ( )</dt>
- <dd>
- <p class="func_description">Get the position of the caret on the current line. <br/>The position is relative to the line it's on.</p>
- <h3>Return value:</h3>
- <p class="func_return">number: the position of the caret, 1 is first character.</p>
- <h3>See also:</h3>
- <ul>
-
- <li><a href="">
- goo.textinput:getLinePos
- </a>
-
- <li><a href="">
- goo.textinput:setCaretPos
- </a>
-
- </ul>
- </dd>
- <dt><a name="goo.textinput:getLinePos"></a><span>goo.textinput:</span><strong>getLinePos</strong> ( )</dt>
- <dd>
- <p class="func_description">Get the line number the caret is on.</p>
- <h3>Return value:</h3>
- <p class="func_return">number: the line the caret is on, 1 is first line.</p>
- <h3>See also:</h3>
- <ul>
-
- <li><a href="">
- goo.textinput:setLinePos
- </a>
-
- <li><a href="">
- goo.textinput:getCaretPos
- </a>
-
- </ul>
- </dd>
- <dt><a name="goo.textinput:getMultiline"></a><span>goo.textinput:</span><strong>getMultiline</strong> ( )</dt>
- <dd>
- <p class="func_description">Get's if the textinput is in multiline mode</p>
- </dd>
- <dt><a name="goo.textinput:getText"></a><span>goo.textinput:</span><strong>getText</strong> ( )</dt>
- <dd>
- <p class="func_description">Get the text inside the textinput.</p>
- <h3>Return value:</h3>
- <p class="func_return">string: the text.</p>
- </dd>
- <dt><a name="goo.textinput:insert"></a><span>goo.textinput:</span><strong>insert</strong> ( text, pos )</dt>
- <dd>
- <p class="func_description">Insert text on the current line at the specified position.</p>
- <h3>Parameters</h3>
- <ul>
-
-
- <li>
- <b>text</b> <i><small>:string</small></i><br/>the text to insert.
- </li>
-
-
-
- <li>
- <b>pos</b> <i><small>:number</small></i><br/>the position to insert it at.
- </li>
-
-
- </ul>
- </dd>
- <dt><a name="goo.textinput:newline"></a><span>goo.textinput:</span><strong>newline</strong> ( line_pos )</dt>
- <dd>
- <p class="func_description">Create a new line</p>
- <h3>Parameters</h3>
- <ul>
-
-
- <li>
- <b>line_pos</b> <i><small>:number</small></i><br/>the line number to add the newline after.
- </li>
-
-
- </ul>
- </dd>
- <dt><a name="goo.textinput:onKeyReturn"></a><span>goo.textinput:</span><strong>onKeyReturn</strong> ( )</dt>
- <dd>
- <p class="func_description">Callback function called when the return key is pressed</p>
- </dd>
- <dt><a name="goo.textinput:onKeypressed"></a><span>goo.textinput:</span><strong>onKeypressed</strong> ( key, unicode )</dt>
- <dd>
- <p class="func_description">Callback function when the key is pressed. <br/>this will not override the functionality of the text input, <br/>if you wish to override keypresses use goo.textinput:keypressed() instead.</p>
- <h3>Parameters</h3>
- <ul>
-
-
- <li>
- <b>key</b> <i><small>:string</small></i><br/>the keyConstant of the key pressed.
- </li>
-
-
-
- <li>
- <b>unicode</b> <i><small>:number</small></i><br/>the unicode value of the key pressed.
- </li>
-
-
- </ul>
- </dd>
- <dt><a name="goo.textinput:remove"></a><span>goo.textinput:</span><strong>remove</strong> ( pos, length )</dt>
- <dd>
- <p class="func_description">Remove text on the current line at the specified position.</p>
- <h3>Parameters</h3>
- <ul>
-
-
- <li>
- <b>pos</b> <i><small>:number</small></i><br/>the position to start removing.
- </li>
-
-
-
- <li>
- <b>length</b> <i><small>:number</small></i><br/>the number of character after pos to remove.
- </li>
-
-
- </ul>
- </dd>
- <dt><a name="goo.textinput:removeline"></a><span>goo.textinput:</span><strong>removeline</strong> ( line_pos )</dt>
- <dd>
- <p class="func_description">Removes a line of text.</p>
- <h3>Parameters</h3>
- <ul>
-
-
- <li>
- <b>line_pos</b> <i><small>:number</small></i><br/>thr line number to remove.
- </li>
-
-
- </ul>
- </dd>
- <dt><a name="goo.textinput:setCaretPos"></a><span>goo.textinput:</span><strong>setCaretPos</strong> ( caretpos )</dt>
- <dd>
- <p class="func_description">Set the position of the caret on the current line</p>
- <h3>Parameters</h3>
- <ul>
-
-
- <li>
- <b>caretpos</b> <i><small>:number</small></i><br/>the position of the caret, 1 is first character
- </li>
-
-
- </ul>
- <h3>See also:</h3>
- <ul>
-
- <li><a href="">
- goo.textinput:setCaretPos
- </a>
-
- </ul>
- </dd>
- <dt><a name="goo.textinput:setLinePos"></a><span>goo.textinput:</span><strong>setLinePos</strong> ( linepos )</dt>
- <dd>
- <p class="func_description">Sets the line position of the caret</p>
- </dd>
- <dt><a name="goo.textinput:setMultiline"></a><span>goo.textinput:</span><strong>setMultiline</strong> ( multiline )</dt>
- <dd>
- <p class="func_description">Set the text input's multiline mode.</p>
- <h3>Parameters</h3>
- <ul>
-
-
- <li>
- <b>multiline</b> <i><small>:bool</small></i><br/>true to allow multiple lines, false to not.
- </li>
-
-
- </ul>
- </dd>
- <dt><a name="goo.textinput:setText"></a><span>goo.textinput:</span><strong>setText</strong> ( text )</dt>
- <dd>
- <p class="func_description">Sets the text of the box, new lines ignored if not multiline.</p>
- <h3>See also:</h3>
- <ul>
-
- <li><a href="">
- goo.textinput:setMultiline
- </a>
-
- </ul>
- </dd>
- </dl>
- </div> <!-- id="content" -->
- </div> <!-- id="main" -->
- <div id="about">
- <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
- </div> <!-- id="about" -->
- </div> <!-- id="container" -->
- </body>
- </html>
|