Window Objects
Objects of the IDLgrWindow class represent a rectangular area on a computer screen into which graphics hierarchies can be rendered. Window objects can be either stand-alone windows on the screen or drawable areas in an IDL draw widget.
Creating Window Objects
There are two ways to create window objects: directly via the window object's Init method and indirectly by creating a draw widget that uses a window object as its drawable area.
Using the Init Method
The IDLgrWindow::Init method takes no arguments. Use the following statement to create a window object:
The window is displayed on the screen as soon as it has been created.
Creating a Draw Widget that Uses a Window Object
To create a draw widget that uses an Object Graphics window object rather than a Direct Graphics window for its drawable area, set the GRAPHICS_LEVEL keyword to the WIDGET_DRAW function equal to 2:
Once the draw widget has been realized, you can then retrieve the object reference to the draw widget's window object using the WIDGET_CONTROL procedure:
Color Model
By default, window objects use the RGB color model. To create a window that uses the Indexed color model, set the COLOR_MODEL property of the window object equal to 1 (one) when creating the window:
You cannot change the color model used by a window after it has been created.
See Color in Object Graphicsfor a discussion of the two color models.
Note on Window Size Limits
The OpenGL libraries IDL uses impose limits on the maximum size of a drawable area. The limits are device-dependent — they depend both on your graphics hardware and the setting of the RENDERER property. Currently, the smallest maximum drawable area on any IDL platform is 1280-by-1024 pixels; the limit on your system may be larger.