Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

System Resources


This section contains information on resources used by the iTool system.

Icon Bitmaps

Some iTool components have associated icons. Icons for iTool components are displayed in the tree view of a browser window.

Bitmaps used as icons in the iTool system must be either .bmp or .png files. The images contained in icon bitmap files can be either True Color (24-bit color) images or paletted (8-bit color) images.

Note
There are different requirements for bitmap images that will be displayed on button widgets. See Using Button Widgets for details.

By default, bitmap files for icons used by the iTool system are stored in the bitmaps subdirectory of the resource subdirectory of the IDL distribution. If an icon's bitmap file is located in this directory, specify the base name of the file - without the filename extension - as the value of the ICON property of the component. For example, to use the file arrow.bmp, located in the resource/bitmaps subdirectory of the IDL distribution, specify the value of the ICON property as follows:

ICON = 'arrow' 

If you include the filename extension when setting the ICON property, the iTool system assumes that the specified value is the full path to the bitmap file. For example, to use the file my_icon.png, stored in the directory /home/mydir as an icon, specify the value of the ICON property as follows:

ICON = '/home/mydir/my_icon.png' 

If you are distributing your iTool code to others, you may want to specify a path relative to the location of your code for the icon bitmap files. To retrieve the path to the file containing code for a given routine, you could use code similar to the following:

; Use my own Icon bitmap 
iconName = 'my_icon.png' 
routineName = 'myVisualizationType__define' 
routineInfo = ROUTINE_INFO(routineName, /SOURCE) 
path = FILE_DIRNAME(routineInfo.path, /MARK_DIRECTORY) 
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 an 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 and System Preferences browsers, from the context menu) to display online help for the selected item.

Note
Help for iTool items is provided via a call to the IDL 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 Providing Online Help For Your Application for additional information.

Information about the topic to be displayed by ONLINE_HELP is contained in an XML format file named idlithelp.xml, located in the help subdirectory of the IDL distribution.

The format for a help entry is:

<Topic> 
    <Keyword>helpKeyword</Keyword> 
    <Link type="MSHTMLHELP">contextNumber</Link> 
    <Link type="PDF" book=bookName>pdfDestination</Link> 
    <Link type="HTML">htmlFile</Link> 
</Topic> 

Where:

The type attribute of the <Link> entity is required, and can have one of the following values:

If more than one <Link> entry is present, IDL will choose which to display based on the platform; on Windows platforms, the <Link> entity with the type attribute set to MSHTMLHELP will be used, on Unix platforms, the <Link> entity with the type attribute set to PDF will be used. If the appropriate platform-specific <Link> is not present, the first <Link> entity of a type that can be displayed on the current platform will be used.


Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]