IGETCURRENT
Syntax | Return Value | Arguments | Keywords | Examples | Version History | See Also
The IGETCURRENT function gets the identifier of (and optionally, an object reference to) the current tool in the IDL Intelligent Tools system.
Note
You can also retrieve the identifier of an iTool by specifying the IDENTIFIER keyword in the call to the routine that creates the tool (for example, IPLOT or IIMAGE).
This routine is written in the IDL language. Its source code can be found in the file igetcurrent.pro in the lib/itools subdirectory of the IDL distribution.
Syntax
Result = IGETCURRENT( [, THUMBBACKGROUND=Value] [, THUMBNAIL=Value] [, /THUMBORDER] [, THUMBSIZE=Value] [, TOOL=Value] )
Return Value
Returns the identifier of the current tool in the iTool system. If no tool exists, an empty string (' ') is returned.
Arguments
None.
Keywords
THUMBBACKGROUND
Set this keyword to the color of the thumbnail background. If set to 1, the color of the lower left pixel of the tool window is used as the background color. If set to an RGB triplet, that color is used. If a value is not specified, a default value of [255,255,255] (white) is used. This keyword is ignored if the THUMBNAIL keyword is not specified.
THUMBNAIL
Set this keyword to a named variable that will contain a thumbnail image of the current tool. The image is returned as a True Color (3xmxm) image.
THUMBORDER
Set this keyword to return the thumbnail in top-to-bottom order rather than the IDL default of bottom-to-top order. This keyword is ignored if the THUMBNAIL keyword is not specified.
THUMBSIZE
Set this keyword to the size of the thumbnail to return. A thumbnail is always returned as a square image. If a value is not supplied, a default value of 32 is used. THUMBSIZE must be greater than 3 and smaller than the smallest dimension of the tool window. This keyword is ignored if the THUMBNAIL keyword is not specified.
TOOL
Set this keyword to a named variable in which to return the object reference to the current tool object, or a null object if no tool exists.
Examples
The process of controlling an iTool from the IDL command line is discussed in detail in Controlling iTools from the IDL Command Line (iTool Developer's Guide).
Example 1
Suppose you have several iPlot tools running in your IDL session, and you want to retrieve the iTool identifier for one of them. Select the iPlot tool using the mouse, and issue the following IDL command:
The idPlot variable will contain the iTool identifier for the selected tool.
Example 2
In the following example, we create a few iPlot tools, and use the retrieved iTool IDs to change their color property.
Version History
| 6.0 |
Introduced |
| 6.1 |
Added TOOL keyword |
| 7.1 |
Added THUMBNAIL, THUMBSIZE, THUMBORDER, and THUMBBACKGROUND keywords. |
See Also
ISETCURRENT, IDELETE, IRESET, Controlling iTools from the IDL Command Line (iTool Developer's Guide)