Difference between revisions of "Category:Events"

From Inspired-Lua Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
==Quick Overview==
 
==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]]''' is called when the GUI is painted. [[:Category:gc|'gc' is the Graphics Context]]  
 
*'''[[on.paint]]''' is called when the GUI is painted. [[:Category:gc|'gc' is the Graphics Context]]  
 
*'''[[on.resize]]''' is called when the window is rezised
 
*'''[[on.resize]]''' is called when the window is rezised

Revision as of 22:51, 3 September 2011

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 here.



  • on.arrowKey is called when an arrow key from the clickPad/TouchPad is pressed (right, left, up, down)
  • 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
  • on.up -- probably for the touchpad up motion
  • on.down -- probably for the touchpad down motion



  • on.charIn is called when the Nspire detects a non arrow key being pressed.


  • on.blink called when the focus is lost on the page (like launching the document, changing page etc...)
  • on.create called when the script gets created.
  • on.deactivate called when the focus is lost on the page (like launching the document, changing page etc...)
  • on.activate called when the focus is on the page (like launching the document, changing page etc...)
  • on.destroy is called when the document is about to get closed (or cut)


  • 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-down motion is detected
  • on.grabMove is called when the grab-and-move motion is detected
  • on.grabUp is called when the grabbing-up motion is detected
  • on.rightMouseDown is called when the user pushes the "right click" button ?
  • on.rightMouseUp is called when the user releases the "right click" button ?



  • on.cutEnabled is called when the "cut" feature gets enabled.
  • on.copyEnabled is called when the "copy" feature gets enabled.
  • on.pasteEnabled is called when the "pastes" feature gets enabled.
  • on.cut is called when the user cuts something.
  • on.copy is called when the user copies something.
  • on.paste is called when the user pastes something.