ITT Rule IDL Version 7.0 User Manual Page 358

  • Download
  • Add to my manuals
  • Print
  • Page
    / 430
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 357
358 Chapter 15: Creating a Custom iTool Widget Interface
Creating an iTool Launch Routine iTool Developers Guide
Creating an iTool Launch Routine
Once you have created your custom iTool widget interface, you must create a way to
launch an iTool using the interface. To do this, you will most often create a custom
iTool launch routine.
iTool launch routines are discussed in detail in “Creating an iTool Launch Routine”
on page 103. This section describes changes you will need to make to an existing
launch routine to cause an iTool to use your custom widget interface.
Register Your User Interface
To register your new user interface, call the ITREGISTER routine with the
USER_INTERFACE keyword. The following statement registers the example
interface developed in “Example: a Custom iTool Interface” on page 360:
ITREGISTER, 'Example2_UI', 'example2_wdtool', /USER_INTERFACE
Here, the example interface is registered with the name “Example2_UI”.
Use Your User Interface
The final step is to create an instance of an iTool using your interface. To do this,
specify the USER_INTERFACE keyword to the IDLITSYS_CREATETOOL
function. The following statement creates an instance of an example tool using the
example interface:
identifier = IDLITSYS_CREATETOOL('Example 2 Tool',$
VISUALIZATION_TYPE = ['Plot'], $
USER_INTERFACE='Example2_UI', $
TITLE = 'Example iTool Interface', $
_EXTRA = _extra)
See the iTool launch routine developed in “Example: a Custom iTool Interface” on
page 360 for a working example.
Using an Existing iTool Launch Routine
If you first register your iTool interface with the iTool system using the
ITREGISTER procedure, you can specify that your interface be used by an existing
iTool launch routine that accepts the USER_INTERFACE keyword. This allows you
to avoid the need to create a custom launch routine if an existing routine will serve.
For example, if we wanted to use our custom interface with the IPLOT tool, we could
execute the following lines a the IDL command prompt:
Page view 357
1 2 ... 353 354 355 356 357 358 359 360 361 362 363 ... 429 430

Comments to this Manuals

No comments