Adding an iTool Window

An iTool drawable area, or window, is created using the CW_ITWINDOW compound widget. The iTool window can display iTool visualizations and atomic IDL graphics objects, provides a mechanism for the display of the iTools property sheet interface, and makes it easy to perform tasks including translation, rotation, and scaling of visualizations using standard iTool manipulators. The signature of the CW_ITWINDOW function is:

Result = CW_ITWINDOW(Parent, UI [, KEYWORDS] )

where:

Window Sizing Keywords

Two properties of the iTool window are worth understanding. The DIMENSIONS keyword specifies the visible area of the window in pixels as a two-element array [width, height]. The VIRTUAL_DIMENSIONS keyword specifies the total size of the drawing area in pixels as a two-element array [width, height]. These two keywords replace the XSIZE/YSIZE and SCR_XSIZE/SCR_YSIZE keywords to the standard IDL draw widget. The X_SCROLL_SIZE/Y_SCROLL_SIZE keywords are likewise unnecessary and ignored; the iTool window automatically handles the addition of scrollbars when necessary.

Modifying Window Contents

The contents of an iTool window can be modified interactively by the user in numerous ways:

These methods are standard to all iTools, and are discussed in the iTool User's Guide. The contents of the iTool window can also be manipulated programmatically from "outside" the iTool framework in various ways:

These programmatic methods for modifying the contents of an existing iTool are discussed in Controlling iTools from the IDL Command Line.

Resizing iTool Windows

The CW_ITWINDOW compound widget defines a separate procedure, CW_ITWINDOW_RESIZE, that accepts as arguments the new width and height of the iTool window. This procedure handles all calculations necessary to properly resize the window, taking into account the current zoom factors and the presence or absence of scroll bars. See CW_ITWINDOW for complete details.