Changes

Jump to navigation Jump to search

Category:Events

1,771 bytes added, 19:43, 30 May 2014
m
Line 1: Line 1:  
==Quick Overview==
 
==Quick Overview==
*'''[[on.paint]]''' is called when the GUI is painted. [[:Category:gc|'gc' is the Graphics Context]]  
+
 
 +
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
 
*'''[[on.resize]]''' is called when the window is rezised
   −
<br>  
+
<br/>  
    
*'''[[on.timer]]''' is called at each timer ticks. See [[:Category:timer|timer]].
 
*'''[[on.timer]]''' is called at each timer ticks. See [[:Category:timer|timer]].
Line 14: Line 18:  
*'''[[on.arrowUp]]''' is called when the up '''arrow''' is pressed  
 
*'''[[on.arrowUp]]''' is called when the up '''arrow''' is pressed  
 
*'''[[on.arrowDown]]''' is called when the '''down''' 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
      
<br>  
 
<br>  
Line 28: Line 30:  
*'''[[on.backtabKey]]''' is called when the combo-key '''Maj Tab''' 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.clearKey]]''' is called when the combo-key '''Ctrl Clear''' is pressed.  
*'''[[on.help]]''' is called when the combo-key '''Ctrl H''' is pressed.
+
*'''[[on.help]]''' is called when the combo-key '''Ctrl ?''' is pressed.
    
<br>  
 
<br>  
Line 36: Line 38:  
<br>  
 
<br>  
   −
*'''[[on.blink]]''' called when the focus is lost on the page (like launching the document, changing page etc...)
+
*'''[[on.blink]]''' called when focus changes, notably when the widget is blinking when selecting an app on the screen (Ctrl-K)
*'''[[on.create]]''' called when the script gets created.  
+
*'''[[on.createMathBox]]''' called when there is a MathBox created.
 +
*'''[[on.create]]''' called when the script gets created. '''Deprecated in 3.2'''. See ''on.contruction''.
 +
*'''[[on.construction]]''' 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.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.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.destroy]]''' is called when the document is about to get closed (or cut)
 +
 +
*'''[[on.getFocus]]''' is called when the script receives user input focus. 
 +
*'''[[on.loseFocus]]''' is called when the script loses user input focus.
    
<br>  
 
<br>  
Line 47: Line 54:  
*'''[[on.mouseUp]]''' is called when we release the left mouse button.  
 
*'''[[on.mouseUp]]''' is called when we release the left mouse button.  
 
*'''[[on.mouseMove]]''' is called when the mouse moves  
 
*'''[[on.mouseMove]]''' is called when the mouse moves  
*'''[[on.grabDown]]'''  
+
*'''[[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.grabMove]]'''
+
*'''[[on.grabUp]]''' is called after the grabbing action.
*'''[[on.grabUp]]'''  
+
*'''[[on.grabMove]]''' is called when the cusor is moved while grabbed. '''Doesn't exist anymore in 3.2+.'''
*'''[[on.rightMouseDown]]'''  
+
*'''[[on.rightMouseDown]]''' is called when the user pushes the "right click" button
*'''[[on.rightMouseUp]]'''
+
*'''[[on.rightMouseUp]]''' is called when the user releases the "right click" button
    
<br>  
 
<br>  
   −
*'''[[on.cutEnabled]]'''  
+
*'''[[on.keyboardUp]]'''() which fires when the tablet's on-screen keyboard gets shown.
*'''[[on.copyEnabled]]'''  
+
*'''[[on.keyboardDown]]'''() which fires when the tablet's on-screen keyboard gets hidden.
*'''[[on.pasteEnabled]]'''
+
 
*'''[[on.cut]]'''  
+
<br>
*'''[[on.copy]]'''
+
 
*'''[[on.paste]]'''
+
*'''[[on.varChange]]''' is called when a [[var.monitor|monitored variable]] gets changed.
<br> <br>
+
*'''[[on.getSymbolList]]''' is called when the script app symbol list is being serialized to the clipboard.
 +
 
 +
<br>
 +
 
 +
*'''[[on.save]]''' is called when the script app is saved to the document or copied to the clipboard.
 +
*'''[[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..
 +
 
 +
<br>
 +
 
 +
*'''[[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.
 +
 
 +
<br>

Navigation menu