A SERVICE OF

logo

Chapter 15: Creating a Custom iTool Widget Interface 377
iTool Developer’s Guide Example: a Custom iTool Interface
iTool Launch Routine Discussion
Our iTool launch routine simply registers the example2tool iTool class and the
example2_wdtool interface definition, then creates an instance of the
Example 2 Tool iTool using the Example2_UI interface.
Example Code
This iTool launch is defined in the file
example2tool.pro in the
examples/doc/itools subdirectory of the IDL distribution. Run the example
procedure by entering
example2tool at the IDL command prompt or view the file
in an IDL Editor window by entering .EDIT example2tool.pro.
PRO example2tool, IDENTIFIER = identifier, _EXTRA = _extra
ITREGISTER, 'Example 2 Tool', 'example2tool'
ITREGISTER, 'Example2_UI', 'example2_wdtool', /USER_INTERFACE
identifier = IDLITSYS_CREATETOOL('Example 2 Tool',$
VISUALIZATION_TYPE = ['Plot'], $
USER_INTERFACE='Example2_UI', $
TITLE = 'Example iTool Interface', $
_EXTRA = _extra)
END
Note that our launch routine does not allow the iTool to accept command-line
arguments. A more sophisticated iTool might allow the user to supply data at the
command line, as described in “Creating an iTool Launch Routine” on page 103.