A SERVICE OF

logo

Chapter 2: iTool System Architecture 45
iTool Developer’s Guide System Resources
iconPath = path + iconName
This code uses the ROUTINE_INFO function to retrieve the path to the file specified
by the string
routineName. It then extracts the directory that contains the file using
the FILE_DIRNAME function, and concatenates the directory name with the name
of the bitmap file contained in the string
iconName.
Note
The routine specified by
routineName must have been compiled for the
ROUTINE_INFO function to return the correct value.
Including this code in a routine and setting the ICON property equal to the variable
iconPath provides a platform-independent method for locating bitmap files in a
directory relative to the directory from which your iTool code was compiled.
If the value of the ICON property is not set and the iTool system needs to display a
bitmap to represent a component, the file
resource/bitmaps/new.bmp is used.
Help System
The iTool system allows the user to select “Help on Selected Item” from the Help
menu (or, in the case of the Operations browser, from the context menu) to display
online help for the selected item.
Note
Help for iTool items is provided via a call to the ONLINE_HELP procedure. It is
beyond the scope of this chapter to discuss the creation of help files suitable for
display by ONLINE_HELP; please see Chapter 22, “Providing Online Help For
Your Application” (Application Programming) for additional information.
Creating a Help Directory
Help content designed for use by the iTools help system should be located in a
separate directory that is included in IDL’s help path (as defined by the !HELP_PATH
system variable).
Information about the topic to be displayed by ONLINE_HELP is contained in an
XML format file with a name of the form
*help.xml. To create the *help.xml
file, copy the file
<IDL_DIR>/help/template_help.xml into your help
directory, rename it to suit your application, and edit it as described in “Format of
Help Entries” on page 46.