ISETCURRENT

Syntax | Arguments | Keywords | Example | Version History | See Also

The ISETCURRENT procedure sets the current tool in the IDL Intelligent Tools system. This routine is used with the identifier of the tool to make it current in the system. If the identifier is valid, the specified tool becomes current.

When a tool is set as current, the visible display or the focus state of the tool does not change. Only the internal setting of the current tool changes.

Besides using this procedure to set the current tool, a tool is made current when it is created or when it is placed in focus in the current windowing system.

This routine is written in the IDL language. Its source code can be found in the file isetcurrent.pro in the lib/itools subdirectory of the IDL distribution.

Syntax

ISETCURRENT [, iToolID] [, /SHOW]

Arguments

iToolID

The identifier of the existing iTool to be set as current.

Keywords

SHOW

Set this keyword to set iToolID as the current tool, and ensure the tool is visible and has focus. If iToolID is not provided, the current iTool visualization is placed in front and given focus.

Example

In the following example, we create three iPlot iTools and display the ID for each one. At the end, we set the first iTool created as the current iTool.

IPLOT, RANDOMU(seed, 30), IDENTIFIER = iToolID1, $
   COLOR = [0, 0, 255]
currentTool = IGETCURRENT()
PRINT, 'The current tool is ', currentTool

IPLOT, RANDOMU(seed, 30), IDENTIFIER = iToolID2, $
   COLOR = [0, 255, 0]
currentTool = IGETCURRENT()
PRINT, 'The current tool is ', currentTool

IPLOT, RANDOMU(seed, 30), IDENTIFIER = iToolID3, $
   COLOR = [255, 0, 0]
currentTool = IGETCURRENT()
PRINT, 'The current tool is ', currentTool

ISETCURRENT, iToolID1
currentTool = IGETCURRENT()
PRINT, 'The current tool is ', currentTool
PRINT, 'The first tool is ', iToolID1

Version History

6.0

Introduced

7.1

Added the SHOW keyword.
Routine name changed from ITCURRENT to ISETCURRENT.

See Also

IDELETE, IGETCURRENT, IRESET, Controlling iTools from the IDL Command Line (iTool Developer's Guide)