The component widgets of an X Window application each have two names, a class name that identifies its type (e.g., XmText for the Motif text widget) and an instance name (e.g., command, the name of the IDLDE command input text widget). The class name can be used to set resources for an entire class of widgets (e.g., to make all text widgets have a black background) while the instance name is used for control of individual widgets (e.g., set the IDLDE command input window font without affecting other widgets).
Applications consist of a tree of widgets, each having a class name and an instance name. To specify a resource for a given widget, list the names of the widgets lying between the top widget and the target widget from left to right, separated by periods. In a moderately complicated widget hierarchy, only some of the widgets are of interest; there are intervening widgets that serve uninteresting purposes (such as a base that holds other widgets). A star (*) character can be used as a wildcard to skip such widgets. Another fact to keep in mind is that a given resource specification is interpreted as broadly as possible to apply to any widget matching that description. This allows a very small set of resource specifications to affect a large number of widgets.
There are two resource files used to customize the IDL Development Environment. An installation-wide resource file called Idl is located in
$IDL_DIR/resource/X11/lib/app-defaults
and a user resource file called .idlde is located in your home directory.
Modifying the global Idl resource file effects an installation-wide customization. Changes to the Idl file will be lost with a new installation.
The user resource file, .idlde, customizes individual versions of IDLDE and is divided into two sections. The first section contains user-defined customization resources. You can place comments starting with "!" or "!!" in the first section of .idlde. When newer versions of .idlde are written, system comments are prefixed with "!!!". The second section of .idlde is used to store preferences; it is modified when preferences are saved and shouldn't be modified manually.
If you use IDL in command-line mode rather than via the IDL Development Environment, you can include resources in the .Xresources file located in your home directory.
All IDL resource strings begin with the characters "Idl". For example, the resource
Idl.colors
controls the number of entries of the system shared colormap IDL will use.
Resource strings that apply only to the IDL Development Environment begin with the characters "Idl*idlde". For example, the resource
Idl*idlde*hideCommand
controls whether the IDLDE Command Input Line is visible when IDL starts up.
Resources that include the string "idlde" must be included either in the system-wide Idl resource file, or in a .idlde file in your home directory. Resources that apply to IDL whether it is running in command-line mode or via the IDLDE can be included in either the system-wide Idl resource file or in a .Xresources file in your home directory.
To specify a value for an X resource, append a colon character and the value after the resource string. Whitespace is ignored. For example:
Idl.colors:-10
is the same as
Idl.colors: -10
IDL uses a large number of resources to control the behavior and appearance of the IDL Development Environment and any graphical application written in IDL. To learn more about the specific resources used, or to modify individual values, inspect the installation-wide resource file Idl, located in
$IDL_DIR/resource/X11/lib/app-defaults
| Note |
.idlde file or .Xresources file.
When IDL starts, it attempts to secure entries in the shared system color map for use when drawing graphics. If the entry Idl.colors exists in the Idl resource file, IDL will attempt to allocate the number of colors specified from the shared colormap. If for some reason it cannot allocate the requested number of colors from the shared colormap, IDL will create a private colormap. Using a private colormap ensures that IDL has the number of colormap entries necessary, but can lead to colormap flashing when the cursor or window focus moves between IDL and other applications.
One way to avoid creating a private colormap for IDL is to set the Idl.colors resource equal to a negative number. This causes IDL to try to use the shared colormap, allocating all but the specified number of colors. For example:
Idl.colors: -10
instructs IDL to allocate all but 10 of the currently available colors for its use. Thus, if there are a total of 220 colors not yet reserved by other applications (such as the windowing system), IDL will allocate 210 colors from the shared colormap.
The IDLDE application itself uses between 10-15 colors. On startup, the IDLDE will attempt to use colors in the shared colormap, but will reserve colors for itself if appropriate matching colors in the shared colormap are not found. As a result, running IDL with the IDLDE may use more colors than running IDL with the tty (plain command line) interface.
If you experience colormap flashing when using the IDLDE, but not when you use the plain tty interface, try adjusting the number of colors used by the IDLDE interactively, using the -colors startup flag. For example,
idlde -colors -15
starts the IDLDE and allocates all but 15 of the currently available colors. When you find an appropriate number of colors to reserve, you can set the idlde.colors resource in the Idl resource file or in your personal .idlde file accordingly.