Last modified: December 2013

URL: https://cxc.cfa.harvard.edu/chips/ahelp/get_window.html
AHELP for CIAO 4.11 ChIPS v1

get_window

Context: windows

Synopsis

Retrieves the attribute value(s) of the window.

Syntax

get_window()
get_window(id)
get_window(id, attribute)

Description

The function arguments.

Argument Description
id A ChipsId structure identifying the item, or a string containing the name of the object.
attribute The name of the attribute to retrieve, such as 'display' or 'bgcolor'.

The get_window command returns a structure containing all the attribute values of the window. To retrieve the value of a specific attribute, provide the attribute name and the id or ChipsId of the object.

Some values are set to "None" in the returned structure. These entries generally correspond to attributes which may only be modified at creation time, such as the object id.

Please see the section "Window Preferences and Attributes" below the examples for a list of the window attributes.

Note that the window title is not included in the attributes. In order to get that value, use the get_window_title command.

Advanced Functions

The module of advanced ChIPS functions contains other commands for retrieving attribute values (refer to "ahelp chips" for information on loading the module):

get_window_bgcolor
get_window_redraw

Examples

Example 1

chips> add_window()
chips> print(get_window())

A window is created and becomes current. Calling get_window with no argument returns all the attributes of the object.

Example 2

chips> get_window("win1", "bgcolor")

get_window is called to return the "bgcolor" attribute of win1.

Example 3

chips> add_window()
chips> add_window( "id=M33")
chips> id = ChipsId()
chips> id.window = "win1"
chips> print(get_window(id))

A ChipsId structure is created and the id.window field is set to "win1". get_window is called with the ChipsId.

Example 4

chips> wi = get_window()
chips> print(wi)

Retrieve a structure containing the attribute values of the current window and store the results in "wi".


Window Preferences and Attributes

The attributes associated with windows are given in the following table, where the "Set?" column refers to whether the attribute can be changed using the set_window() command. To change the window preference settings prepend "window." to the attribute name.

Attribute Description Options Default Set?
bgcolor Background Color of the window name or hex; see the Color section of "ahelp chipsopt" default: white in the ChIPS window, black on printout Yes
display Flag indicating whether the window should be rendered see the Booleans section of "ahelp chipsopt" true Yes
geom A geometry hint to the window manager to say where the ChIPS window should be created (this setting may be ignored, depending on the window manager in use). The format is either a blank string or a string containing two signed integers such as "+100+50", "+0+20", or "+0+0". No
grid.color The color to draw the grid lines. name or hex; see the Color section of "ahelp chipsopt" default No
grid.scale Where should the grid lines be drawn? One of quarterinch, halfinch, cm, or normalized (spacing of a tenth of the window width/height). These can also be specified as default (for quarterinch) or the enumerations 0, 1, 2, 3, 4 for default, quarterinch, halfinch, cm, normalized respectively. quarterinch No
grid.style The style used to draw the grid lines. see the Line Style section of "ahelp chipsopt" longdash No
grid.thickness The thickness used to draw the grid lines. 0.5 to 10.0; see the Thickness section of "ahelp chipsopt" 1 No
grid.visible Should the grid be visible or not. see the Booleans section of "ahelp chipsopt" false No
height window height Numerical value expressed in either inches, centimeters, millimeters or pixels 360 pixels No
scaleheight factor to scale window to display at approximate height positive floating point value 1.25 No
scalewidth factor to scale window to display at approximate width positive floating point value 1.25 No
smoothing use VTK's smoothing to reduce anti-aliasing see the Booleans section of "ahelp chipsopt" true No
stem Stem used for window id An alpha-numeric character sequence that does not contain a space win No
prefix Prefix added to window id to create the text that the window manager may use to label the ChIPS window. "chips - " No
units Units of the window width and height dimensions inches|cm|mm|pixels pixels No
width window width Numerical value expressed in either inches, centimeters, millimeters or pixels 360 pixels No

Bugs

See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

concepts
setget
utilities
clear, set_current
windows
add_window, current_window, deiconify_window, delete_window, iconify_window, print_window, set_window