Line 1: |
Line 1: |
− | Events category. | + | ==Quick Overview== |
| + | |
| + | Events are one of the most fundamental things to know about the Nspire Lua language. |
| + | You can see how events are managed inside the Lua implementation [[Life Cycle|here]]. |
| + | |
| + | *'''[[on.paint]]'''(gc) is called when the GUI is painted. [[:Category:gc|'gc' is the Graphics Context]] |
| + | *'''[[on.resize]]''' is called when the window is rezised |
| + | |
| + | <br/> |
| + | |
| + | *'''[[on.timer]]''' is called at each timer ticks. See [[:Category:timer|timer]]. |
| | | |
| <br> | | <br> |
| | | |
− | *'''[[:Category:on.paint|on.paint]]''' is called when the GUI is painted. [[:Category:gc|'gc' is the Graphics Context]] | + | *'''[[on.arrowKey]]''' is called when an '''arrow key''' from the clickPad/TouchPad is pressed (right, left, up, down) |
− | *'''[[:Category:on.resize|on.resize]]''' is called when the window is rezised | + | *'''[[on.arrowLeft]]''' is called when the '''left''' arrow is pressed |
| + | *'''[[on.arrowRight]]''' is called when the '''right''' arrow is pressed |
| + | *'''[[on.arrowUp]]''' is called when the up '''arrow''' is pressed |
| + | *'''[[on.arrowDown]]''' is called when the '''down''' arrow is pressed |
| | | |
| <br> | | <br> |
| | | |
− | *'''[[:Category:on.timer|on.timer]]''' is called at each timer ticks. See [[:Category:timer|timer]]. | + | *'''[[on.enterKey]]''' is called when the '''enter''' key is pressed. |
| + | *'''[[on.escapeKey]]''' is called when the '''escape''' key is pressed. |
| + | *'''[[on.tabKey]]''' is called when the '''tab''' key is pressed. |
| + | *'''[[on.deleteKey]]''' is called when the '''delete''' key is pressed. |
| + | *'''[[on.backspaceKey]]''' is called when the '''clear''' key is pressed. |
| + | *'''[[on.returnKey]]''' is called when the '''return''' key is pressed. |
| + | *'''[[on.contextMenu]]''' is called when the combo-key '''Ctrl Menu''' is pressed. |
| + | *'''[[on.backtabKey]]''' is called when the combo-key '''Maj Tab''' is pressed. |
| + | *'''[[on.clearKey]]''' is called when the combo-key '''Ctrl Clear''' is pressed. |
| + | *'''[[on.help]]''' is called when the combo-key '''Ctrl ?''' is pressed. |
| | | |
| <br> | | <br> |
| | | |
− | *'''[[:Category:on.arrowKey|on.arrowKey]]''' is called when an '''arrow key''' from the clickPad/TouchPad is pressed (right, left, up, down) | + | *'''[[on.charIn]]''' is called when the Nspire detects a non arrow key being pressed. |
− | *'''[[:Category:on.arrowLeft|on.arrowLeft]]''' is called when the '''left''' arrow is pressed
| |
− | *'''[[:Category:on.arrowRight|on.arrowRight]]''' is called when the '''right''' arrow is pressed
| |
− | *'''[[:Category:on.arrowUp|on.arrowUp]]''' is called when the up '''arrow''' is pressed
| |
− | *'''[[:Category:on.arrowDown|on.arrowDown]]''' is called when the '''down''' arrow is pressed
| |
− | *'''[[:Category:on.up|on.up]]''' -- probably for the touchpad up motion
| |
− | *'''[[:Category:on.down|on.down]]''' -- probably for the touchpad down motion
| |
| | | |
| <br> | | <br> |
| | | |
− | *'''[[:Category:on.enterKey|on.enterKey]]''' is called when the '''enter''' key is pressed. | + | *'''[[on.blink]]''' called when focus changes, notably when the widget is blinking when selecting an app on the screen (Ctrl-K) |
− | *'''[[:Category:on.escapeKey|on.escapeKey]]''' is called when the '''escape''' key is pressed. | + | *'''[[on.createMathBox]]''' called when there is a MathBox created. |
− | *'''[[:Category:on.tabKey|on.tabKey]]''' is called when the '''tab''' key is pressed. | + | *'''[[on.create]]''' called when the script gets created. '''Deprecated in 3.2'''. See ''on.contruction''. |
− | *'''[[:Category:on.deleteKey|on.deleteKey]]''' is called when the '''delete''' key is pressed.
| + | *'''[[on.construction]]''' called when the script gets created. |
− | *'''[[:Category:on.backspaceKey|on.backspaceKey]]''' is called when the '''clear''' key is pressed. | + | *'''[[on.deactivate]]''' called when the focus is lost on the page (like launching the document, changing page etc...) |
− | *'''[[:Category:on.returnKey|on.returnKey]]''' is called when the '''return''' key is pressed. | + | *'''[[on.activate]]''' called when the focus is on the page (like launching the document, changing page etc...) |
− | *'''[[:Category:on.contextMenu|on.contextMenu]]''' is called when the combo-key '''Ctrl Menu''' is pressed. | + | *'''[[on.destroy]]''' is called when the document is about to get closed (or cut) |
− | *'''[[:Category:on.backtabKey|on.backtabKey]]''' is called when the combo-key '''Maj Tab''' is pressed. | + | |
− | *'''[[:Category:on.clearKey|on.clearKey]]''' is called when the combo-key '''Ctrl Clear''' is pressed. | + | *'''[[on.getFocus]]''' is called when the script receives user input focus. |
− | *'''[[:Category:on.help|on.help]]''' is called when the combo-key '''Ctrl H''' is pressed. | + | *'''[[on.loseFocus]]''' is called when the script loses user input focus. |
| | | |
| <br> | | <br> |
| | | |
− | *'''[[:Category:on.charIn|on.charIn]]''' is called when the Nspire detects a non arrow key being pressed. | + | *'''[[on.mouseDown]]''' is called when we press the left mouse button. X and Y are the pressed point coordinates. |
| + | *'''[[on.mouseUp]]''' is called when we release the left mouse button. |
| + | *'''[[on.mouseMove]]''' is called when the mouse moves |
| + | *'''[[on.grabDown]]''' is called when the grabbing motion is detected (When the user presses and holds the Select key on a device, when the user presses Ctrl + Select on a device, or when the user presses the middle mouse button) |
| + | *'''[[on.grabUp]]''' is called after the grabbing action. |
| + | *'''[[on.grabMove]]''' is called when the cusor is moved while grabbed. '''Doesn't exist anymore in 3.2+.''' |
| + | *'''[[on.rightMouseDown]]''' is called when the user pushes the "right click" button |
| + | *'''[[on.rightMouseUp]]''' is called when the user releases the "right click" button |
| | | |
| <br> | | <br> |
| | | |
− | *'''[[:Category:on.blink|on.blink]]''' called when the focus is lost on the page (like launching the document, changing page etc...) | + | *'''[[on.keyboardUp]]'''() which fires when the tablet's on-screen keyboard gets shown. |
− | *'''[[:Category:on.create|on.create]]''' called when the script gets created. | + | *'''[[on.keyboardDown]]'''() which fires when the tablet's on-screen keyboard gets hidden. |
− | *'''[[:Category:on.deactivate|on.deactivate]]''' called when the focus is lost on the page (like launching the document, changing page etc...) | + | |
− | *'''[[:Category:on.activate|on.activate]]''' called when the focus is on the page (like launching the document, changing page etc...)
| + | <br> |
− | *'''[[:Category:on.destroy|on.destroy]]''' is called when the document is about to get closed (or cut) | + | |
| + | *'''[[on.varChange]]''' is called when a [[var.monitor|monitored variable]] gets changed. |
| + | *'''[[on.getSymbolList]]''' is called when the script app symbol list is being serialized to the clipboard. |
| | | |
| <br> | | <br> |
| | | |
− | *'''[[:Category:on.mouseDown|on.mouseDown]]''' is called when we press the left mouse button. X and Y are the pressed point coordinates. | + | *'''[[on.save]]''' is called when the script app is saved to the document or copied to the clipboard. |
− | *'''[[:Category:on.mouseUp|on.mouseUp]]''' is called when we release the left mouse button. | + | *'''[[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.. |
− | *'''[[:Category:on.mouseMove|on.mouseMove]]''' is called when the mouse moves
| |
− | *'''[[:Category:on.grabDown|on.grabDown]]'''
| |
− | *'''[[:Category:on.grabMove|on.grabMove]]'''
| |
− | *'''[[:Category:on.grabUp|on.grabUp]]'''
| |
− | *'''[[:Category:on.rightMouseDown|on.rightMouseDown]]'''
| |
− | *'''[[:Category:on.rightMouseUp|on.rightMouseUp]]'''
| |
| | | |
| <br> | | <br> |
| | | |
− | *'''[[:Category:on.cutEnabled|on.cutEnabled]]''' | + | *'''[[on.cutEnabled]]''' is called when the "cut" feature gets enabled. |
− | *'''[[:Category:on.copyEnabled|on.copyEnabled]]''' | + | *'''[[on.copyEnabled]]''' is called when the "copy" feature gets enabled. |
− | *'''[[:Category:on.pasteEnabled|on.pasteEnabled]]''' | + | *'''[[on.pasteEnabled]]''' is called when the "pastes" feature gets enabled. |
− | *'''[[:Category:on.cut|on.cut]]''' | + | *'''[[on.cut]]''' is called when the user cuts something. |
− | *'''[[:Category:on.copy|on.copy]]''' | + | *'''[[on.copy]]''' is called when the user copies something. |
− | *'''[[:Category:on.paste|on.paste]]''' | + | *'''[[on.paste]]''' is called when the user pastes something. |
− | | |
− | <br><br>
| |
| | | |
− | [[Category:timer|timer]]
| + | <br> |