A window object is a representation of an on-screen area on a display device that serves as a graphics destination.
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 x 1024 pixels; the limit on your system may be larger.
This class has the following methods:
The IDLgrWindow:: Cleanup procedure method performs all cleanup on the object. IDLgrWindow is described above.
NOTE: Cleanup methods are special lifecycle methods , and as such cannot be called outside the context of object destruction. This means that in most cases, you cannot call the Cleanup method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Cleanup method from within the Cleanup method of the subclass.
The IDLgrWindow:: Draw procedure method draws the specified scene or view object to this graphics destination. IDLgrWindow is described above.
The view (an instance of an IDLgrView object), viewgroup (an instance of an IDLgrViewgroup object), or scene (an instance of an IDLgrScene object) to be drawn.
Set this keyword equal to one specify that this scene or view is the unchanging part of a drawing. Some destinations can make an instance from the current window contents without having to perform a complete redraw. If the view or scene to be drawn is identical to the previously dawn view or scene, this keyword can be set equal to 2 to hint the destination to create the instance from the current window contents if it can.
The IDLgrWindow:: Erase procedure method erases the entire contents of the window. IDLgrWindow is described above.
The IDLgrWindow:: GetContiguousPixels function method returns an array of long integers whose length is equal to the number of colors available in the index color mode (that is, the value of the N_COLORS property).
The returned array marks contiguous pixels with the ranking of the range's size. This means that within the array, the elements in the largest available range are set to zero, the elements in the second-largest range are set to one, etc. Use this range to set an appropriate colormap for use with the SHADE_RANGE property of the IDLgrSurface and IDLgrPolygon object classes.
To get the largest contiguous range, you could use the following IDL command:
result = obj -> GetContiguousPixels()
A contiguous region in the colormap can be increasing or decreasing in values. The following would be considered contiguous:
IDLgrWindow is described above.
The IDLgrWindow:: GetProperty procedure method retrieves the value of a property or group of properties for the window. IDLgrWindow is described above.
Any keyword to IDLgrWindow::Init
Set this keyword to a named variable that will contain an anonymous structure containing the values of all of the properties associated with the state of this object. State information about the object includes things like color, range, tick direction, etc., but not image, vertex, or connectivity data, or user values.
Set this keyword to a named variable that will contain a byte array representing the image that is currently displayed in the window. If the window object uses an RGB color model, the returned array will have dimensions (3, winXSize , winYSize ), or (4, winXSize , winYSize ) if an alpha channel is included. If the window object uses an Indexed color model, the returned array will have dimensions ( winXSize , winYSize ). See IDLgrWindow::Read for more information.
The IDLgrWindow:: GetTextDimensions function method retrieves the dimensions of a text object that will be rendered in the window. The result is a 3-element floating-point vector [ xDim , yDim , zDim ] representing the dimensions of the text object, measured in data units. IDLgrWindow is described above.
Set this keyword equal to a named variable that will contain an array of floating- point values (one for each string in the IDLgrText object). The values are the distance to travel (parallel to the UPDIR direction) from the baseline to reach the bottom of all the descenders for the string; the values will be negative or 0. This keyword is only valid if TextObj is of the class IDLgrText.
The IDLgrWindow:: Iconify procedure method iconifies or de-iconifies the window. IDLgrWindow is described above.
NOTE: Iconification under window systems is solely handled by the window manager; client applications, such as IDL, do not have the capability to manage icons. The Iconify method provides a hint to the window manager, which applies the information as it sees fit. (On the Macintosh, for example, iconfication is not a standard option; the Iconify method is ignored on the Mac.)
The IDLgrWindow:: Init function method initializes the window object. IDLgrWindow is described above.
NOTE: Init methods are special lifecycle methods , and as such cannot be called outside the context of object creation. This means that in most cases, you cannot call the Init method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Init method from within the Init method of the subclass.
Properties retrievable via IDLgrWindow::GetProperty
Set this keyword to a two-element vector of the form [ width , height ] to specify the dimensions of the window in units specified by the UNITS property. By default, if no value is specified for DIMENSIONS, IDL uses the value of the "Default Window Width" and "Default Window Height" preferences set in the IDL Development Environment's (IDLDE) Preferences dialog. If there is no preference file for the IDLDE, the DIMENSIONS property is set equal to one quarter of the screen size. There are limits on the maximum size of an IDLgrWindow object; see Note on Window Size Limits for details.
Set this keyword to the name of the X Windows display on which the window is to appear.
Set this keyword to an object reference of type IDLgrScene, IDLgrViewgroup, or IDLgrView. If this property is set to a valid object reference, calling the Draw method on the destination object with no arguments will cause the object reference associated with this property to be drawn. If this object is valid and the destination object is destroyed, this object reference will be destroyed as well. By default the GRAPHICS_TREE property is set equal to the null-object.
Set this keyword to a two-element vector of the form [ x , y ] to specify the location of the upper lefthand corner of the window relative to the display screen, in units specified by the UNITS property. By default, the window is positioned at one of four quadrants on the display screen, and the location is measured in device units.
Set this keyword to the number of colors (between 2 and 256) to be used if COLOR_MODEL is set to Indexed (1). This keyword is ignored if COLOR_MODEL is set to RGB (0).
CAUTION: If COLOR_MODEL is set to Color Index (1), setting N_COLORS is treated as a request to your operating system. You should always check the actual number of available colors for any Color Indexed destination with the IDLgrWindow::GetProperty method (on page IDLgrWindow::GetProperty ). The actual number of available colors depends on your system and also on how you have used IDL.
Set this keyword to the object reference of a palette object (an instance of the IDLgrPalette object class) to specify the red, green, and blue values that are to be loaded into the graphics destination's color lookup table, applicable if the Indexed color model is used.
Set this keyword to an integer indicating the rendering quality at which graphics are to be drawn to this destination. Valid values are:
Set this keyword to an integer value indicating which graphics renderer to use when drawing objects within the window. Valid values are:
By default, your platform's native OpenGL implementation is used. If your platform does not have a native OpenGL implementation, IDL's software implementation is used regardless of the value of this property. See for details. Your choice of renderer may also affect the maximum size of an IDLgrWindow object; see Note on Window Size Limits for details.
Set this keyword to 0, 1, or 2 to specify how backing store should be handled for the window. By default, if no value is specified for RETAIN, IDL uses the value of the "Backing Store" preference set in the IDL Development Environment's (IDLDE) Preferences dialog. If there is no preference file for the IDLDE (that is, if you always use IDL in plain tty mode), the RETAIN property is set equal to 0 by default.
In IDL Object Graphics, it is almost always best to disable backing store (that is, set the RETAIN property equal to zero). This is because drawing to an off-screen pixmap (which is what happens when backing store is enabled) almost always bypasses any hardware graphics acceleration that may be available, causing all rendering to be done in software. To ensure that windows are redrawn properly, enable the generation of expose events on the WIDGET_DRAW window and redraw the window explicitly when an expose event is received.
Set this keyword to indicate the units of measure for the LOCATION and DIMENSIONS properties. Valid values are:
NOTE: If you set the value of the UNITS property (using the SetProperty method) without also setting the value of the LOCATION and DIMENSIONS properties, IDL will convert the current size and location values into the new units.
Set this keyword to a value of any type. You can use this "user value" to contain any information you wish. Remember that if you set the user value equal to a pointer or object reference, you should destroy the pointer or object reference explicitly when destroying the object it is a user value of.
The IDLgrWindow:: Pickdata function method maps a point in the two-dimensional device space of the window to a point in the three-dimensional data space of an object tree. The resulting 3D data space coordinates are returned in a user-specified variable. The Pickdata function returns one if the specified location in the window's device space "hits" a graphic object, or zero if no object was "hit". Pickdata returns -1 if the point selected falls outside of the specified view or window. IDLgrWindow is described above.
The object reference of a model or atomic graphic object from which the data space coordinates are being requested.
A two-element vector [ x , y ] specifying the location in the window's device space of the point to pick data from.
A named variable that will contain the three-dimensional data space coordinates of the picked point. Note that the value returned in this variable is a location, not a data value.
NOTE: If the atomic graphic object specified as the target has been transformed using either the LOCATION or DIMENSIONS properties (this is only possible with IDLgrAxis, IDLgrImage, and IDLgrText objects), these transformations will not be included in the data coordinates returned by the Pickdata function. This means that you may need to re-apply the transformation accomplished by specifying LOCATION or DIMENSIONS once you have retrieved the data coordinates with Pickdata. This situation does not occur if you transform the axis, text, or image object using the [XYZ]COORD_CONV properties.
The IDLgrWindow:: Read function method reads an image from a window. The returned value is an instance of the IDLgrImage object class. IDLgrWindow is described above.
The IDLgrWindow:: Select function method returns a list of objects selected at a specified location. If no objects are selected, the Select function returns -1. IDLgrWindow is described above.
The view or scene (an instance of the IDLgrView , IDLgrViewgroup, or IDLgrScene class) whose children are among the candidates for selection.
If the first argument is a scene, then the returned object list will contain one or more views. If the first argument is a view, the list will contain atomic graphic objects (or model objects which have their SELECT_TARGET property set). Objects are returned in order, according to their distance from the viewer. The closer an object is to the viewer, the lower its index in the returned object list. If multiple objects are at the same distance from the viewer (views in a scene or 2D geometry), the last object drawn will appear at a lower index in the list.
Set this keyword to a two-element array [ w , h ] to specify that the selection box will have a width w and a height h , and will be centered about the coordinates [ x , y ] specified in the XY argument. The box occupies the rectangle defined by:
(x-(w/2), y-(h/2)) - (x+(w/1), y+(h/2))
Any object which intersects this box is considered to be selected. By default, the selection box is 3 pixels by 3 pixels.
The IDLgrWindow:: SetCurrentCursor procedure method sets the current cursor image to be used while positioned over a drawing area. IDLgrWindow is described above.
Set this keyword to a 16x16 column bitmap, contained in a 16-element short integer vector, specifying the cursor pattern. The offset from the upper-left pixel to the point that is considered the `hot spot' can be provided via the HOTSPOT keyword.
When the IMAGE keyword is set, the MASK keyword can be used to simultaneously specify the mask that should be used. In the mask, bits that are set indicate bits in the IMAGE that should be seen and bits that are not are "masked" out".
Set this keyword to a two-element vector specifying the [ x , y ] pixel offset of the cursor "hot spot", the point which is considered to be the mouse position, from the upper left corner of the cursor image. This parameter is only applicable if IMAGE is provided. The cursor image is displayed top-down (the first row is displayed at the top).
The IDLgrWindow:: SetProperty procedure method sets the value of a property or group of properties for the window. IDLgrWindow is described above.
Any keyword to IDLgrWindow::Init
The IDLgrWindow:: Show procedure method exposes or hides a window. IDLgrWindow is described above.