IDLgrWindow Properties

IDLgrWindow objects have the following properties in addition to properties inherited from any superclasses. Properties with the word “Yes” in the “Get” column of the property table can be retrieved via IDLgrWindow::GetProperty. Properties with the word “Yes” in the “Init” column of the property table can be set via IDLgrWindow::Init. Properties with the word “Yes” in the “Set” column in the property table can be set via IDLgrWindow::SetProperty.

Note: For a discussion of the property description tables shown below, see Modifying Object Property Descriptions.

Objects of this class have the following properties.

ALL

QUALITY

COLOR_MODEL

REGISTER_PROPERTIES

CURRENT_ZOOM

RENDERER

DIMENSIONS

RESOLUTION

DISPLAY_NAME (X Only)

RETAIN

FONT_SCALE

SCREEN_DIMENSIONS
GRAPHICS_TREE TITLE
IMAGE_DATA UNITS
LINE_QUALITY VIEWPORT_DIMENSIONS
LOCATION VIRTUAL_DIMENSIONS
MINIMUM_VIRTUAL_DIMENSIONS VISIBLE_LOCATION
N_COLORS ZBUFFER_DATA
PALETTE ZOOM_BASE

 

ZOOM_NSTEP

 

 

In addition, objects of this class inherit:

ALL

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.

Note: The fields of this structure may change in subsequent releases of IDL.

Property Type

Structure

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

COLOR_MODEL

An integer value or enumerated list item that determines the color model for the window:

Value

Property Sheet Value

Description

0

RGB

RGB (default)

1

Indexed

Color indexed

Note: For some X11 display situations, IDL may not be able to support a color index model destination object in object graphics. We do, however, guarantee that an RGB color model destination will be available for all display situations.

Property Type

ENUMLIST

Name String

Color model

Get: Yes

Set: No

Init: Yes

Registered: Yes

CURRENT_ZOOM

A double-precision floating-point value that represents the current zoom factor associated with this window.

Property Type

FLOAT

Name String

Zoom factor

Get: Yes

Set: No

Init: No

Registered: Yes

DIMENSIONS

A two-element integer 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 values of the IDL_GR_WIN_HEIGHT and IDL_GR_WIN_WIDTH preferences (under Microsoft Windows) or the values of the IDL_GR_X_HEIGHT and IDL_GR_X_WIDTH preferences (under UNIX). There are limits on the maximum size of an IDLgrWindow object; see Note on Window Size Limits for details.

Note: Changing the DIMENSIONS property is merely a request to the windowing system and may be ignored.

This property is registered as a user-defined property, but it is hidden by default.

Property Type

USERDEF

Name String

Dimensions

Get: Yes

Set: Yes

Init: Yes

Registered: Yes

DISPLAY_NAME (X Only)

A string that specifies the name of the X Windows display on which the window is to appear.

Property Type

STRING

Name String

Display name

Get: Yes

Set: Yes

Init: No

Registered: Yes

FONT_SCALE

A scalar value specifying the relative size of the text. The default value is 1.0. All text drawn to the device is rescaled by its value. Setting FONT_SCALE to 2.0 draws the font twice as large as the default; 0.5 half as large.

Property Type

FONT_SCALE

Name String

not displayed

Get: Yes

Set: Yes

Init: Yes

Registered: No

GRAPHICS_TREE

An object reference of type IDLgrScene, IDLgrViewgroup, or IDLgrView describing the graphics tree of this window object. 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.

Property Type

Object reference

Name String

not displayed

Get: Yes

Set: Yes

Init: Yes

Registered: No

IMAGE_DATA

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.

Property Type

Byte array

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

LINE_QUALITY

An integer value indicating the rendering quality of lines with a thickness greater than one pixel.

Valid values are:

Value Description
0 Low quality - this setting will result in faster performance, but it may introduce minor defects in the lines.
1 (default) High quality - this setting produces lines with clean joins at corners and intersections, but it may result in slower performance.

LOCATION

A two-element floating-point 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. The default value for the LOCATION property is [0,0].

About Multi-Monitor Configurations and LOCATION

If explicit window dimensions are not specified and the IDL_GR_WIN_QSCREEN or IDL_GR_X_QSCREEN preference is set to true, IDL will use the size of the monitor on which the window will be created to calculate the dimensions of a window 1/4 the screen size. In multi-monitor configurations, if a window’s LOCATION property does not specify a value that is on any monitor, IDL uses the size of the monitor containing the location [0,0] for the 1/4 screen calculation. Additionally, some window managers and desktop systems may override application-specified window locations. Therefore, a window may not always be positioned at the location specified by the LOCATION property.

This property is registered as a user-defined property, but it is hidden by default.

Property Type

USERDEF

Name String

Location

Get: Yes

Set: Yes

Init: Yes

Registered: Yes

MINIMUM_VIRTUAL_DIMENSIONS

A two-element vector, [width, height], specifying the minimum dimensions allowed for the virtual canvas of this window. The unit of measure is specified by the UNITS property. In a scrolling window, the virtual canvas represents the full canvas, of which only a smaller visible portion is displayed at any given time. The default value of this property is [0, 0], a value indicating that the minimum virtual dimensions should match the current virtual dimensions.

Property Type

Vector

Name String

not displayed

Get: Yes

Set: Yes

Init:Yes

Registered: No

N_COLORS

An integer value that specifies the number of colors (between 2 and 256) to be used if COLOR_MODEL is set to Indexed (1). This property is ignored if COLOR_MODEL is set to RGB (0).

Note: 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. The actual number of available colors depends on your system and also on how you have used IDL.

Property Type

Integer

Name String

Number of colors

Get: Yes

Set: No

Init: Yes

Registered: Yes

PALETTE

An object reference to 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.

Note: Objects specified via this property are not automatically cleaned up when the IDLgrWindow object is destroyed.

This property is registered as a user-defined property, but it is hidden by default.

Property Type

USERDEF

Name String

Color palette

Get: Yes

Set: Yes

Init: Yes

Registered: Yes

QUALITY

An integer value or enumerated list item indicating the rendering quality with which graphics are to be drawn to this destination. Valid values are:

Value

Property Sheet Value

Description

0

Low

Low quality

1

Medium

Medium quality

2

High

High quality (the default)

 

Property Type

ENUMLIST

Name String

Draw quality

Get: Yes

Set: Yes

Init: Yes

Registered: Yes

REGISTER_PROPERTIES

A Boolean value that determines whether to register properties available for this object. If this property is set, all properties marked in this properties section as “Registered: Yes” will be registered for display in a property sheet. This property is useful mainly when creating iTools. By default, no properties are registered.

Property Type

Boolean

Name String

not displayed

Get: No

Set: No

Init: Yes

Registered: No

RENDERER

An integer value or enumerated list item indicating which graphics renderer to use when drawing objects within the window. Valid values are:

Value

Property Sheet Value

Description

0

OpenGL

Uses platform native OpenGL

1

Software

Uses IDL’s software implementation

By default, IDL uses the renderer specified by the IDL_GR_WIN_RENDERER (Windows) or IDL_GR_X_RENDERER (UNIX) preference. If your platform does not have a native OpenGL implementation, IDL uses its own software implementation regardless of the value of this property. Your choice of renderer may also affect the maximum size of an IDLgrWindow object; see Note on Window Size Limits for details.

Property Type

ENUMLIST

Name String

Renderer

Get: Yes

Set: No

Init: Yes

Registered: Yes

RESOLUTION

A floating-point vector of the form [xres, yres] reporting the pixel resolution, measured in centimeters per pixel. This value is stored in double precision.

Property Type

FLOAT

Name String

Resolution

Get: Yes

Set: No

Init: No

Registered: Yes

RETAIN

An integer value that specifies 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 Workbench’s Preferences dialog. If there is no preference file for the Workbench (that is, if you always use IDL in plain tty mode), the RETAIN property is set equal to 0 by default.

Value

Property Sheet Value

Description

0

No backing

No backing store.

1

Server/Window

The server or window system is requested to provide the backing store.

Note: Requesting backing store from the server is only a request; backing store may not be provided in all situations

2

IDL

Requests that IDL provide the backing store directly. In some situations, IDL can not provide this backing store in Object Graphics. To see if IDL provided backing store, query the RETAIN property of IDLgrWindow::GetProperty. IDL may also alter the RENDERER property while attempting to provide backing store.

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.

Note: On Mac and Microsoft Windows systems, if you are using software rendering (that is, the RENDERER property is set equal to one), IDL will refresh the window automatically regardless of the setting of the RETAIN property.

Property Type

ENUMLIST

Name String

Retain

Get: Yes

Set: No

Init: Yes

Registered: Yes

SCREEN_DIMENSIONS

A two-element floating-point vector of the form [width, height] specifying the dimensions of the overall screen dimensions for the screen with which this window is associated. The screen dimensions are measured in device units.

Note: The maximum screen dimension size depends on the graphics device.

On multi-monitor configurations, this SCREEN_DIMENSIONS returns information for the primary monitor only. For information about other monitors, use the IDLsysMonitorInfo object.

Property Type

Floating-point vector

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

TITLE

A string that represents the title of the window.

Property Type

STRING

Name String

Title

Get: Yes

Set: Yes

Init: Yes

Registered: Yes

UNITS

An integer value or enumerated list item that specifies the units of measure for the LOCATION and DIMENSIONS properties. Valid values are:

Value

Property Sheet Value

Description

0

Device

Device units (the default)

1

Inches

Inches

2

Centimeters

Centimeters

3

Normalization

Normalized units (relative to the dimensions of the primary monitor/screen, as stored in the SCREEN_DIMENSIONS property)

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.

Property Type

ENUMLIST

Name String

Units

Get: Yes

Set: Yes

Init: Yes

Registered: Yes

VIEWPORT_DIMENSIONS

A two-element floating-point vector of the form [width, height] specifying the dimensions of the viewport of the draw widget that contains this window. If the window is not within a draw widget, this property is equivalent to the DIMENSIONS property.

Property Type

Floating-point vector

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

VIRTUAL_DIMENSIONS

A two-element integer vector, [width, height], specifying the dimensions of the virtual canvas for this window. In a scrolling window, the virtual canvas represents the full canvas, of which only a smaller visible portion is displayed at any given time. The default is [0,0], indicating that the virtual canvas dimensions should match the visible dimensions (as specified via the DIMENSIONS property).

Note: When a drawable window is created using the WIDGET_DRAW function with the GRAPHICS_LEVEL keyword set equal to 2, the width and height values are initialized using the values of the X_SCROLL_SIZE and Y_SCROLL_SIZE keywords to WIDGET_DRAW.

This property is registered as a user-defined property, but it is hidden by default.

Property Type

USERDEF

Name String

Virtual dimensions

Get: Yes

Set: Yes

Init: Yes

Registered: Yes

VISIBLE_LOCATION

A two-element integer vector, [x,y], specifying the lower left location of the visible portion of the canvas (relative to the virtual canvas). In a scrolling window, the virtual canvas represents the full canvas, of which only a smaller visible portion is displayed at any given time.

This property is registered as a user-defined property, but it is hidden by default.

Property Type

USERDEF

Name String

Visible location

Get: Yes

Set: Yes

Init: Yes

Registered: Yes

ZBUFFER_DATA

A floating-point array representing the zbuffer that is currently within the buffer. The returned array will have dimensions (xdim, ydim).

Property Type

Floating-point array

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

ZOOM_BASE

A double-precision floating-point value representing the base value by which the window’s current zoom factor will be multiplied or divided for zooming in or zooming out. Allowable values are those greater than 1.0. The default is 2.0.

Property Type

Float

Name String

not displayed

Get: Yes

Set: Yes

Init:Yes

Registered: No

ZOOM_NSTEP

A named variable that, upon return, will contain an integer that indicates the number of times this window’s ZOOM_BASE property has been applied to achieve the current zoom factor. A positive value indicates that the current zoom factor represents the result of zooming in ZOOM_NSTEP times. A negative value indicates that the current zoom factor represents the result of zooming out ZOOM_NSTEP times.

Property Type

Integer

Name String

not displayed

Get: Yes

Set: No

Init:No

Registered: No