<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.inspired-lua.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Technolapin</id>
	<title>Inspired-Lua Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.inspired-lua.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Technolapin"/>
	<link rel="alternate" type="text/html" href="https://wiki.inspired-lua.org/Special:Contributions/Technolapin"/>
	<updated>2026-04-09T05:56:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://wiki.inspired-lua.org/index.php?title=User:Technolapin&amp;diff=1231</id>
		<title>User:Technolapin</title>
		<link rel="alternate" type="text/html" href="https://wiki.inspired-lua.org/index.php?title=User:Technolapin&amp;diff=1231"/>
		<updated>2014-12-05T17:32:51Z</updated>

		<summary type="html">&lt;p&gt;Technolapin: Created page with &amp;quot;Hi, im a troll. I know very well lua (but not enought) and I catched a strange curse when writing some crap in jen's scriptor near an indian Cemetery: I can't finish any program!...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, im a troll.&lt;br /&gt;
I know very well lua (but not enought) and I catched a strange curse when writing some crap in jen's scriptor near an indian Cemetery: I can't finish any program!&lt;br /&gt;
I like to do some useless programs as my -very- famous &amp;quot;pig exploder&amp;quot; and to troll on the TI-planet's chat.&lt;br /&gt;
I try to put more informations to this wiki, because it is too empty according to my tastes.&lt;/div&gt;</summary>
		<author><name>Technolapin</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inspired-lua.org/index.php?title=assert&amp;diff=1229</id>
		<title>assert</title>
		<link rel="alternate" type="text/html" href="https://wiki.inspired-lua.org/index.php?title=assert&amp;diff=1229"/>
		<updated>2014-11-08T19:57:22Z</updated>

		<summary type="html">&lt;p&gt;Technolapin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The assert() function is a way to execute functions.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
assert(foo, errmsg)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
It will try to execute the function foo and will send errmsg as an error if it fail.&lt;/div&gt;</summary>
		<author><name>Technolapin</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inspired-lua.org/index.php?title=assert&amp;diff=1228</id>
		<title>assert</title>
		<link rel="alternate" type="text/html" href="https://wiki.inspired-lua.org/index.php?title=assert&amp;diff=1228"/>
		<updated>2014-11-08T19:55:24Z</updated>

		<summary type="html">&lt;p&gt;Technolapin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The assert() function is a way to execute functions.&lt;br /&gt;
&lt;br /&gt;
assert(foo, errmsg)&lt;br /&gt;
&lt;br /&gt;
It will try to execute the function foo and will send errmsg as an error if it fail.&lt;/div&gt;</summary>
		<author><name>Technolapin</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inspired-lua.org/index.php?title=assert&amp;diff=1227</id>
		<title>assert</title>
		<link rel="alternate" type="text/html" href="https://wiki.inspired-lua.org/index.php?title=assert&amp;diff=1227"/>
		<updated>2014-11-08T19:55:11Z</updated>

		<summary type="html">&lt;p&gt;Technolapin: Created page with &amp;quot;The assert() function is a way to execute functions. assert(foo, errmsg) It will try to execute the function foo and will send errmsg as an error if it fail.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The assert() function is a way to execute functions.&lt;br /&gt;
assert(foo, errmsg)&lt;br /&gt;
It will try to execute the function foo and will send errmsg as an error if it fail.&lt;/div&gt;</summary>
		<author><name>Technolapin</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inspired-lua.org/index.php?title=Overview_of_the_API&amp;diff=1226</id>
		<title>Overview of the API</title>
		<link rel="alternate" type="text/html" href="https://wiki.inspired-lua.org/index.php?title=Overview_of_the_API&amp;diff=1226"/>
		<updated>2014-11-08T19:40:37Z</updated>

		<summary type="html">&lt;p&gt;Technolapin: /* Standard Library */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The Lua version that comes with OS 3.x is 5.1.4, without the ''io'' nor ''os'' libraries.&lt;br /&gt;
&lt;br /&gt;
Tutorials on Nspire Lua scripting in general are available here : http://inspired-lua.org/&lt;br /&gt;
&lt;br /&gt;
== Standard Library  ==&lt;br /&gt;
&lt;br /&gt;
( This has been taken from [http://www.wowwiki.com/Lua_functions a WoWWiki page] - See the full, official documentation [http://www.lua.org/manual/5.1/manual.html here] )&lt;br /&gt;
&lt;br /&gt;
=== Common Lua Functions ===&lt;br /&gt;
&lt;br /&gt;
*'''[[G]]''' - Global Variable - A global variable (not a function) that holds the global environment (that is, _G._G = _G). Lua itself does not use this variable; changing its value does not affect any environment, nor vice-versa. (Use setfenv to change environments.) - taken from Lua docs &lt;br /&gt;
*'''[[assert]]'''(value[, errormsg]) - asserts a value evaluates to true. If it is, returns value, otherwise causes a Lua error to be thrown. &lt;br /&gt;
*'''[[collectgarbage]]''' - among other things, force free unused memory.&lt;br /&gt;
*'''[[error]]'''(str) - generates an error with the str message.&lt;br /&gt;
*'''[[getfenv]]'''(function or integer) - Returns the table representing the stack frame of the given function or stack level. &lt;br /&gt;
*'''[[getmetatable]]'''(obj, mtable) - Returns the metatable of the given table or userdata object. &lt;br /&gt;
*'''[[next]]'''(table, index) - Returns the next key, value pair of the table, allowing you to walk over the table. &lt;br /&gt;
*'''[[newproxy]]'''(boolean or proxy) - Creates a userdata with a sharable metatable. &lt;br /&gt;
*'''[[print]]'''(...) - Receives any number of arguments, and prints their values. Not intended for formatted output, but only as a quick way to show a value, typically for debugging. For formatted output, use string.format.&lt;br /&gt;
*'''[[select]]'''(index, list) - Returns the number of items in list or the value of the item in list at index. &lt;br /&gt;
*'''[[setfenv]]'''(function or integer, table) - Sets the table representing the stack frame of the given function or stack level. &lt;br /&gt;
*'''[[setmetatable]]'''(obj, mtable) - Sets the metatable of the given table or userdata object. &lt;br /&gt;
*'''[[tostring]]''' - tostring (e) - Receives an argument of any type and converts it to a string in a reasonable format. For complete control of how numbers are converted, use string.format. If the metatable of e has a &amp;quot;__tostring&amp;quot; field, then tostring calls the corresponding value with e as argument, and uses the result of the call as its result. - taken from Lua Docs. &lt;br /&gt;
*'''[[tonumber]]''' - tonumber (e) - Receives an argument of the string type and converts it to a number when possible. If the metatable of e has a &amp;quot;__tonumber&amp;quot; field, then tonumber calls the corresponding value with e as argument, and uses the result of the call as its result. - taken from Lua Docs. &lt;br /&gt;
*'''[[type]]'''(var) - Returns the type of variable as a string, &amp;quot;number&amp;quot;, &amp;quot;string&amp;quot;, &amp;quot;table&amp;quot;, &amp;quot;function&amp;quot; or &amp;quot;userdata&amp;quot;. &lt;br /&gt;
*'''[[unpack]]'''(table[, start][, end]) - Returns the contents of its argument as separate values. &lt;br /&gt;
*'''[[xpcall]]'''(func, err) - Returns a boolean indicating successful execution of func and calls err on failure, additionally returning func's or err's results.&lt;br /&gt;
&lt;br /&gt;
=== Coroutines Library ===&lt;br /&gt;
The coroutines are usefull tools to control the running of differents parts of a code.&lt;br /&gt;
&lt;br /&gt;
create, wrap, resume, yield, status, running&lt;br /&gt;
&lt;br /&gt;
More information can be fouded in the [[coroutines]] page.&lt;br /&gt;
&lt;br /&gt;
=== String Library ===&lt;br /&gt;
byte, char, dump, find, format, gmatch, gsub, len, lower, match, rep, reverse, sub, upper&lt;br /&gt;
&lt;br /&gt;
=== Math Library ===&lt;br /&gt;
abs, acos, asin, atan, atan2, ceil, cos, cosh, deg, exp, floor, fmod, frexp, huge, ldexp, log, log10, max, min, modf, pi, pow, rad, random, randomseed, sin, sinh, sqrt, tan, tanh&lt;br /&gt;
More information about the other libraries can be found on the [[Extended Standard Library]] Page&lt;br /&gt;
&lt;br /&gt;
== [[:Category:D2Editor|D2Editor]] ==&lt;br /&gt;
The Lua 2D editor bindings enable 2D rich text editors to be created and manipulated within scripts.&lt;br /&gt;
* [[D2Editor:createChemBox]]() : Inserts a Chem Box in the current cursor position of the editor.&lt;br /&gt;
* [[D2Editor:createMathBox]]() : Inserts a Math Box (Expression Box) in the current cursor position of the editor.&lt;br /&gt;
* [[D2Editor:getExpression]]() : Returns the contents of the text editor as a UTF-8 encoded string.&lt;br /&gt;
* [[D2Editor:getExpressionSelection]]() : Returns three values: the contents of the text editor (UTF-8 encoded string), the cursor position, and the selection start.&lt;br /&gt;
* [[D2Editor:getText]]() : same as ''getExpression'' : Returns the contents of the text editor as a UTF-8 encoded string.&lt;br /&gt;
* [[D2Editor:hasFocus]]() : Returns true if the editor has focus; otherwise returns false.&lt;br /&gt;
* [[D2Editor:isVisible]]() : Returns true if the editor is visible; otherwise returns false.&lt;br /&gt;
* [[D2Editor:move]]() : Sets the parent-relative location of the upper left corner of the text editor. Both x and y must be between -32767 and 32767.&lt;br /&gt;
* [[D2Editor:newRichText]]() : Creates and returns a new 2D rich text editor.&lt;br /&gt;
* [[D2Editor:registerFilter]](handlerTable) : This routine registers a table of handler functions that can alter events before they are sent to the 2D editor widget, or unregisters if nil is passed.&lt;br /&gt;
* [[D2Editor:resize]](w, h) : Changes the width and height of the text editor. Both width and height must be &amp;gt; 0 and &amp;lt; 32768.&lt;br /&gt;
* [[D2Editor:setBorder]](thickness) : Sets the editor's border thickness. The thickness value must be between 0 and 10.&lt;br /&gt;
* [[D2Editor:setBorderColor]](color) : Sets the editor's border color. The color value must be between 0 and 16777215 (0x000000 and 0xFFFFFF).&lt;br /&gt;
* [[D2Editor:setColorable]](true or false) : Makes the expression colorable or uncolorable.&lt;br /&gt;
* [[D2Editor:setDisable2DinRT]](true or false) : Turns on/off 2D layout of math input to the text box.&lt;br /&gt;
* [[D2Editor:setExpression]](...) : Sets the text content of the text editor.&lt;br /&gt;
* [[D2Editor:setFocus]](true or false) : Sets the user input focus on the editor if true (the default). This is usually called from the [[on.getFocus]] event handler.&lt;br /&gt;
* [[D2Editor:setFontSize]](size) : Sets the text font size in the editor. Only 7, 9, 10, 11, 12, or 24 for the handheld, any on the desktop software.&lt;br /&gt;
* [[D2Editor:setMainFont]](family, style) : Sets the main font family (&amp;quot;serif&amp;quot; or &amp;quot;sansserif&amp;quot;) and style (&amp;quot;r&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;i&amp;quot;, &amp;quot;bi&amp;quot;).&lt;br /&gt;
* [[D2Editor:setReadOnly]](true or false) : Makes the text editor content modifiable (false) or unmodifiable (true) by the user. If a Boolean value is not specified, defaults to true.&lt;br /&gt;
* [[D2Editor:setSelectable]](true or false) : Makes the text editor content selectable (true) or unselectable (false) by the user. If a Boolean value is not specified, defaults to true.&lt;br /&gt;
* [[D2Editor:setSizeChangeListener]](function(editor, w, h)) : Sets the callback function for when the editor contents exceed the current editor size, when the contents fit on fewer lines, or when the contents fit on a single line of smaller width.&lt;br /&gt;
* [[D2Editor:setTextChangeListener]](function(editor)) : Sets the callback function for when the text expression changes, which will be to the editor object. This allows for processing text input as it occurs.&lt;br /&gt;
* [[D2Editor:setText]](...) : Same as setExpression : Sets the text content of the text editor.&lt;br /&gt;
* [[D2Editor:setTextColor]](color) : Sets the editor text color. The color value must be between 0 and 16777215 (0x000000 and 0xFFFFFF).&lt;br /&gt;
* [[D2Editor:setVisible]](true or false) : Sets the visibility of the text editor.&lt;br /&gt;
* [[D2Editor:setWordWrapWidth]](width) : Sets the rich text editor word-wrapping width in pixels. Ignored if the editor is in 2D mode. To indicate widget width, sets to 0. To disable wrapping, sets to &amp;lt; 0. The width must be -32767 to 32767.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:Events|Events]] ==&lt;br /&gt;
Events are one of the most fundamental things to know about the Nspire Lua language.&lt;br /&gt;
You can see how events are managed inside the Lua implementation [[Life Cycle|here]]. &lt;br /&gt;
&lt;br /&gt;
*'''[[on.paint]]'''(gc) is called when the GUI is painted. [[:Category:gc|'gc' is the Graphics Context]] &lt;br /&gt;
*'''[[on.resize]]''' is called when the window is rezised&lt;br /&gt;
*'''[[on.timer]]''' is called at each timer ticks. See [[:Category:timer|timer]].&amp;lt;br&amp;gt; &lt;br /&gt;
*'''[[on.arrowKey]]''' is called when an '''arrow key''' from the clickPad/TouchPad is pressed (right, left, up, down) &lt;br /&gt;
*'''[[on.arrowLeft]]''' is called when the '''left''' arrow is pressed &lt;br /&gt;
*'''[[on.arrowRight]]''' is called when the '''right''' arrow is pressed &lt;br /&gt;
*'''[[on.arrowUp]]''' is called when the up '''arrow''' is pressed &lt;br /&gt;
*'''[[on.arrowDown]]''' is called when the '''down''' arrow is pressed&lt;br /&gt;
*'''[[on.enterKey]]''' is called when the '''enter''' key is pressed. &lt;br /&gt;
*'''[[on.escapeKey]]''' is called when the '''escape''' key is pressed. &lt;br /&gt;
*'''[[on.tabKey]]''' is called when the '''tab''' key is pressed. &lt;br /&gt;
*'''[[on.deleteKey]]''' is called when the '''delete''' key is pressed. &lt;br /&gt;
*'''[[on.backspaceKey]]''' is called when the '''clear''' key is pressed. &lt;br /&gt;
*'''[[on.returnKey]]''' is called when the '''return''' key is pressed. &lt;br /&gt;
*'''[[on.contextMenu]]''' is called when the combo-key '''Ctrl Menu''' is pressed. &lt;br /&gt;
*'''[[on.backtabKey]]''' is called when the combo-key '''Maj Tab''' is pressed. &lt;br /&gt;
*'''[[on.clearKey]]''' is called when the combo-key '''Ctrl Clear''' is pressed. &lt;br /&gt;
*'''[[on.help]]''' is called when the combo-key '''Ctrl ?''' is pressed.&lt;br /&gt;
*'''[[on.charIn]]''' is called when the Nspire detects a non arrow key being pressed.&lt;br /&gt;
*'''[[on.createMathBox]]''' called when there is a MathBox created. &lt;br /&gt;
*'''[[on.create]]''' called when the script gets created. '''Deprecated in 3.2'''. See ''on.contruction''.&lt;br /&gt;
*'''[[on.construction]]''' called when the script gets created. &lt;br /&gt;
*'''[[on.deactivate]]''' called when the focus is lost on the page (like launching the document, changing page etc...) &lt;br /&gt;
*'''[[on.activate]]''' called when the focus is on the page (like launching the document, changing page etc...) &lt;br /&gt;
*'''[[on.destroy]]''' is called when the document is about to get closed (or cut)&lt;br /&gt;
*'''[[on.getFocus]]''' is called when the script receives user input focus.  	 &lt;br /&gt;
*'''[[on.loseFocus]]''' is called when the script loses user input focus. &lt;br /&gt;
*'''[[on.mouseDown]]''' is called when we press the left mouse button. X and Y are the pressed point coordinates. &lt;br /&gt;
*'''[[on.mouseUp]]''' is called when we release the left mouse button. &lt;br /&gt;
*'''[[on.mouseMove]]''' is called when the mouse moves &lt;br /&gt;
*'''[[on.grabDown]]''' is called when the grabbing motion is detected&lt;br /&gt;
*'''[[on.grabUp]]''' is called after the grabbing action.&lt;br /&gt;
*'''[[on.rightMouseDown]]''' is called when the user pushes the &amp;quot;right click&amp;quot; button&lt;br /&gt;
*'''[[on.rightMouseUp]]''' is called when the user releases the &amp;quot;right click&amp;quot; button&lt;br /&gt;
*'''[[on.keyboardUp]]'''() which fires when the tablet's on-screen keyboard gets shown.&lt;br /&gt;
*'''[[on.keyboardDown]]'''() which fires when the tablet's on-screen keyboard gets hidden.&lt;br /&gt;
*'''[[on.varChange]]''' is called when a [[var.monitor|monitored variable]] gets changed.&lt;br /&gt;
*'''[[on.getSymbolList]]''' is called when the script app symbol list is being serialized to the clipboard.&lt;br /&gt;
*'''[[on.save]]''' is called when the script app is saved to the document or copied to the clipboard.&lt;br /&gt;
*'''[[on.restore]]''' is called when the script application is restored from its saved state in a document or when the app is pasted into a document..&lt;br /&gt;
*'''[[on.cut]]'''  is called when the user cuts something.&lt;br /&gt;
*'''[[on.copy]]''' is called when the user copies something.&lt;br /&gt;
*'''[[on.paste]]''' is called when the user pastes something.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:gc|Graphics Operations]]  ==&lt;br /&gt;
'''gc''' is the Nspire's ''graphic context''. A graphics context is a module that has a handle to the script’s graphics output window and a library of graphics routines that are used to draw on the window. A graphics context is supplied to the script ”on.paint” event handler each time the window needs to be redrawn. The graphics context employs a pixel-based coordinate system with the origin in the upper left corner of the drawing window.&lt;br /&gt;
&lt;br /&gt;
*'''[[gc:clipRect]]'''(op, x, y, width, height) - Sets the clipping rectangle for subsequent graphics operations.&lt;br /&gt;
*'''[[gc:drawArc]]'''(x, y, width, height, start angle, finish angle).&lt;br /&gt;
*'''[[gc:drawImage]]'''(image,x,y) First argument in format “[[TI.Image]]”, x and y the coords.&lt;br /&gt;
*'''[[gc:drawLine]]'''(xstart, ystart, xend, yend) Draws a line starting at the point (xstart,ystart) and ending at the point (xend, yend)&lt;br /&gt;
*'''[[gc:drawPolyLine]]'''(int list1 [,int list2, .., int listN]) Draws a shape from a list contaning successively the x and y coordinates of each point the line have to draw.&lt;br /&gt;
*'''[[gc:drawRect]]'''(x, y, xwidth, yheight) Draws a rectangle at (x,y) with the “x” side being “xwidth” long and the “y” side being “yheight” long&lt;br /&gt;
*'''[[gc:drawString]]'''(string, x, y, position) position is the string’s anchor point and can be &amp;quot;baseline&amp;quot;, “bottom”, “middle”, or “top”. &lt;br /&gt;
*'''[[gc:fillArc]]'''(x, y, width, height, start angle, finish angle) see [[gc:drawArc]]&lt;br /&gt;
*'''[[gc:fillPolygon]]'''(int list1 [,int list2, .., int listN]) see [[gc:drawPolyLine]]&lt;br /&gt;
*'''[[gc:fillRect]]'''(x, y, width, height) see [[gc:drawRect]]&lt;br /&gt;
*'''[[gc:getStringHeight]]'''(string) - Returns the string's height.&lt;br /&gt;
*'''[[gc:getStringWidth]]'''(string) - Returns the string's width&lt;br /&gt;
*'''[[gc:setAlpha]]'''(alpha) - where alpha is an integer between 0 and 255. Sets the transparency. '''''Not available anymore in 3.2+'''''&lt;br /&gt;
*'''[[gc:setColorRGB]]'''(red, green, blue) RGB values are integers, from 0 to 255.&lt;br /&gt;
*'''[[gc:setFont]]'''(font, type, size), with font : {“sansserif”, &amp;quot;serif&amp;quot;, ..}, type {“b”, “r”, “i”}, size(int)&lt;br /&gt;
*'''[[gc:setPen]]'''(thickness, smoothness) : thickness {“thin”, “medium”, &amp;quot;thick&amp;quot;}, smoothness {“smooth”, &amp;quot;dotted&amp;quot;, &amp;quot;dashed&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
== [[:Category:image|Images]] ==&lt;br /&gt;
*'''[[image.copy]]'''(theImage, width, height) : Returns a copy of the input image scaled to fit the specified pixel width and height. &lt;br /&gt;
*'''[[image.height]]'''(theImage) : Returns the height of the ''image''&lt;br /&gt;
*'''[[image.new]]'''(theImage) : Allocates a new [[TI.Image]]&lt;br /&gt;
*'''[[image.rotate]]'''(theImage, angle) : Returns a rotated copy of ''theImage'' by ''angle'' degrees&lt;br /&gt;
*'''[[image.width]]'''(theImage) : Returns the width of the ''image''&lt;br /&gt;
&lt;br /&gt;
== [[:Category:Physics_Engine|Physics Engine]] ==&lt;br /&gt;
A port of Chipmunk Physics 5.3 has been embedded as an optional module (you have to 'require' it at the beginning of your script, in order to use it)&lt;br /&gt;
*Arbiters and Collision Pairs&lt;br /&gt;
*Bodies&lt;br /&gt;
*Bounding Boxes&lt;br /&gt;
*Circle Shapes&lt;br /&gt;
*Constraints&lt;br /&gt;
*Misc&lt;br /&gt;
*Polygon Shapes&lt;br /&gt;
*Segment Shapes&lt;br /&gt;
*SegmentQueryInfo&lt;br /&gt;
*Shape Queries&lt;br /&gt;
*Shapes&lt;br /&gt;
*Space Queries&lt;br /&gt;
*Spaces&lt;br /&gt;
*Vectors&lt;br /&gt;
&lt;br /&gt;
== [[:Category:platform|Platform]] ==&lt;br /&gt;
*[[platform.isColorDisplay]]() : Returns true if the display of the host platform is color-capable (Nspire CX and emulator). Returns false if the display is grayscale (Nspire non-CX).      &lt;br /&gt;
*[[platform.isDeviceModeRendering]]() : Returns true if the script is running on the hand-held device or in the emulator (with the calculator view), and false if the script is running in the normal view of the emulator.&lt;br /&gt;
*[[platform.isTabletModeRendering]]() : Returns true if the script is running on a tablet device (iPad app) and false otherwise.&lt;br /&gt;
*[[:Category:platform.window|platform.window]] : Returns the window object currently owned by the script application. The window object contains several other methods.&lt;br /&gt;
*[[platform.withGC]](...) : executes a function which a passed dummy [[gc]].&lt;br /&gt;
*[[platform.registerErrorHandler]](...) : A global error handler for the lua script.&lt;br /&gt;
*[[platform.hw]]() : returns a number corresponding to the type of device the script is running on.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:timer|Timer]] ==&lt;br /&gt;
*'''[[timer.start]]'''(period) : Starts the timer with the given ''period'' (in seconds)&amp;lt;br /&amp;gt;&lt;br /&gt;
*'''[[timer.getMilliSecCounter]]'''() : Returns the value of the milliseconds elapsed since the calculator's last boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
*'''[[timer.stop]]'''() : Stops the timer.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:toolpalette|Toolpalette]] ==&lt;br /&gt;
The tool palette provides a menu of commands, selectable by the user, that invoke functionality of the script app. The menu itself is accessible by pressing the &amp;quot;Menu&amp;quot; button. &lt;br /&gt;
*'''[[toolpalette.register|register]]'''(menuStructure) :  Registers the ''menuStructure'' table. &lt;br /&gt;
*'''[[toolpalette.enable|enable]]'''(toolname, itemname, state) : Enables or disables a menu item in the tool palette.    &lt;br /&gt;
*'''[[toolpalette.enableCopy|enableCopy]]'''(state) : This routine enables / disables the Edit &amp;gt; Copy menu command.&lt;br /&gt;
*'''[[toolpalette.enableCut|enableCut]]'''(state) : This routine enables / disables the Edit &amp;gt; Cut menu command.&lt;br /&gt;
*'''[[toolpalette.enablePaste|enablePaste]]'''(state) : This routine enables / disables the Edit &amp;gt; Paste menu command.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:var|var]]  ==&lt;br /&gt;
'var' functions allows the script to interact with BASIC variables.&lt;br /&gt;
*[[var.list]]() - Lists of names of variables currently used. &lt;br /&gt;
*[[var.monitor]](name) - Turns on monitoring of the math variable with given ''name''. &lt;br /&gt;
*[[var.unmonitor]](name) - Turns off monitoring of the math variable with given ''name''. &lt;br /&gt;
*[[var.makeNumericList]](name)&amp;amp;nbsp;: Creates a list in the symbol table with the given ''name'', which is optimized to hold numeric values.&lt;br /&gt;
*[[var.recall]](name)&amp;amp;nbsp;: Returns the value of a math variable with the given ''name''. &lt;br /&gt;
*[[var.recallAt]](name, col [,row])&amp;amp;nbsp;: Recalls a value from a cell of a list or matrix in the symbol table.&lt;br /&gt;
*[[var.recallstr]](name)&amp;amp;nbsp;: Returns the value of a math variable with the given name as a string. &lt;br /&gt;
*[[var.store]](name, value)&amp;amp;nbsp;: Stores ''value'' as a math variable with the given ''name''.&lt;br /&gt;
*[[var.storeAt]](name, numericValue, col [,row])&amp;amp;nbsp;: Stores a numeric value into an element of a math list or matrix with the given ''name''.&lt;br /&gt;
&lt;br /&gt;
== Misc. ==&lt;br /&gt;
*'''[[locale.name]]'''() : Returns the name of the current locale as an ISO-639 code.&lt;br /&gt;
*'''[[clipboard.addText]]'''(string) : Add 'string' to the clipboard&lt;br /&gt;
*'''[[clipboard.getText]]'''() : Get the current content of the clipboard&lt;br /&gt;
*'''[[cursor.hide]]'''() :  Hides the cursor on the screen &lt;br /&gt;
*'''[[cursor.set]]'''(cursorname) : Sets the new shape of the cursor to ''cursorname'' (see full list in the specific article)&lt;br /&gt;
*'''[[cursor.show]]'''() : Makes the cursor visible on the screen&lt;br /&gt;
*'''[[document.markChanged]]'''()&amp;amp;nbsp;: Mark the current document as changed&lt;/div&gt;</summary>
		<author><name>Technolapin</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inspired-lua.org/index.php?title=Overview_of_the_API&amp;diff=1225</id>
		<title>Overview of the API</title>
		<link rel="alternate" type="text/html" href="https://wiki.inspired-lua.org/index.php?title=Overview_of_the_API&amp;diff=1225"/>
		<updated>2014-11-08T19:40:01Z</updated>

		<summary type="html">&lt;p&gt;Technolapin: /* Coroutines Library */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The Lua version that comes with OS 3.x is 5.1.4, without the ''io'' nor ''os'' libraries.&lt;br /&gt;
&lt;br /&gt;
Tutorials on Nspire Lua scripting in general are available here : http://inspired-lua.org/&lt;br /&gt;
&lt;br /&gt;
== Standard Library  ==&lt;br /&gt;
&lt;br /&gt;
( This has been taken from [http://www.wowwiki.com/Lua_functions a WoWWiki page] - See the full, official documentation [http://www.lua.org/manual/5.1/manual.html here] )&lt;br /&gt;
&lt;br /&gt;
=== Common Lua Functions ===&lt;br /&gt;
&lt;br /&gt;
*'''[[G]]''' - Global Variable - A global variable (not a function) that holds the global environment (that is, _G._G = _G). Lua itself does not use this variable; changing its value does not affect any environment, nor vice-versa. (Use setfenv to change environments.) - taken from Lua docs &lt;br /&gt;
*'''[[assert]]'''(value[, errormsg]) - asserts a value evaluates to true. If it is, returns value, otherwise causes a Lua error to be thrown. &lt;br /&gt;
*'''[[collectgarbage]]''' - among other things, force free unused memory.&lt;br /&gt;
*'''[[error]]'''(str) - generates an error with the str message.&lt;br /&gt;
*'''[[getfenv]]'''(function or integer) - Returns the table representing the stack frame of the given function or stack level. &lt;br /&gt;
*'''[[getmetatable]]'''(obj, mtable) - Returns the metatable of the given table or userdata object. &lt;br /&gt;
*'''[[next]]'''(table, index) - Returns the next key, value pair of the table, allowing you to walk over the table. &lt;br /&gt;
*'''[[newproxy]]'''(boolean or proxy) - Creates a userdata with a sharable metatable. &lt;br /&gt;
*'''[[print]]'''(...) - Receives any number of arguments, and prints their values. Not intended for formatted output, but only as a quick way to show a value, typically for debugging. For formatted output, use string.format.&lt;br /&gt;
*'''[[select]]'''(index, list) - Returns the number of items in list or the value of the item in list at index. &lt;br /&gt;
*'''[[setfenv]]'''(function or integer, table) - Sets the table representing the stack frame of the given function or stack level. &lt;br /&gt;
*'''[[setmetatable]]'''(obj, mtable) - Sets the metatable of the given table or userdata object. &lt;br /&gt;
*'''[[tostring]]''' - tostring (e) - Receives an argument of any type and converts it to a string in a reasonable format. For complete control of how numbers are converted, use string.format. If the metatable of e has a &amp;quot;__tostring&amp;quot; field, then tostring calls the corresponding value with e as argument, and uses the result of the call as its result. - taken from Lua Docs. &lt;br /&gt;
*'''[[tonumber]]''' - tonumber (e) - Receives an argument of the string type and converts it to a number when possible. If the metatable of e has a &amp;quot;__tonumber&amp;quot; field, then tonumber calls the corresponding value with e as argument, and uses the result of the call as its result. - taken from Lua Docs. &lt;br /&gt;
*'''[[type]]'''(var) - Returns the type of variable as a string, &amp;quot;number&amp;quot;, &amp;quot;string&amp;quot;, &amp;quot;table&amp;quot;, &amp;quot;function&amp;quot; or &amp;quot;userdata&amp;quot;. &lt;br /&gt;
*'''[[unpack]]'''(table[, start][, end]) - Returns the contents of its argument as separate values. &lt;br /&gt;
*'''[[xpcall]]'''(func, err) - Returns a boolean indicating successful execution of func and calls err on failure, additionally returning func's or err's results.&lt;br /&gt;
&lt;br /&gt;
=== Coroutines Library ===&lt;br /&gt;
The coroutines are usefull tools to control the running of differents parts of a code.&lt;br /&gt;
&lt;br /&gt;
create, wrap, resume, yield, status, running&lt;br /&gt;
&lt;br /&gt;
More information can be fouded in the coroutine page.&lt;br /&gt;
&lt;br /&gt;
=== String Library ===&lt;br /&gt;
byte, char, dump, find, format, gmatch, gsub, len, lower, match, rep, reverse, sub, upper&lt;br /&gt;
&lt;br /&gt;
=== Math Library ===&lt;br /&gt;
abs, acos, asin, atan, atan2, ceil, cos, cosh, deg, exp, floor, fmod, frexp, huge, ldexp, log, log10, max, min, modf, pi, pow, rad, random, randomseed, sin, sinh, sqrt, tan, tanh&lt;br /&gt;
More information about the other libraries can be found on the [[Extended Standard Library]] Page&lt;br /&gt;
&lt;br /&gt;
== [[:Category:D2Editor|D2Editor]] ==&lt;br /&gt;
The Lua 2D editor bindings enable 2D rich text editors to be created and manipulated within scripts.&lt;br /&gt;
* [[D2Editor:createChemBox]]() : Inserts a Chem Box in the current cursor position of the editor.&lt;br /&gt;
* [[D2Editor:createMathBox]]() : Inserts a Math Box (Expression Box) in the current cursor position of the editor.&lt;br /&gt;
* [[D2Editor:getExpression]]() : Returns the contents of the text editor as a UTF-8 encoded string.&lt;br /&gt;
* [[D2Editor:getExpressionSelection]]() : Returns three values: the contents of the text editor (UTF-8 encoded string), the cursor position, and the selection start.&lt;br /&gt;
* [[D2Editor:getText]]() : same as ''getExpression'' : Returns the contents of the text editor as a UTF-8 encoded string.&lt;br /&gt;
* [[D2Editor:hasFocus]]() : Returns true if the editor has focus; otherwise returns false.&lt;br /&gt;
* [[D2Editor:isVisible]]() : Returns true if the editor is visible; otherwise returns false.&lt;br /&gt;
* [[D2Editor:move]]() : Sets the parent-relative location of the upper left corner of the text editor. Both x and y must be between -32767 and 32767.&lt;br /&gt;
* [[D2Editor:newRichText]]() : Creates and returns a new 2D rich text editor.&lt;br /&gt;
* [[D2Editor:registerFilter]](handlerTable) : This routine registers a table of handler functions that can alter events before they are sent to the 2D editor widget, or unregisters if nil is passed.&lt;br /&gt;
* [[D2Editor:resize]](w, h) : Changes the width and height of the text editor. Both width and height must be &amp;gt; 0 and &amp;lt; 32768.&lt;br /&gt;
* [[D2Editor:setBorder]](thickness) : Sets the editor's border thickness. The thickness value must be between 0 and 10.&lt;br /&gt;
* [[D2Editor:setBorderColor]](color) : Sets the editor's border color. The color value must be between 0 and 16777215 (0x000000 and 0xFFFFFF).&lt;br /&gt;
* [[D2Editor:setColorable]](true or false) : Makes the expression colorable or uncolorable.&lt;br /&gt;
* [[D2Editor:setDisable2DinRT]](true or false) : Turns on/off 2D layout of math input to the text box.&lt;br /&gt;
* [[D2Editor:setExpression]](...) : Sets the text content of the text editor.&lt;br /&gt;
* [[D2Editor:setFocus]](true or false) : Sets the user input focus on the editor if true (the default). This is usually called from the [[on.getFocus]] event handler.&lt;br /&gt;
* [[D2Editor:setFontSize]](size) : Sets the text font size in the editor. Only 7, 9, 10, 11, 12, or 24 for the handheld, any on the desktop software.&lt;br /&gt;
* [[D2Editor:setMainFont]](family, style) : Sets the main font family (&amp;quot;serif&amp;quot; or &amp;quot;sansserif&amp;quot;) and style (&amp;quot;r&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;i&amp;quot;, &amp;quot;bi&amp;quot;).&lt;br /&gt;
* [[D2Editor:setReadOnly]](true or false) : Makes the text editor content modifiable (false) or unmodifiable (true) by the user. If a Boolean value is not specified, defaults to true.&lt;br /&gt;
* [[D2Editor:setSelectable]](true or false) : Makes the text editor content selectable (true) or unselectable (false) by the user. If a Boolean value is not specified, defaults to true.&lt;br /&gt;
* [[D2Editor:setSizeChangeListener]](function(editor, w, h)) : Sets the callback function for when the editor contents exceed the current editor size, when the contents fit on fewer lines, or when the contents fit on a single line of smaller width.&lt;br /&gt;
* [[D2Editor:setTextChangeListener]](function(editor)) : Sets the callback function for when the text expression changes, which will be to the editor object. This allows for processing text input as it occurs.&lt;br /&gt;
* [[D2Editor:setText]](...) : Same as setExpression : Sets the text content of the text editor.&lt;br /&gt;
* [[D2Editor:setTextColor]](color) : Sets the editor text color. The color value must be between 0 and 16777215 (0x000000 and 0xFFFFFF).&lt;br /&gt;
* [[D2Editor:setVisible]](true or false) : Sets the visibility of the text editor.&lt;br /&gt;
* [[D2Editor:setWordWrapWidth]](width) : Sets the rich text editor word-wrapping width in pixels. Ignored if the editor is in 2D mode. To indicate widget width, sets to 0. To disable wrapping, sets to &amp;lt; 0. The width must be -32767 to 32767.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:Events|Events]] ==&lt;br /&gt;
Events are one of the most fundamental things to know about the Nspire Lua language.&lt;br /&gt;
You can see how events are managed inside the Lua implementation [[Life Cycle|here]]. &lt;br /&gt;
&lt;br /&gt;
*'''[[on.paint]]'''(gc) is called when the GUI is painted. [[:Category:gc|'gc' is the Graphics Context]] &lt;br /&gt;
*'''[[on.resize]]''' is called when the window is rezised&lt;br /&gt;
*'''[[on.timer]]''' is called at each timer ticks. See [[:Category:timer|timer]].&amp;lt;br&amp;gt; &lt;br /&gt;
*'''[[on.arrowKey]]''' is called when an '''arrow key''' from the clickPad/TouchPad is pressed (right, left, up, down) &lt;br /&gt;
*'''[[on.arrowLeft]]''' is called when the '''left''' arrow is pressed &lt;br /&gt;
*'''[[on.arrowRight]]''' is called when the '''right''' arrow is pressed &lt;br /&gt;
*'''[[on.arrowUp]]''' is called when the up '''arrow''' is pressed &lt;br /&gt;
*'''[[on.arrowDown]]''' is called when the '''down''' arrow is pressed&lt;br /&gt;
*'''[[on.enterKey]]''' is called when the '''enter''' key is pressed. &lt;br /&gt;
*'''[[on.escapeKey]]''' is called when the '''escape''' key is pressed. &lt;br /&gt;
*'''[[on.tabKey]]''' is called when the '''tab''' key is pressed. &lt;br /&gt;
*'''[[on.deleteKey]]''' is called when the '''delete''' key is pressed. &lt;br /&gt;
*'''[[on.backspaceKey]]''' is called when the '''clear''' key is pressed. &lt;br /&gt;
*'''[[on.returnKey]]''' is called when the '''return''' key is pressed. &lt;br /&gt;
*'''[[on.contextMenu]]''' is called when the combo-key '''Ctrl Menu''' is pressed. &lt;br /&gt;
*'''[[on.backtabKey]]''' is called when the combo-key '''Maj Tab''' is pressed. &lt;br /&gt;
*'''[[on.clearKey]]''' is called when the combo-key '''Ctrl Clear''' is pressed. &lt;br /&gt;
*'''[[on.help]]''' is called when the combo-key '''Ctrl ?''' is pressed.&lt;br /&gt;
*'''[[on.charIn]]''' is called when the Nspire detects a non arrow key being pressed.&lt;br /&gt;
*'''[[on.createMathBox]]''' called when there is a MathBox created. &lt;br /&gt;
*'''[[on.create]]''' called when the script gets created. '''Deprecated in 3.2'''. See ''on.contruction''.&lt;br /&gt;
*'''[[on.construction]]''' called when the script gets created. &lt;br /&gt;
*'''[[on.deactivate]]''' called when the focus is lost on the page (like launching the document, changing page etc...) &lt;br /&gt;
*'''[[on.activate]]''' called when the focus is on the page (like launching the document, changing page etc...) &lt;br /&gt;
*'''[[on.destroy]]''' is called when the document is about to get closed (or cut)&lt;br /&gt;
*'''[[on.getFocus]]''' is called when the script receives user input focus.  	 &lt;br /&gt;
*'''[[on.loseFocus]]''' is called when the script loses user input focus. &lt;br /&gt;
*'''[[on.mouseDown]]''' is called when we press the left mouse button. X and Y are the pressed point coordinates. &lt;br /&gt;
*'''[[on.mouseUp]]''' is called when we release the left mouse button. &lt;br /&gt;
*'''[[on.mouseMove]]''' is called when the mouse moves &lt;br /&gt;
*'''[[on.grabDown]]''' is called when the grabbing motion is detected&lt;br /&gt;
*'''[[on.grabUp]]''' is called after the grabbing action.&lt;br /&gt;
*'''[[on.rightMouseDown]]''' is called when the user pushes the &amp;quot;right click&amp;quot; button&lt;br /&gt;
*'''[[on.rightMouseUp]]''' is called when the user releases the &amp;quot;right click&amp;quot; button&lt;br /&gt;
*'''[[on.keyboardUp]]'''() which fires when the tablet's on-screen keyboard gets shown.&lt;br /&gt;
*'''[[on.keyboardDown]]'''() which fires when the tablet's on-screen keyboard gets hidden.&lt;br /&gt;
*'''[[on.varChange]]''' is called when a [[var.monitor|monitored variable]] gets changed.&lt;br /&gt;
*'''[[on.getSymbolList]]''' is called when the script app symbol list is being serialized to the clipboard.&lt;br /&gt;
*'''[[on.save]]''' is called when the script app is saved to the document or copied to the clipboard.&lt;br /&gt;
*'''[[on.restore]]''' is called when the script application is restored from its saved state in a document or when the app is pasted into a document..&lt;br /&gt;
*'''[[on.cut]]'''  is called when the user cuts something.&lt;br /&gt;
*'''[[on.copy]]''' is called when the user copies something.&lt;br /&gt;
*'''[[on.paste]]''' is called when the user pastes something.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:gc|Graphics Operations]]  ==&lt;br /&gt;
'''gc''' is the Nspire's ''graphic context''. A graphics context is a module that has a handle to the script’s graphics output window and a library of graphics routines that are used to draw on the window. A graphics context is supplied to the script ”on.paint” event handler each time the window needs to be redrawn. The graphics context employs a pixel-based coordinate system with the origin in the upper left corner of the drawing window.&lt;br /&gt;
&lt;br /&gt;
*'''[[gc:clipRect]]'''(op, x, y, width, height) - Sets the clipping rectangle for subsequent graphics operations.&lt;br /&gt;
*'''[[gc:drawArc]]'''(x, y, width, height, start angle, finish angle).&lt;br /&gt;
*'''[[gc:drawImage]]'''(image,x,y) First argument in format “[[TI.Image]]”, x and y the coords.&lt;br /&gt;
*'''[[gc:drawLine]]'''(xstart, ystart, xend, yend) Draws a line starting at the point (xstart,ystart) and ending at the point (xend, yend)&lt;br /&gt;
*'''[[gc:drawPolyLine]]'''(int list1 [,int list2, .., int listN]) Draws a shape from a list contaning successively the x and y coordinates of each point the line have to draw.&lt;br /&gt;
*'''[[gc:drawRect]]'''(x, y, xwidth, yheight) Draws a rectangle at (x,y) with the “x” side being “xwidth” long and the “y” side being “yheight” long&lt;br /&gt;
*'''[[gc:drawString]]'''(string, x, y, position) position is the string’s anchor point and can be &amp;quot;baseline&amp;quot;, “bottom”, “middle”, or “top”. &lt;br /&gt;
*'''[[gc:fillArc]]'''(x, y, width, height, start angle, finish angle) see [[gc:drawArc]]&lt;br /&gt;
*'''[[gc:fillPolygon]]'''(int list1 [,int list2, .., int listN]) see [[gc:drawPolyLine]]&lt;br /&gt;
*'''[[gc:fillRect]]'''(x, y, width, height) see [[gc:drawRect]]&lt;br /&gt;
*'''[[gc:getStringHeight]]'''(string) - Returns the string's height.&lt;br /&gt;
*'''[[gc:getStringWidth]]'''(string) - Returns the string's width&lt;br /&gt;
*'''[[gc:setAlpha]]'''(alpha) - where alpha is an integer between 0 and 255. Sets the transparency. '''''Not available anymore in 3.2+'''''&lt;br /&gt;
*'''[[gc:setColorRGB]]'''(red, green, blue) RGB values are integers, from 0 to 255.&lt;br /&gt;
*'''[[gc:setFont]]'''(font, type, size), with font : {“sansserif”, &amp;quot;serif&amp;quot;, ..}, type {“b”, “r”, “i”}, size(int)&lt;br /&gt;
*'''[[gc:setPen]]'''(thickness, smoothness) : thickness {“thin”, “medium”, &amp;quot;thick&amp;quot;}, smoothness {“smooth”, &amp;quot;dotted&amp;quot;, &amp;quot;dashed&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
== [[:Category:image|Images]] ==&lt;br /&gt;
*'''[[image.copy]]'''(theImage, width, height) : Returns a copy of the input image scaled to fit the specified pixel width and height. &lt;br /&gt;
*'''[[image.height]]'''(theImage) : Returns the height of the ''image''&lt;br /&gt;
*'''[[image.new]]'''(theImage) : Allocates a new [[TI.Image]]&lt;br /&gt;
*'''[[image.rotate]]'''(theImage, angle) : Returns a rotated copy of ''theImage'' by ''angle'' degrees&lt;br /&gt;
*'''[[image.width]]'''(theImage) : Returns the width of the ''image''&lt;br /&gt;
&lt;br /&gt;
== [[:Category:Physics_Engine|Physics Engine]] ==&lt;br /&gt;
A port of Chipmunk Physics 5.3 has been embedded as an optional module (you have to 'require' it at the beginning of your script, in order to use it)&lt;br /&gt;
*Arbiters and Collision Pairs&lt;br /&gt;
*Bodies&lt;br /&gt;
*Bounding Boxes&lt;br /&gt;
*Circle Shapes&lt;br /&gt;
*Constraints&lt;br /&gt;
*Misc&lt;br /&gt;
*Polygon Shapes&lt;br /&gt;
*Segment Shapes&lt;br /&gt;
*SegmentQueryInfo&lt;br /&gt;
*Shape Queries&lt;br /&gt;
*Shapes&lt;br /&gt;
*Space Queries&lt;br /&gt;
*Spaces&lt;br /&gt;
*Vectors&lt;br /&gt;
&lt;br /&gt;
== [[:Category:platform|Platform]] ==&lt;br /&gt;
*[[platform.isColorDisplay]]() : Returns true if the display of the host platform is color-capable (Nspire CX and emulator). Returns false if the display is grayscale (Nspire non-CX).      &lt;br /&gt;
*[[platform.isDeviceModeRendering]]() : Returns true if the script is running on the hand-held device or in the emulator (with the calculator view), and false if the script is running in the normal view of the emulator.&lt;br /&gt;
*[[platform.isTabletModeRendering]]() : Returns true if the script is running on a tablet device (iPad app) and false otherwise.&lt;br /&gt;
*[[:Category:platform.window|platform.window]] : Returns the window object currently owned by the script application. The window object contains several other methods.&lt;br /&gt;
*[[platform.withGC]](...) : executes a function which a passed dummy [[gc]].&lt;br /&gt;
*[[platform.registerErrorHandler]](...) : A global error handler for the lua script.&lt;br /&gt;
*[[platform.hw]]() : returns a number corresponding to the type of device the script is running on.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:timer|Timer]] ==&lt;br /&gt;
*'''[[timer.start]]'''(period) : Starts the timer with the given ''period'' (in seconds)&amp;lt;br /&amp;gt;&lt;br /&gt;
*'''[[timer.getMilliSecCounter]]'''() : Returns the value of the milliseconds elapsed since the calculator's last boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
*'''[[timer.stop]]'''() : Stops the timer.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:toolpalette|Toolpalette]] ==&lt;br /&gt;
The tool palette provides a menu of commands, selectable by the user, that invoke functionality of the script app. The menu itself is accessible by pressing the &amp;quot;Menu&amp;quot; button. &lt;br /&gt;
*'''[[toolpalette.register|register]]'''(menuStructure) :  Registers the ''menuStructure'' table. &lt;br /&gt;
*'''[[toolpalette.enable|enable]]'''(toolname, itemname, state) : Enables or disables a menu item in the tool palette.    &lt;br /&gt;
*'''[[toolpalette.enableCopy|enableCopy]]'''(state) : This routine enables / disables the Edit &amp;gt; Copy menu command.&lt;br /&gt;
*'''[[toolpalette.enableCut|enableCut]]'''(state) : This routine enables / disables the Edit &amp;gt; Cut menu command.&lt;br /&gt;
*'''[[toolpalette.enablePaste|enablePaste]]'''(state) : This routine enables / disables the Edit &amp;gt; Paste menu command.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:var|var]]  ==&lt;br /&gt;
'var' functions allows the script to interact with BASIC variables.&lt;br /&gt;
*[[var.list]]() - Lists of names of variables currently used. &lt;br /&gt;
*[[var.monitor]](name) - Turns on monitoring of the math variable with given ''name''. &lt;br /&gt;
*[[var.unmonitor]](name) - Turns off monitoring of the math variable with given ''name''. &lt;br /&gt;
*[[var.makeNumericList]](name)&amp;amp;nbsp;: Creates a list in the symbol table with the given ''name'', which is optimized to hold numeric values.&lt;br /&gt;
*[[var.recall]](name)&amp;amp;nbsp;: Returns the value of a math variable with the given ''name''. &lt;br /&gt;
*[[var.recallAt]](name, col [,row])&amp;amp;nbsp;: Recalls a value from a cell of a list or matrix in the symbol table.&lt;br /&gt;
*[[var.recallstr]](name)&amp;amp;nbsp;: Returns the value of a math variable with the given name as a string. &lt;br /&gt;
*[[var.store]](name, value)&amp;amp;nbsp;: Stores ''value'' as a math variable with the given ''name''.&lt;br /&gt;
*[[var.storeAt]](name, numericValue, col [,row])&amp;amp;nbsp;: Stores a numeric value into an element of a math list or matrix with the given ''name''.&lt;br /&gt;
&lt;br /&gt;
== Misc. ==&lt;br /&gt;
*'''[[locale.name]]'''() : Returns the name of the current locale as an ISO-639 code.&lt;br /&gt;
*'''[[clipboard.addText]]'''(string) : Add 'string' to the clipboard&lt;br /&gt;
*'''[[clipboard.getText]]'''() : Get the current content of the clipboard&lt;br /&gt;
*'''[[cursor.hide]]'''() :  Hides the cursor on the screen &lt;br /&gt;
*'''[[cursor.set]]'''(cursorname) : Sets the new shape of the cursor to ''cursorname'' (see full list in the specific article)&lt;br /&gt;
*'''[[cursor.show]]'''() : Makes the cursor visible on the screen&lt;br /&gt;
*'''[[document.markChanged]]'''()&amp;amp;nbsp;: Mark the current document as changed&lt;/div&gt;</summary>
		<author><name>Technolapin</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inspired-lua.org/index.php?title=Overview_of_the_API&amp;diff=1224</id>
		<title>Overview of the API</title>
		<link rel="alternate" type="text/html" href="https://wiki.inspired-lua.org/index.php?title=Overview_of_the_API&amp;diff=1224"/>
		<updated>2014-11-08T19:39:11Z</updated>

		<summary type="html">&lt;p&gt;Technolapin: /* Coroutines Library */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The Lua version that comes with OS 3.x is 5.1.4, without the ''io'' nor ''os'' libraries.&lt;br /&gt;
&lt;br /&gt;
Tutorials on Nspire Lua scripting in general are available here : http://inspired-lua.org/&lt;br /&gt;
&lt;br /&gt;
== Standard Library  ==&lt;br /&gt;
&lt;br /&gt;
( This has been taken from [http://www.wowwiki.com/Lua_functions a WoWWiki page] - See the full, official documentation [http://www.lua.org/manual/5.1/manual.html here] )&lt;br /&gt;
&lt;br /&gt;
=== Common Lua Functions ===&lt;br /&gt;
&lt;br /&gt;
*'''[[G]]''' - Global Variable - A global variable (not a function) that holds the global environment (that is, _G._G = _G). Lua itself does not use this variable; changing its value does not affect any environment, nor vice-versa. (Use setfenv to change environments.) - taken from Lua docs &lt;br /&gt;
*'''[[assert]]'''(value[, errormsg]) - asserts a value evaluates to true. If it is, returns value, otherwise causes a Lua error to be thrown. &lt;br /&gt;
*'''[[collectgarbage]]''' - among other things, force free unused memory.&lt;br /&gt;
*'''[[error]]'''(str) - generates an error with the str message.&lt;br /&gt;
*'''[[getfenv]]'''(function or integer) - Returns the table representing the stack frame of the given function or stack level. &lt;br /&gt;
*'''[[getmetatable]]'''(obj, mtable) - Returns the metatable of the given table or userdata object. &lt;br /&gt;
*'''[[next]]'''(table, index) - Returns the next key, value pair of the table, allowing you to walk over the table. &lt;br /&gt;
*'''[[newproxy]]'''(boolean or proxy) - Creates a userdata with a sharable metatable. &lt;br /&gt;
*'''[[print]]'''(...) - Receives any number of arguments, and prints their values. Not intended for formatted output, but only as a quick way to show a value, typically for debugging. For formatted output, use string.format.&lt;br /&gt;
*'''[[select]]'''(index, list) - Returns the number of items in list or the value of the item in list at index. &lt;br /&gt;
*'''[[setfenv]]'''(function or integer, table) - Sets the table representing the stack frame of the given function or stack level. &lt;br /&gt;
*'''[[setmetatable]]'''(obj, mtable) - Sets the metatable of the given table or userdata object. &lt;br /&gt;
*'''[[tostring]]''' - tostring (e) - Receives an argument of any type and converts it to a string in a reasonable format. For complete control of how numbers are converted, use string.format. If the metatable of e has a &amp;quot;__tostring&amp;quot; field, then tostring calls the corresponding value with e as argument, and uses the result of the call as its result. - taken from Lua Docs. &lt;br /&gt;
*'''[[tonumber]]''' - tonumber (e) - Receives an argument of the string type and converts it to a number when possible. If the metatable of e has a &amp;quot;__tonumber&amp;quot; field, then tonumber calls the corresponding value with e as argument, and uses the result of the call as its result. - taken from Lua Docs. &lt;br /&gt;
*'''[[type]]'''(var) - Returns the type of variable as a string, &amp;quot;number&amp;quot;, &amp;quot;string&amp;quot;, &amp;quot;table&amp;quot;, &amp;quot;function&amp;quot; or &amp;quot;userdata&amp;quot;. &lt;br /&gt;
*'''[[unpack]]'''(table[, start][, end]) - Returns the contents of its argument as separate values. &lt;br /&gt;
*'''[[xpcall]]'''(func, err) - Returns a boolean indicating successful execution of func and calls err on failure, additionally returning func's or err's results.&lt;br /&gt;
&lt;br /&gt;
=== Coroutines Library ===&lt;br /&gt;
The coroutines are usefull tools to control the running of differents parts of a code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
create, wrap, resume, yield, status, running&lt;br /&gt;
&lt;br /&gt;
=== String Library ===&lt;br /&gt;
byte, char, dump, find, format, gmatch, gsub, len, lower, match, rep, reverse, sub, upper&lt;br /&gt;
&lt;br /&gt;
=== Math Library ===&lt;br /&gt;
abs, acos, asin, atan, atan2, ceil, cos, cosh, deg, exp, floor, fmod, frexp, huge, ldexp, log, log10, max, min, modf, pi, pow, rad, random, randomseed, sin, sinh, sqrt, tan, tanh&lt;br /&gt;
More information about the other libraries can be found on the [[Extended Standard Library]] Page&lt;br /&gt;
&lt;br /&gt;
== [[:Category:D2Editor|D2Editor]] ==&lt;br /&gt;
The Lua 2D editor bindings enable 2D rich text editors to be created and manipulated within scripts.&lt;br /&gt;
* [[D2Editor:createChemBox]]() : Inserts a Chem Box in the current cursor position of the editor.&lt;br /&gt;
* [[D2Editor:createMathBox]]() : Inserts a Math Box (Expression Box) in the current cursor position of the editor.&lt;br /&gt;
* [[D2Editor:getExpression]]() : Returns the contents of the text editor as a UTF-8 encoded string.&lt;br /&gt;
* [[D2Editor:getExpressionSelection]]() : Returns three values: the contents of the text editor (UTF-8 encoded string), the cursor position, and the selection start.&lt;br /&gt;
* [[D2Editor:getText]]() : same as ''getExpression'' : Returns the contents of the text editor as a UTF-8 encoded string.&lt;br /&gt;
* [[D2Editor:hasFocus]]() : Returns true if the editor has focus; otherwise returns false.&lt;br /&gt;
* [[D2Editor:isVisible]]() : Returns true if the editor is visible; otherwise returns false.&lt;br /&gt;
* [[D2Editor:move]]() : Sets the parent-relative location of the upper left corner of the text editor. Both x and y must be between -32767 and 32767.&lt;br /&gt;
* [[D2Editor:newRichText]]() : Creates and returns a new 2D rich text editor.&lt;br /&gt;
* [[D2Editor:registerFilter]](handlerTable) : This routine registers a table of handler functions that can alter events before they are sent to the 2D editor widget, or unregisters if nil is passed.&lt;br /&gt;
* [[D2Editor:resize]](w, h) : Changes the width and height of the text editor. Both width and height must be &amp;gt; 0 and &amp;lt; 32768.&lt;br /&gt;
* [[D2Editor:setBorder]](thickness) : Sets the editor's border thickness. The thickness value must be between 0 and 10.&lt;br /&gt;
* [[D2Editor:setBorderColor]](color) : Sets the editor's border color. The color value must be between 0 and 16777215 (0x000000 and 0xFFFFFF).&lt;br /&gt;
* [[D2Editor:setColorable]](true or false) : Makes the expression colorable or uncolorable.&lt;br /&gt;
* [[D2Editor:setDisable2DinRT]](true or false) : Turns on/off 2D layout of math input to the text box.&lt;br /&gt;
* [[D2Editor:setExpression]](...) : Sets the text content of the text editor.&lt;br /&gt;
* [[D2Editor:setFocus]](true or false) : Sets the user input focus on the editor if true (the default). This is usually called from the [[on.getFocus]] event handler.&lt;br /&gt;
* [[D2Editor:setFontSize]](size) : Sets the text font size in the editor. Only 7, 9, 10, 11, 12, or 24 for the handheld, any on the desktop software.&lt;br /&gt;
* [[D2Editor:setMainFont]](family, style) : Sets the main font family (&amp;quot;serif&amp;quot; or &amp;quot;sansserif&amp;quot;) and style (&amp;quot;r&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;i&amp;quot;, &amp;quot;bi&amp;quot;).&lt;br /&gt;
* [[D2Editor:setReadOnly]](true or false) : Makes the text editor content modifiable (false) or unmodifiable (true) by the user. If a Boolean value is not specified, defaults to true.&lt;br /&gt;
* [[D2Editor:setSelectable]](true or false) : Makes the text editor content selectable (true) or unselectable (false) by the user. If a Boolean value is not specified, defaults to true.&lt;br /&gt;
* [[D2Editor:setSizeChangeListener]](function(editor, w, h)) : Sets the callback function for when the editor contents exceed the current editor size, when the contents fit on fewer lines, or when the contents fit on a single line of smaller width.&lt;br /&gt;
* [[D2Editor:setTextChangeListener]](function(editor)) : Sets the callback function for when the text expression changes, which will be to the editor object. This allows for processing text input as it occurs.&lt;br /&gt;
* [[D2Editor:setText]](...) : Same as setExpression : Sets the text content of the text editor.&lt;br /&gt;
* [[D2Editor:setTextColor]](color) : Sets the editor text color. The color value must be between 0 and 16777215 (0x000000 and 0xFFFFFF).&lt;br /&gt;
* [[D2Editor:setVisible]](true or false) : Sets the visibility of the text editor.&lt;br /&gt;
* [[D2Editor:setWordWrapWidth]](width) : Sets the rich text editor word-wrapping width in pixels. Ignored if the editor is in 2D mode. To indicate widget width, sets to 0. To disable wrapping, sets to &amp;lt; 0. The width must be -32767 to 32767.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:Events|Events]] ==&lt;br /&gt;
Events are one of the most fundamental things to know about the Nspire Lua language.&lt;br /&gt;
You can see how events are managed inside the Lua implementation [[Life Cycle|here]]. &lt;br /&gt;
&lt;br /&gt;
*'''[[on.paint]]'''(gc) is called when the GUI is painted. [[:Category:gc|'gc' is the Graphics Context]] &lt;br /&gt;
*'''[[on.resize]]''' is called when the window is rezised&lt;br /&gt;
*'''[[on.timer]]''' is called at each timer ticks. See [[:Category:timer|timer]].&amp;lt;br&amp;gt; &lt;br /&gt;
*'''[[on.arrowKey]]''' is called when an '''arrow key''' from the clickPad/TouchPad is pressed (right, left, up, down) &lt;br /&gt;
*'''[[on.arrowLeft]]''' is called when the '''left''' arrow is pressed &lt;br /&gt;
*'''[[on.arrowRight]]''' is called when the '''right''' arrow is pressed &lt;br /&gt;
*'''[[on.arrowUp]]''' is called when the up '''arrow''' is pressed &lt;br /&gt;
*'''[[on.arrowDown]]''' is called when the '''down''' arrow is pressed&lt;br /&gt;
*'''[[on.enterKey]]''' is called when the '''enter''' key is pressed. &lt;br /&gt;
*'''[[on.escapeKey]]''' is called when the '''escape''' key is pressed. &lt;br /&gt;
*'''[[on.tabKey]]''' is called when the '''tab''' key is pressed. &lt;br /&gt;
*'''[[on.deleteKey]]''' is called when the '''delete''' key is pressed. &lt;br /&gt;
*'''[[on.backspaceKey]]''' is called when the '''clear''' key is pressed. &lt;br /&gt;
*'''[[on.returnKey]]''' is called when the '''return''' key is pressed. &lt;br /&gt;
*'''[[on.contextMenu]]''' is called when the combo-key '''Ctrl Menu''' is pressed. &lt;br /&gt;
*'''[[on.backtabKey]]''' is called when the combo-key '''Maj Tab''' is pressed. &lt;br /&gt;
*'''[[on.clearKey]]''' is called when the combo-key '''Ctrl Clear''' is pressed. &lt;br /&gt;
*'''[[on.help]]''' is called when the combo-key '''Ctrl ?''' is pressed.&lt;br /&gt;
*'''[[on.charIn]]''' is called when the Nspire detects a non arrow key being pressed.&lt;br /&gt;
*'''[[on.createMathBox]]''' called when there is a MathBox created. &lt;br /&gt;
*'''[[on.create]]''' called when the script gets created. '''Deprecated in 3.2'''. See ''on.contruction''.&lt;br /&gt;
*'''[[on.construction]]''' called when the script gets created. &lt;br /&gt;
*'''[[on.deactivate]]''' called when the focus is lost on the page (like launching the document, changing page etc...) &lt;br /&gt;
*'''[[on.activate]]''' called when the focus is on the page (like launching the document, changing page etc...) &lt;br /&gt;
*'''[[on.destroy]]''' is called when the document is about to get closed (or cut)&lt;br /&gt;
*'''[[on.getFocus]]''' is called when the script receives user input focus.  	 &lt;br /&gt;
*'''[[on.loseFocus]]''' is called when the script loses user input focus. &lt;br /&gt;
*'''[[on.mouseDown]]''' is called when we press the left mouse button. X and Y are the pressed point coordinates. &lt;br /&gt;
*'''[[on.mouseUp]]''' is called when we release the left mouse button. &lt;br /&gt;
*'''[[on.mouseMove]]''' is called when the mouse moves &lt;br /&gt;
*'''[[on.grabDown]]''' is called when the grabbing motion is detected&lt;br /&gt;
*'''[[on.grabUp]]''' is called after the grabbing action.&lt;br /&gt;
*'''[[on.rightMouseDown]]''' is called when the user pushes the &amp;quot;right click&amp;quot; button&lt;br /&gt;
*'''[[on.rightMouseUp]]''' is called when the user releases the &amp;quot;right click&amp;quot; button&lt;br /&gt;
*'''[[on.keyboardUp]]'''() which fires when the tablet's on-screen keyboard gets shown.&lt;br /&gt;
*'''[[on.keyboardDown]]'''() which fires when the tablet's on-screen keyboard gets hidden.&lt;br /&gt;
*'''[[on.varChange]]''' is called when a [[var.monitor|monitored variable]] gets changed.&lt;br /&gt;
*'''[[on.getSymbolList]]''' is called when the script app symbol list is being serialized to the clipboard.&lt;br /&gt;
*'''[[on.save]]''' is called when the script app is saved to the document or copied to the clipboard.&lt;br /&gt;
*'''[[on.restore]]''' is called when the script application is restored from its saved state in a document or when the app is pasted into a document..&lt;br /&gt;
*'''[[on.cut]]'''  is called when the user cuts something.&lt;br /&gt;
*'''[[on.copy]]''' is called when the user copies something.&lt;br /&gt;
*'''[[on.paste]]''' is called when the user pastes something.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:gc|Graphics Operations]]  ==&lt;br /&gt;
'''gc''' is the Nspire's ''graphic context''. A graphics context is a module that has a handle to the script’s graphics output window and a library of graphics routines that are used to draw on the window. A graphics context is supplied to the script ”on.paint” event handler each time the window needs to be redrawn. The graphics context employs a pixel-based coordinate system with the origin in the upper left corner of the drawing window.&lt;br /&gt;
&lt;br /&gt;
*'''[[gc:clipRect]]'''(op, x, y, width, height) - Sets the clipping rectangle for subsequent graphics operations.&lt;br /&gt;
*'''[[gc:drawArc]]'''(x, y, width, height, start angle, finish angle).&lt;br /&gt;
*'''[[gc:drawImage]]'''(image,x,y) First argument in format “[[TI.Image]]”, x and y the coords.&lt;br /&gt;
*'''[[gc:drawLine]]'''(xstart, ystart, xend, yend) Draws a line starting at the point (xstart,ystart) and ending at the point (xend, yend)&lt;br /&gt;
*'''[[gc:drawPolyLine]]'''(int list1 [,int list2, .., int listN]) Draws a shape from a list contaning successively the x and y coordinates of each point the line have to draw.&lt;br /&gt;
*'''[[gc:drawRect]]'''(x, y, xwidth, yheight) Draws a rectangle at (x,y) with the “x” side being “xwidth” long and the “y” side being “yheight” long&lt;br /&gt;
*'''[[gc:drawString]]'''(string, x, y, position) position is the string’s anchor point and can be &amp;quot;baseline&amp;quot;, “bottom”, “middle”, or “top”. &lt;br /&gt;
*'''[[gc:fillArc]]'''(x, y, width, height, start angle, finish angle) see [[gc:drawArc]]&lt;br /&gt;
*'''[[gc:fillPolygon]]'''(int list1 [,int list2, .., int listN]) see [[gc:drawPolyLine]]&lt;br /&gt;
*'''[[gc:fillRect]]'''(x, y, width, height) see [[gc:drawRect]]&lt;br /&gt;
*'''[[gc:getStringHeight]]'''(string) - Returns the string's height.&lt;br /&gt;
*'''[[gc:getStringWidth]]'''(string) - Returns the string's width&lt;br /&gt;
*'''[[gc:setAlpha]]'''(alpha) - where alpha is an integer between 0 and 255. Sets the transparency. '''''Not available anymore in 3.2+'''''&lt;br /&gt;
*'''[[gc:setColorRGB]]'''(red, green, blue) RGB values are integers, from 0 to 255.&lt;br /&gt;
*'''[[gc:setFont]]'''(font, type, size), with font : {“sansserif”, &amp;quot;serif&amp;quot;, ..}, type {“b”, “r”, “i”}, size(int)&lt;br /&gt;
*'''[[gc:setPen]]'''(thickness, smoothness) : thickness {“thin”, “medium”, &amp;quot;thick&amp;quot;}, smoothness {“smooth”, &amp;quot;dotted&amp;quot;, &amp;quot;dashed&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
== [[:Category:image|Images]] ==&lt;br /&gt;
*'''[[image.copy]]'''(theImage, width, height) : Returns a copy of the input image scaled to fit the specified pixel width and height. &lt;br /&gt;
*'''[[image.height]]'''(theImage) : Returns the height of the ''image''&lt;br /&gt;
*'''[[image.new]]'''(theImage) : Allocates a new [[TI.Image]]&lt;br /&gt;
*'''[[image.rotate]]'''(theImage, angle) : Returns a rotated copy of ''theImage'' by ''angle'' degrees&lt;br /&gt;
*'''[[image.width]]'''(theImage) : Returns the width of the ''image''&lt;br /&gt;
&lt;br /&gt;
== [[:Category:Physics_Engine|Physics Engine]] ==&lt;br /&gt;
A port of Chipmunk Physics 5.3 has been embedded as an optional module (you have to 'require' it at the beginning of your script, in order to use it)&lt;br /&gt;
*Arbiters and Collision Pairs&lt;br /&gt;
*Bodies&lt;br /&gt;
*Bounding Boxes&lt;br /&gt;
*Circle Shapes&lt;br /&gt;
*Constraints&lt;br /&gt;
*Misc&lt;br /&gt;
*Polygon Shapes&lt;br /&gt;
*Segment Shapes&lt;br /&gt;
*SegmentQueryInfo&lt;br /&gt;
*Shape Queries&lt;br /&gt;
*Shapes&lt;br /&gt;
*Space Queries&lt;br /&gt;
*Spaces&lt;br /&gt;
*Vectors&lt;br /&gt;
&lt;br /&gt;
== [[:Category:platform|Platform]] ==&lt;br /&gt;
*[[platform.isColorDisplay]]() : Returns true if the display of the host platform is color-capable (Nspire CX and emulator). Returns false if the display is grayscale (Nspire non-CX).      &lt;br /&gt;
*[[platform.isDeviceModeRendering]]() : Returns true if the script is running on the hand-held device or in the emulator (with the calculator view), and false if the script is running in the normal view of the emulator.&lt;br /&gt;
*[[platform.isTabletModeRendering]]() : Returns true if the script is running on a tablet device (iPad app) and false otherwise.&lt;br /&gt;
*[[:Category:platform.window|platform.window]] : Returns the window object currently owned by the script application. The window object contains several other methods.&lt;br /&gt;
*[[platform.withGC]](...) : executes a function which a passed dummy [[gc]].&lt;br /&gt;
*[[platform.registerErrorHandler]](...) : A global error handler for the lua script.&lt;br /&gt;
*[[platform.hw]]() : returns a number corresponding to the type of device the script is running on.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:timer|Timer]] ==&lt;br /&gt;
*'''[[timer.start]]'''(period) : Starts the timer with the given ''period'' (in seconds)&amp;lt;br /&amp;gt;&lt;br /&gt;
*'''[[timer.getMilliSecCounter]]'''() : Returns the value of the milliseconds elapsed since the calculator's last boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
*'''[[timer.stop]]'''() : Stops the timer.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:toolpalette|Toolpalette]] ==&lt;br /&gt;
The tool palette provides a menu of commands, selectable by the user, that invoke functionality of the script app. The menu itself is accessible by pressing the &amp;quot;Menu&amp;quot; button. &lt;br /&gt;
*'''[[toolpalette.register|register]]'''(menuStructure) :  Registers the ''menuStructure'' table. &lt;br /&gt;
*'''[[toolpalette.enable|enable]]'''(toolname, itemname, state) : Enables or disables a menu item in the tool palette.    &lt;br /&gt;
*'''[[toolpalette.enableCopy|enableCopy]]'''(state) : This routine enables / disables the Edit &amp;gt; Copy menu command.&lt;br /&gt;
*'''[[toolpalette.enableCut|enableCut]]'''(state) : This routine enables / disables the Edit &amp;gt; Cut menu command.&lt;br /&gt;
*'''[[toolpalette.enablePaste|enablePaste]]'''(state) : This routine enables / disables the Edit &amp;gt; Paste menu command.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:var|var]]  ==&lt;br /&gt;
'var' functions allows the script to interact with BASIC variables.&lt;br /&gt;
*[[var.list]]() - Lists of names of variables currently used. &lt;br /&gt;
*[[var.monitor]](name) - Turns on monitoring of the math variable with given ''name''. &lt;br /&gt;
*[[var.unmonitor]](name) - Turns off monitoring of the math variable with given ''name''. &lt;br /&gt;
*[[var.makeNumericList]](name)&amp;amp;nbsp;: Creates a list in the symbol table with the given ''name'', which is optimized to hold numeric values.&lt;br /&gt;
*[[var.recall]](name)&amp;amp;nbsp;: Returns the value of a math variable with the given ''name''. &lt;br /&gt;
*[[var.recallAt]](name, col [,row])&amp;amp;nbsp;: Recalls a value from a cell of a list or matrix in the symbol table.&lt;br /&gt;
*[[var.recallstr]](name)&amp;amp;nbsp;: Returns the value of a math variable with the given name as a string. &lt;br /&gt;
*[[var.store]](name, value)&amp;amp;nbsp;: Stores ''value'' as a math variable with the given ''name''.&lt;br /&gt;
*[[var.storeAt]](name, numericValue, col [,row])&amp;amp;nbsp;: Stores a numeric value into an element of a math list or matrix with the given ''name''.&lt;br /&gt;
&lt;br /&gt;
== Misc. ==&lt;br /&gt;
*'''[[locale.name]]'''() : Returns the name of the current locale as an ISO-639 code.&lt;br /&gt;
*'''[[clipboard.addText]]'''(string) : Add 'string' to the clipboard&lt;br /&gt;
*'''[[clipboard.getText]]'''() : Get the current content of the clipboard&lt;br /&gt;
*'''[[cursor.hide]]'''() :  Hides the cursor on the screen &lt;br /&gt;
*'''[[cursor.set]]'''(cursorname) : Sets the new shape of the cursor to ''cursorname'' (see full list in the specific article)&lt;br /&gt;
*'''[[cursor.show]]'''() : Makes the cursor visible on the screen&lt;br /&gt;
*'''[[document.markChanged]]'''()&amp;amp;nbsp;: Mark the current document as changed&lt;/div&gt;</summary>
		<author><name>Technolapin</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inspired-lua.org/index.php?title=Overview_of_the_API&amp;diff=1223</id>
		<title>Overview of the API</title>
		<link rel="alternate" type="text/html" href="https://wiki.inspired-lua.org/index.php?title=Overview_of_the_API&amp;diff=1223"/>
		<updated>2014-11-08T19:38:40Z</updated>

		<summary type="html">&lt;p&gt;Technolapin: /* Standard Library */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: The Lua version that comes with OS 3.x is 5.1.4, without the ''io'' nor ''os'' libraries.&lt;br /&gt;
&lt;br /&gt;
Tutorials on Nspire Lua scripting in general are available here : http://inspired-lua.org/&lt;br /&gt;
&lt;br /&gt;
== Standard Library  ==&lt;br /&gt;
&lt;br /&gt;
( This has been taken from [http://www.wowwiki.com/Lua_functions a WoWWiki page] - See the full, official documentation [http://www.lua.org/manual/5.1/manual.html here] )&lt;br /&gt;
&lt;br /&gt;
=== Common Lua Functions ===&lt;br /&gt;
&lt;br /&gt;
*'''[[G]]''' - Global Variable - A global variable (not a function) that holds the global environment (that is, _G._G = _G). Lua itself does not use this variable; changing its value does not affect any environment, nor vice-versa. (Use setfenv to change environments.) - taken from Lua docs &lt;br /&gt;
*'''[[assert]]'''(value[, errormsg]) - asserts a value evaluates to true. If it is, returns value, otherwise causes a Lua error to be thrown. &lt;br /&gt;
*'''[[collectgarbage]]''' - among other things, force free unused memory.&lt;br /&gt;
*'''[[error]]'''(str) - generates an error with the str message.&lt;br /&gt;
*'''[[getfenv]]'''(function or integer) - Returns the table representing the stack frame of the given function or stack level. &lt;br /&gt;
*'''[[getmetatable]]'''(obj, mtable) - Returns the metatable of the given table or userdata object. &lt;br /&gt;
*'''[[next]]'''(table, index) - Returns the next key, value pair of the table, allowing you to walk over the table. &lt;br /&gt;
*'''[[newproxy]]'''(boolean or proxy) - Creates a userdata with a sharable metatable. &lt;br /&gt;
*'''[[print]]'''(...) - Receives any number of arguments, and prints their values. Not intended for formatted output, but only as a quick way to show a value, typically for debugging. For formatted output, use string.format.&lt;br /&gt;
*'''[[select]]'''(index, list) - Returns the number of items in list or the value of the item in list at index. &lt;br /&gt;
*'''[[setfenv]]'''(function or integer, table) - Sets the table representing the stack frame of the given function or stack level. &lt;br /&gt;
*'''[[setmetatable]]'''(obj, mtable) - Sets the metatable of the given table or userdata object. &lt;br /&gt;
*'''[[tostring]]''' - tostring (e) - Receives an argument of any type and converts it to a string in a reasonable format. For complete control of how numbers are converted, use string.format. If the metatable of e has a &amp;quot;__tostring&amp;quot; field, then tostring calls the corresponding value with e as argument, and uses the result of the call as its result. - taken from Lua Docs. &lt;br /&gt;
*'''[[tonumber]]''' - tonumber (e) - Receives an argument of the string type and converts it to a number when possible. If the metatable of e has a &amp;quot;__tonumber&amp;quot; field, then tonumber calls the corresponding value with e as argument, and uses the result of the call as its result. - taken from Lua Docs. &lt;br /&gt;
*'''[[type]]'''(var) - Returns the type of variable as a string, &amp;quot;number&amp;quot;, &amp;quot;string&amp;quot;, &amp;quot;table&amp;quot;, &amp;quot;function&amp;quot; or &amp;quot;userdata&amp;quot;. &lt;br /&gt;
*'''[[unpack]]'''(table[, start][, end]) - Returns the contents of its argument as separate values. &lt;br /&gt;
*'''[[xpcall]]'''(func, err) - Returns a boolean indicating successful execution of func and calls err on failure, additionally returning func's or err's results.&lt;br /&gt;
&lt;br /&gt;
=== Coroutines Library ===&lt;br /&gt;
The coroutines are usefull tools to control the running of differents parts of a code.&lt;br /&gt;
create, wrap, resume, yield, status, running&lt;br /&gt;
=== String Library ===&lt;br /&gt;
byte, char, dump, find, format, gmatch, gsub, len, lower, match, rep, reverse, sub, upper&lt;br /&gt;
&lt;br /&gt;
=== Math Library ===&lt;br /&gt;
abs, acos, asin, atan, atan2, ceil, cos, cosh, deg, exp, floor, fmod, frexp, huge, ldexp, log, log10, max, min, modf, pi, pow, rad, random, randomseed, sin, sinh, sqrt, tan, tanh&lt;br /&gt;
More information about the other libraries can be found on the [[Extended Standard Library]] Page&lt;br /&gt;
&lt;br /&gt;
== [[:Category:D2Editor|D2Editor]] ==&lt;br /&gt;
The Lua 2D editor bindings enable 2D rich text editors to be created and manipulated within scripts.&lt;br /&gt;
* [[D2Editor:createChemBox]]() : Inserts a Chem Box in the current cursor position of the editor.&lt;br /&gt;
* [[D2Editor:createMathBox]]() : Inserts a Math Box (Expression Box) in the current cursor position of the editor.&lt;br /&gt;
* [[D2Editor:getExpression]]() : Returns the contents of the text editor as a UTF-8 encoded string.&lt;br /&gt;
* [[D2Editor:getExpressionSelection]]() : Returns three values: the contents of the text editor (UTF-8 encoded string), the cursor position, and the selection start.&lt;br /&gt;
* [[D2Editor:getText]]() : same as ''getExpression'' : Returns the contents of the text editor as a UTF-8 encoded string.&lt;br /&gt;
* [[D2Editor:hasFocus]]() : Returns true if the editor has focus; otherwise returns false.&lt;br /&gt;
* [[D2Editor:isVisible]]() : Returns true if the editor is visible; otherwise returns false.&lt;br /&gt;
* [[D2Editor:move]]() : Sets the parent-relative location of the upper left corner of the text editor. Both x and y must be between -32767 and 32767.&lt;br /&gt;
* [[D2Editor:newRichText]]() : Creates and returns a new 2D rich text editor.&lt;br /&gt;
* [[D2Editor:registerFilter]](handlerTable) : This routine registers a table of handler functions that can alter events before they are sent to the 2D editor widget, or unregisters if nil is passed.&lt;br /&gt;
* [[D2Editor:resize]](w, h) : Changes the width and height of the text editor. Both width and height must be &amp;gt; 0 and &amp;lt; 32768.&lt;br /&gt;
* [[D2Editor:setBorder]](thickness) : Sets the editor's border thickness. The thickness value must be between 0 and 10.&lt;br /&gt;
* [[D2Editor:setBorderColor]](color) : Sets the editor's border color. The color value must be between 0 and 16777215 (0x000000 and 0xFFFFFF).&lt;br /&gt;
* [[D2Editor:setColorable]](true or false) : Makes the expression colorable or uncolorable.&lt;br /&gt;
* [[D2Editor:setDisable2DinRT]](true or false) : Turns on/off 2D layout of math input to the text box.&lt;br /&gt;
* [[D2Editor:setExpression]](...) : Sets the text content of the text editor.&lt;br /&gt;
* [[D2Editor:setFocus]](true or false) : Sets the user input focus on the editor if true (the default). This is usually called from the [[on.getFocus]] event handler.&lt;br /&gt;
* [[D2Editor:setFontSize]](size) : Sets the text font size in the editor. Only 7, 9, 10, 11, 12, or 24 for the handheld, any on the desktop software.&lt;br /&gt;
* [[D2Editor:setMainFont]](family, style) : Sets the main font family (&amp;quot;serif&amp;quot; or &amp;quot;sansserif&amp;quot;) and style (&amp;quot;r&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;i&amp;quot;, &amp;quot;bi&amp;quot;).&lt;br /&gt;
* [[D2Editor:setReadOnly]](true or false) : Makes the text editor content modifiable (false) or unmodifiable (true) by the user. If a Boolean value is not specified, defaults to true.&lt;br /&gt;
* [[D2Editor:setSelectable]](true or false) : Makes the text editor content selectable (true) or unselectable (false) by the user. If a Boolean value is not specified, defaults to true.&lt;br /&gt;
* [[D2Editor:setSizeChangeListener]](function(editor, w, h)) : Sets the callback function for when the editor contents exceed the current editor size, when the contents fit on fewer lines, or when the contents fit on a single line of smaller width.&lt;br /&gt;
* [[D2Editor:setTextChangeListener]](function(editor)) : Sets the callback function for when the text expression changes, which will be to the editor object. This allows for processing text input as it occurs.&lt;br /&gt;
* [[D2Editor:setText]](...) : Same as setExpression : Sets the text content of the text editor.&lt;br /&gt;
* [[D2Editor:setTextColor]](color) : Sets the editor text color. The color value must be between 0 and 16777215 (0x000000 and 0xFFFFFF).&lt;br /&gt;
* [[D2Editor:setVisible]](true or false) : Sets the visibility of the text editor.&lt;br /&gt;
* [[D2Editor:setWordWrapWidth]](width) : Sets the rich text editor word-wrapping width in pixels. Ignored if the editor is in 2D mode. To indicate widget width, sets to 0. To disable wrapping, sets to &amp;lt; 0. The width must be -32767 to 32767.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:Events|Events]] ==&lt;br /&gt;
Events are one of the most fundamental things to know about the Nspire Lua language.&lt;br /&gt;
You can see how events are managed inside the Lua implementation [[Life Cycle|here]]. &lt;br /&gt;
&lt;br /&gt;
*'''[[on.paint]]'''(gc) is called when the GUI is painted. [[:Category:gc|'gc' is the Graphics Context]] &lt;br /&gt;
*'''[[on.resize]]''' is called when the window is rezised&lt;br /&gt;
*'''[[on.timer]]''' is called at each timer ticks. See [[:Category:timer|timer]].&amp;lt;br&amp;gt; &lt;br /&gt;
*'''[[on.arrowKey]]''' is called when an '''arrow key''' from the clickPad/TouchPad is pressed (right, left, up, down) &lt;br /&gt;
*'''[[on.arrowLeft]]''' is called when the '''left''' arrow is pressed &lt;br /&gt;
*'''[[on.arrowRight]]''' is called when the '''right''' arrow is pressed &lt;br /&gt;
*'''[[on.arrowUp]]''' is called when the up '''arrow''' is pressed &lt;br /&gt;
*'''[[on.arrowDown]]''' is called when the '''down''' arrow is pressed&lt;br /&gt;
*'''[[on.enterKey]]''' is called when the '''enter''' key is pressed. &lt;br /&gt;
*'''[[on.escapeKey]]''' is called when the '''escape''' key is pressed. &lt;br /&gt;
*'''[[on.tabKey]]''' is called when the '''tab''' key is pressed. &lt;br /&gt;
*'''[[on.deleteKey]]''' is called when the '''delete''' key is pressed. &lt;br /&gt;
*'''[[on.backspaceKey]]''' is called when the '''clear''' key is pressed. &lt;br /&gt;
*'''[[on.returnKey]]''' is called when the '''return''' key is pressed. &lt;br /&gt;
*'''[[on.contextMenu]]''' is called when the combo-key '''Ctrl Menu''' is pressed. &lt;br /&gt;
*'''[[on.backtabKey]]''' is called when the combo-key '''Maj Tab''' is pressed. &lt;br /&gt;
*'''[[on.clearKey]]''' is called when the combo-key '''Ctrl Clear''' is pressed. &lt;br /&gt;
*'''[[on.help]]''' is called when the combo-key '''Ctrl ?''' is pressed.&lt;br /&gt;
*'''[[on.charIn]]''' is called when the Nspire detects a non arrow key being pressed.&lt;br /&gt;
*'''[[on.createMathBox]]''' called when there is a MathBox created. &lt;br /&gt;
*'''[[on.create]]''' called when the script gets created. '''Deprecated in 3.2'''. See ''on.contruction''.&lt;br /&gt;
*'''[[on.construction]]''' called when the script gets created. &lt;br /&gt;
*'''[[on.deactivate]]''' called when the focus is lost on the page (like launching the document, changing page etc...) &lt;br /&gt;
*'''[[on.activate]]''' called when the focus is on the page (like launching the document, changing page etc...) &lt;br /&gt;
*'''[[on.destroy]]''' is called when the document is about to get closed (or cut)&lt;br /&gt;
*'''[[on.getFocus]]''' is called when the script receives user input focus.  	 &lt;br /&gt;
*'''[[on.loseFocus]]''' is called when the script loses user input focus. &lt;br /&gt;
*'''[[on.mouseDown]]''' is called when we press the left mouse button. X and Y are the pressed point coordinates. &lt;br /&gt;
*'''[[on.mouseUp]]''' is called when we release the left mouse button. &lt;br /&gt;
*'''[[on.mouseMove]]''' is called when the mouse moves &lt;br /&gt;
*'''[[on.grabDown]]''' is called when the grabbing motion is detected&lt;br /&gt;
*'''[[on.grabUp]]''' is called after the grabbing action.&lt;br /&gt;
*'''[[on.rightMouseDown]]''' is called when the user pushes the &amp;quot;right click&amp;quot; button&lt;br /&gt;
*'''[[on.rightMouseUp]]''' is called when the user releases the &amp;quot;right click&amp;quot; button&lt;br /&gt;
*'''[[on.keyboardUp]]'''() which fires when the tablet's on-screen keyboard gets shown.&lt;br /&gt;
*'''[[on.keyboardDown]]'''() which fires when the tablet's on-screen keyboard gets hidden.&lt;br /&gt;
*'''[[on.varChange]]''' is called when a [[var.monitor|monitored variable]] gets changed.&lt;br /&gt;
*'''[[on.getSymbolList]]''' is called when the script app symbol list is being serialized to the clipboard.&lt;br /&gt;
*'''[[on.save]]''' is called when the script app is saved to the document or copied to the clipboard.&lt;br /&gt;
*'''[[on.restore]]''' is called when the script application is restored from its saved state in a document or when the app is pasted into a document..&lt;br /&gt;
*'''[[on.cut]]'''  is called when the user cuts something.&lt;br /&gt;
*'''[[on.copy]]''' is called when the user copies something.&lt;br /&gt;
*'''[[on.paste]]''' is called when the user pastes something.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:gc|Graphics Operations]]  ==&lt;br /&gt;
'''gc''' is the Nspire's ''graphic context''. A graphics context is a module that has a handle to the script’s graphics output window and a library of graphics routines that are used to draw on the window. A graphics context is supplied to the script ”on.paint” event handler each time the window needs to be redrawn. The graphics context employs a pixel-based coordinate system with the origin in the upper left corner of the drawing window.&lt;br /&gt;
&lt;br /&gt;
*'''[[gc:clipRect]]'''(op, x, y, width, height) - Sets the clipping rectangle for subsequent graphics operations.&lt;br /&gt;
*'''[[gc:drawArc]]'''(x, y, width, height, start angle, finish angle).&lt;br /&gt;
*'''[[gc:drawImage]]'''(image,x,y) First argument in format “[[TI.Image]]”, x and y the coords.&lt;br /&gt;
*'''[[gc:drawLine]]'''(xstart, ystart, xend, yend) Draws a line starting at the point (xstart,ystart) and ending at the point (xend, yend)&lt;br /&gt;
*'''[[gc:drawPolyLine]]'''(int list1 [,int list2, .., int listN]) Draws a shape from a list contaning successively the x and y coordinates of each point the line have to draw.&lt;br /&gt;
*'''[[gc:drawRect]]'''(x, y, xwidth, yheight) Draws a rectangle at (x,y) with the “x” side being “xwidth” long and the “y” side being “yheight” long&lt;br /&gt;
*'''[[gc:drawString]]'''(string, x, y, position) position is the string’s anchor point and can be &amp;quot;baseline&amp;quot;, “bottom”, “middle”, or “top”. &lt;br /&gt;
*'''[[gc:fillArc]]'''(x, y, width, height, start angle, finish angle) see [[gc:drawArc]]&lt;br /&gt;
*'''[[gc:fillPolygon]]'''(int list1 [,int list2, .., int listN]) see [[gc:drawPolyLine]]&lt;br /&gt;
*'''[[gc:fillRect]]'''(x, y, width, height) see [[gc:drawRect]]&lt;br /&gt;
*'''[[gc:getStringHeight]]'''(string) - Returns the string's height.&lt;br /&gt;
*'''[[gc:getStringWidth]]'''(string) - Returns the string's width&lt;br /&gt;
*'''[[gc:setAlpha]]'''(alpha) - where alpha is an integer between 0 and 255. Sets the transparency. '''''Not available anymore in 3.2+'''''&lt;br /&gt;
*'''[[gc:setColorRGB]]'''(red, green, blue) RGB values are integers, from 0 to 255.&lt;br /&gt;
*'''[[gc:setFont]]'''(font, type, size), with font : {“sansserif”, &amp;quot;serif&amp;quot;, ..}, type {“b”, “r”, “i”}, size(int)&lt;br /&gt;
*'''[[gc:setPen]]'''(thickness, smoothness) : thickness {“thin”, “medium”, &amp;quot;thick&amp;quot;}, smoothness {“smooth”, &amp;quot;dotted&amp;quot;, &amp;quot;dashed&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
== [[:Category:image|Images]] ==&lt;br /&gt;
*'''[[image.copy]]'''(theImage, width, height) : Returns a copy of the input image scaled to fit the specified pixel width and height. &lt;br /&gt;
*'''[[image.height]]'''(theImage) : Returns the height of the ''image''&lt;br /&gt;
*'''[[image.new]]'''(theImage) : Allocates a new [[TI.Image]]&lt;br /&gt;
*'''[[image.rotate]]'''(theImage, angle) : Returns a rotated copy of ''theImage'' by ''angle'' degrees&lt;br /&gt;
*'''[[image.width]]'''(theImage) : Returns the width of the ''image''&lt;br /&gt;
&lt;br /&gt;
== [[:Category:Physics_Engine|Physics Engine]] ==&lt;br /&gt;
A port of Chipmunk Physics 5.3 has been embedded as an optional module (you have to 'require' it at the beginning of your script, in order to use it)&lt;br /&gt;
*Arbiters and Collision Pairs&lt;br /&gt;
*Bodies&lt;br /&gt;
*Bounding Boxes&lt;br /&gt;
*Circle Shapes&lt;br /&gt;
*Constraints&lt;br /&gt;
*Misc&lt;br /&gt;
*Polygon Shapes&lt;br /&gt;
*Segment Shapes&lt;br /&gt;
*SegmentQueryInfo&lt;br /&gt;
*Shape Queries&lt;br /&gt;
*Shapes&lt;br /&gt;
*Space Queries&lt;br /&gt;
*Spaces&lt;br /&gt;
*Vectors&lt;br /&gt;
&lt;br /&gt;
== [[:Category:platform|Platform]] ==&lt;br /&gt;
*[[platform.isColorDisplay]]() : Returns true if the display of the host platform is color-capable (Nspire CX and emulator). Returns false if the display is grayscale (Nspire non-CX).      &lt;br /&gt;
*[[platform.isDeviceModeRendering]]() : Returns true if the script is running on the hand-held device or in the emulator (with the calculator view), and false if the script is running in the normal view of the emulator.&lt;br /&gt;
*[[platform.isTabletModeRendering]]() : Returns true if the script is running on a tablet device (iPad app) and false otherwise.&lt;br /&gt;
*[[:Category:platform.window|platform.window]] : Returns the window object currently owned by the script application. The window object contains several other methods.&lt;br /&gt;
*[[platform.withGC]](...) : executes a function which a passed dummy [[gc]].&lt;br /&gt;
*[[platform.registerErrorHandler]](...) : A global error handler for the lua script.&lt;br /&gt;
*[[platform.hw]]() : returns a number corresponding to the type of device the script is running on.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:timer|Timer]] ==&lt;br /&gt;
*'''[[timer.start]]'''(period) : Starts the timer with the given ''period'' (in seconds)&amp;lt;br /&amp;gt;&lt;br /&gt;
*'''[[timer.getMilliSecCounter]]'''() : Returns the value of the milliseconds elapsed since the calculator's last boot.&amp;lt;br /&amp;gt;&lt;br /&gt;
*'''[[timer.stop]]'''() : Stops the timer.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:toolpalette|Toolpalette]] ==&lt;br /&gt;
The tool palette provides a menu of commands, selectable by the user, that invoke functionality of the script app. The menu itself is accessible by pressing the &amp;quot;Menu&amp;quot; button. &lt;br /&gt;
*'''[[toolpalette.register|register]]'''(menuStructure) :  Registers the ''menuStructure'' table. &lt;br /&gt;
*'''[[toolpalette.enable|enable]]'''(toolname, itemname, state) : Enables or disables a menu item in the tool palette.    &lt;br /&gt;
*'''[[toolpalette.enableCopy|enableCopy]]'''(state) : This routine enables / disables the Edit &amp;gt; Copy menu command.&lt;br /&gt;
*'''[[toolpalette.enableCut|enableCut]]'''(state) : This routine enables / disables the Edit &amp;gt; Cut menu command.&lt;br /&gt;
*'''[[toolpalette.enablePaste|enablePaste]]'''(state) : This routine enables / disables the Edit &amp;gt; Paste menu command.&lt;br /&gt;
&lt;br /&gt;
== [[:Category:var|var]]  ==&lt;br /&gt;
'var' functions allows the script to interact with BASIC variables.&lt;br /&gt;
*[[var.list]]() - Lists of names of variables currently used. &lt;br /&gt;
*[[var.monitor]](name) - Turns on monitoring of the math variable with given ''name''. &lt;br /&gt;
*[[var.unmonitor]](name) - Turns off monitoring of the math variable with given ''name''. &lt;br /&gt;
*[[var.makeNumericList]](name)&amp;amp;nbsp;: Creates a list in the symbol table with the given ''name'', which is optimized to hold numeric values.&lt;br /&gt;
*[[var.recall]](name)&amp;amp;nbsp;: Returns the value of a math variable with the given ''name''. &lt;br /&gt;
*[[var.recallAt]](name, col [,row])&amp;amp;nbsp;: Recalls a value from a cell of a list or matrix in the symbol table.&lt;br /&gt;
*[[var.recallstr]](name)&amp;amp;nbsp;: Returns the value of a math variable with the given name as a string. &lt;br /&gt;
*[[var.store]](name, value)&amp;amp;nbsp;: Stores ''value'' as a math variable with the given ''name''.&lt;br /&gt;
*[[var.storeAt]](name, numericValue, col [,row])&amp;amp;nbsp;: Stores a numeric value into an element of a math list or matrix with the given ''name''.&lt;br /&gt;
&lt;br /&gt;
== Misc. ==&lt;br /&gt;
*'''[[locale.name]]'''() : Returns the name of the current locale as an ISO-639 code.&lt;br /&gt;
*'''[[clipboard.addText]]'''(string) : Add 'string' to the clipboard&lt;br /&gt;
*'''[[clipboard.getText]]'''() : Get the current content of the clipboard&lt;br /&gt;
*'''[[cursor.hide]]'''() :  Hides the cursor on the screen &lt;br /&gt;
*'''[[cursor.set]]'''(cursorname) : Sets the new shape of the cursor to ''cursorname'' (see full list in the specific article)&lt;br /&gt;
*'''[[cursor.show]]'''() : Makes the cursor visible on the screen&lt;br /&gt;
*'''[[document.markChanged]]'''()&amp;amp;nbsp;: Mark the current document as changed&lt;/div&gt;</summary>
		<author><name>Technolapin</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inspired-lua.org/index.php?title=coroutines&amp;diff=1222</id>
		<title>coroutines</title>
		<link rel="alternate" type="text/html" href="https://wiki.inspired-lua.org/index.php?title=coroutines&amp;diff=1222"/>
		<updated>2014-11-08T19:34:28Z</updated>

		<summary type="html">&lt;p&gt;Technolapin: Created page with &amp;quot;The coroutines in lua are pieces of codes that can be execute or stoped easely.  A coroutine is declared with a function:  &amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt; function foo (a)  print a+1 end loc...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The coroutines in lua are pieces of codes that can be execute or stoped easely.&lt;br /&gt;
&lt;br /&gt;
A coroutine is declared with a function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function foo (a)&lt;br /&gt;
 print a+1&lt;br /&gt;
end&lt;br /&gt;
local co = coroutine.create (foo)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run a coroutine, you must use coroutine.resume() :  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function foo (a)&lt;br /&gt;
 print a+1&lt;br /&gt;
end&lt;br /&gt;
local co = coroutine.create (foo)&lt;br /&gt;
coroutine.resume (co, 2)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The syntax is : &lt;br /&gt;
coroutine.resume (coroutinetorun, arg1, arg2, arg3, ...)&lt;br /&gt;
&lt;br /&gt;
So now the code will return 3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But coroutines are much more usefull with using coroutine.yield.&lt;br /&gt;
That function will stop the execution of the coroutine, that can be resumed with coroutine.resume.&lt;br /&gt;
The coroutine.resume() will return all argument in the coroutine.yield()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function foo ()&lt;br /&gt;
 local a = 0&lt;br /&gt;
 while true do&lt;br /&gt;
  a=a+1&lt;br /&gt;
  coroutine.yield (a, &amp;quot;an useless string just to show that more than one value can be returned&amp;quot;)&lt;br /&gt;
 end&lt;br /&gt;
end&lt;br /&gt;
local co = coroutine.create (foo)&lt;br /&gt;
print (coroutine.resume (co))      -- return if the coroutine runed and the values in the coroutine.yield&lt;br /&gt;
&lt;br /&gt;
print (coroutine.resume (co))      -- one more time!&lt;br /&gt;
print (coroutine.resume (co))      -- again&lt;br /&gt;
print (coroutine.resume (co))      -- a last one to finish.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The status of the coroutine can be returned with coroutine.status()&lt;br /&gt;
The possible status are:&lt;br /&gt;
 - suspended   -- the coroutine is suspended and can be resumed&lt;br /&gt;
 - dead        -- the coroutine is terminated and wont do anything&lt;br /&gt;
&lt;br /&gt;
Instead of coroutine.create () you can use coroutine.wrap, that return a function wich contain the coroutine.resume() of the function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
coroutine.running () will return the currently running coroutine. That can be usefull if you use several coroutines.&lt;/div&gt;</summary>
		<author><name>Technolapin</name></author>
		
	</entry>
</feed>