Changes

Jump to navigation Jump to search

toolpalette.register

39 bytes added, 23:26, 24 May 2011
no edit summary
Line 1: Line 1:  
toolpalette'''register''' is a function that is part of the [[:Category:toolpalette| toolpalette]].
 
toolpalette'''register''' is a function that is part of the [[:Category:toolpalette| toolpalette]].
      
toolpalette.'''register''' may be called once in the top level flow of the script app. Once registered, the tool palette is managed automatically by the Nspire framework.
 
toolpalette.'''register''' may be called once in the top level flow of the script app. Once registered, the tool palette is managed automatically by the Nspire framework.
 
When the user chooses an item from a toolbox, the associated function is called with two parameters: the name of the toolbox and the name of the menu item.
 
When the user chooses an item from a toolbox, the associated function is called with two parameters: the name of the toolbox and the name of the menu item.
      
{{Since|3.0}}
 
{{Since|3.0}}
Line 20: Line 18:     
== Example  ==
 
== Example  ==
 +
 +
The script app uses this routine to register its tool palette with the Nspire framework. The menu structure is a table describing the name of each tool box, the menus that appear in each tool box, and the function to call when the user invokes the menu item.
 +
This example demonstrates the layout of a toolpalette’s menu structure.<br />
 +
 
<syntaxhighlight>menu = {
 
<syntaxhighlight>menu = {
 
    
 
    
Line 41: Line 43:     
== See also  ==
 
== See also  ==
*[[LINK_1]]
+
*[[:Category:toolPalette|toolPalette]]
*[[LINK_2]]
+
*[[toolpalette.enable]]
    
<br /><br />
 
<br /><br />
    
[[Category:toolPalette]]
 
[[Category:toolPalette]]
  −
  −
 
  −
The script app uses this routine to register its tool palette with the Nspire framework. The menu structure is a table describing the name of each tool box, the menus that appear in each tool box, and the function to call when the user invokes the menu item.
  −
This example demonstrates the layout of a toolpalette’s menu structure.
 

Navigation menu