Compaq DECwindows Motif
for OpenVMS
Release Notes


Previous Contents Index

2.1.1.2.3 Building the Color Customizer on OpenVMS Systems

To build the color customizer on OpenVMS systems, perform the following steps:

  1. Copy the files to a private directory. For example:


    $ SET DEFAULT SYS$LOGIN
    $ CREATE/DIRECTORY [.CUSTOMIZER]
    $ SET DEFAULT [.CUSTOMIZER]
    $ COPY DECW$EXAMPLES:CUSTOM.C []
    $ COPY DECW$EXAMPLES:CUSTOM.UIL []
    $ COPY DECW$EXAMPLES:CUSTOMIMAGE.DAT []
    $ COPY DECW$EXAMPLES:XSETROOT_CUST.C []
    $ COPY DECW$EXAMPLES:BUILD_CUSTOMIZER.COM []
    

  2. Build the customizer using the following command:


    $ @BUILD_CUSTOMIZER.COM
    

This command procedure creates the following output files:

2.1.1.2.4 Running the Color Customizer

To run the color customizer, perform the following steps:

  1. Copy the files CUSTOM.UID and CUSTOM.EXE, which were created during the customizer build, to the directory where the customizer will be run. A typical location is the directory SYS$LOGIN or the directory DECW$USER_DEFAULTS.
  2. Copy the files CUSTOM.DAT and DXMDEFAULTS.DAT from the directory DECW$EXAMPLES to the same location as you copied the files in step 1. The same typical locations apply.
  3. Run the executable file CUSTOM.EXE as follows:


    $ RUN CUSTOM
    

Note

Only the colors of applications invoked after the customizer starts will be affected. For this reason, start the customizer as the first X application during the login process.

2.1.1.2.5 Modifying the DECW$LOGIN.COM File

As noted in Section 2.1.1.2.4, the color customizer should be the first X application started during the login process. Do this by starting it as a subprocess from within the DECW$LOGIN.COM file. Add a command to wait approximately 10 seconds between customizer startup and the startup of other applications.

For example, add the following lines to the DECW$LOGIN.COM file:


$! Starting the color customizer 
$ DISPLAY = F$LOGICAL("DECW$DISPLAY") 
$ SPAWN/NOWAIT/OUTPUT='DISPLAY' RUN SYS$LOGIN:CUSTOM.EXE 
$ WAIT 0:0:10 

See Using DECwindows Motif for OpenVMS and Managing DECwindows Motif for OpenVMS Systems for more information on the file DECW$LOGIN.COM.

2.1.1.2.6 Command Interface Summary

A box containing a list of available palettes is in the leftmost section of the Color Customizer window. Click on the desired palette to see the colors take affect.

Below the palettes are two arrays of colored buttons, representing the dynamically allocated color cells for normal and shadow colors. To find out what resources are affected by a color cell, click and hold the arrow button next to the color cell.

Hint

As a shortcut, you can click on the screen facsimile in the rightmost corner of the dialog box. If the portion you click on is colored by one of the resource values controlled by the customizer, the pop-up window for the appropriate color button is displayed.

To modify a single color cell, click on the corresponding color button. A colormix widget pops up; as you modify the color, these modifications are reflected in your workstation environment. Use the colormix widget reset button to return to the starting color at any time. You can also change the color cell you are modifying by clicking on a different color button while the colormix widget is displayed.

The automatic shadowing option causes shadow and select colors to be automatically updated when their corresponding background colors are changed. The standard Motif shadowing algorithms are used for these calculations.

Use the File menu to modify, add, and delete color palettes as follows:

Changes made through the File menu automatically update the CUSTOM.DAT file, which contains the resource defaults.

The File menu Exit button causes the customizer application to exit. A warning dialog is displayed first. Note that the color cells allocated by the customizer (and used by the currently running applications) will be deallocated. After the customizer exits, if the colors of the currently running applications are not correct, the applications should be restarted to restore normal colors. Usually, there is no need to exit the color customizer; it is typically kept running at all times, like the Session Manager.

2.1.1.2.7 Changing the Mapping Between Color Resources and Color Cells

The file DXMDEFAULTS.DAT allows you to control how many dynamic color cells are allocated and what resources are affected. This file contains resource specifications like the following:


*background:       DXmDynamicWindowBackground 
*foreground:       DXmDynamicWindowForeground 
*topShadowColor:   DXmDynamicWindowTopShadow 

When the customizer is started, the file DXMDEFAULTS.DAT is written to a property on the root window. Any application that is subsequently run and that uses the correct X Toolkit Library merges these resources with its normal resource database. Resource specifications in this file take precedence over specifications with equivalent resource names in other resource default files.

The resource values within the file DXMDEFAULTS.DAT have a special format. For each unique color value in this file that begins with the string "DXmDynamic", a color button is created in the color customizer. If the string "Shadow" is encountered in a name, the color button is placed in the shadow button box rather than the normal color button box. If a color value string ends with the suffix "Background", it is linked to any color buttons with identical prefixes and suffixes of "TopShadow", "BottomShadow", or "SelectColor" for purposes of automatic shadowing. If a color value named "DXmDynamicScreenBackground" is encountered, the color cell allocated is used by the customizer to set the root window background color.

You can edit the file DXMDEFAULTS.DAT and define resources to use the same color cells. You can have separate dynamic color cells, for scrollbar widgets or for your DECwindows Mail application, for example, by adding the following lines to the file DXMDEFAULTS.DAT:


Mail*background:         DXmDynamicMyMailBackground 
Mail*foreground:         DXmDynamicMyMailForeground 
Mail*topShadowColor:     DXmDynamicMyMailTopShadow 
Mail*bottomShadowColor:  DXmDynamicMyMailBottomShadow 

Adding the previous lines to the file DXMDEFAULTS.DAT and restarting the customizer causes four new color cells to be allocated and four new color buttons to be added to the customizer interface. These buttons are assigned default color values (usually black or white) for each palette. These defaults can then be modified for each palette through the customizer interface.

Note

The text of the DXMDEFAULTS.DAT file is read and parsed by the color customizer. The parsing algorithm does not allow comments, incorrect spacing, or incorrect resource specifications. If this file or the CUSTOM.DAT resource file become corrupt, the customizer cannot start correctly. To resolve the problem, copy the versions of CUSTOM.DAT and DXMDEFAULTS.DAT from the DECW$EXAMPLES directory into your login directory.

2.1.1.2.8 DECterm Windows Not Affected

The color customizer does not affect the colors of DECterm windows. To change the colors of DECterm windows, copy the DECterm resource specifications from the file DXMDEFAULTS.DAT and add them to the DECterm resource defaults file DECW$USER_DEFAULTS:DECW$TERMINAL_DEFAULT.DAT. For example, add the following lines to the DECterm resource defaults file:


   .
   .
   .
  DECW$TERMINAL.main.terminal.background: DXmDynamicTerminalBackground 
  DECW$TERMINAL.main.terminal.foreground: DXmDynamicTerminalForeground 

This allows the DECterm window colors to be customized with the color customizer.

2.1.1.2.9 Changing the Default Value of the Automatic Shadowing Toggle Button

The default value of the automatic shadowing toggle button is set using the Custom.autoShadow resource in the CUSTOM.DAT file as follows:


Custom.autoShadowing: False 

The default value is True.

2.1.1.2.10 Using the Customizer on Multihead Systems

The color customizer affects only applications started on the same screen as the customizer. On multihead systems, you can start a different color customizer for each screen and have a different palette in effect on each screen.

The color customizer can be configured so that it is invoked once and affects all applications regardless of where they are started. This mode is invoked by modifying the Custom.multiScreen resource in the CUSTOM.DAT file as follows:


Custom.multiScreen: True                                                     
 

The default value is False.

2.1.1.2.11 Using the XSETROOT_CUST.EXE Demonstration Program

The XSETROOT_CUST.EXE demonstration program, created during the customizer build, is a modified version of the MIT utility program xsetroot that is used to set a bitmap on the root window. The XSETROOT_CUST.EXE program uses DXmDynamicScreenBackground and DXmDynamicScreenForeground as the background and foreground colors of the specified bitmap. If your DXMDEFAULTS.DAT file contains entries for these two dynamic colors, then use the customizer to dynamically modify the colors of your bitmap.

For example:


$ XSETROOT_CUST :== "$SYS$LOGIN:XSETROOT_CUST.EXE"
$ XSETROOT_CUST -BITMAP your_xbm_file.XBM

2.1.1.3 Window Dump to Print File (xpr) Utility

V1.2

The Window Dump to Print File utility prints an X Window dump using the xpr program.

The xpr program receives as input a window dump file produced by the Window Dump utility (xwd) and formats it for output on the following printers:

To use the xpr program, define xpr as a user-defined command:


$ xpr == "$DECW$UTILS:XPR" 

You must specify an input file. The xpr program prints the largest possible representation of the window on the output page. Options allow the user to add headers and trailers, specify margins, adjust the scale and orientation, and append multiple window dumps to a single output file.

Use the following command format:


$ xpr input_file [options...] 

Options include:


    -append filename  -noff  -output filename
    -compact 
    -device {ln03 | la100 | ps | lw | pp | ljet | pjet | pjetxl} 
    -dump 
    -gamma correction
    -gray {2 | 3 | 4} 
    -height inches  -width inches
    -header string  -trailer string
    -landscape  -portrait 
    -left inches  -top inches
    -noposition 
    -nosixopt 
    -plane n
    -psfig 
    -render type
    -report 
    -rv 
    -scale scale
    -slide 
    -split n-pages

Table 2-2 defines the available options.

Table 2-2 Window Dump to Print File Options
Option Description
-device devtype Specifies the device on which the file is printed.

Currently supported devices:
la100 DIGITAL LA100.
ln03 DIGITAL LN03.
ljet HP LaserJet series and other monochrome PCL devices such as ThinkJet, QuietJet, RuggedWriter, HP series, and HP-series printers.
pjet HP PaintJet (color mode).
pjetxl HP PaintJet XL Color Graphics Printer (color mode).
pp IBM PP3812.
ps PostScript printer.
lw LaserWriter is equivalent to -device ps and is provided only for backwards compatibility.

The default is PostScript.

-scale scale Affects the size of the window on the page. The PostScript, LN03, and HP printers can translate each bit in a window pixel map into a grid of a specified size. For example, each bit might translate into a 3x3 grid. This would be specified by -scale 3. By default, a window is printed with the largest scale that will fit onto the page for the specified orientation.
-height inches Specifies the maximum height of the page.
-width inches Specifies the maximum width of the page.
-left inches Specifies the left margin in inches. Fractions are allowed. By default the window is centered in the page.
-top inches Specifies the top margin for the picture in inches. Fractions are allowed.
-header string Specifies a header string to be printed above the window.
-trailer string Specifies a trailer string to be printed below the window.
-landscape Forces the window to be printed in landscape mode. By default, a window is printed so that its longest side follows the long side of the paper.
-portrait Forces the window to be printed in portrait mode. By default a window is printed so that its longest side follows the long side of the paper.
-plane number Specifies which bit plane to use in an image. The default is to use the entire image and map values into black and white based on color intensities.
-gray Uses a 2x2, 3x3, or 4x4 gray scale conversion on a color image, rather than mapping to strictly black and white. This doubles, triples, or quadruples the effective width and height of the image.
-rv Forces the window to print in reverse video.
-compact Uses run-length encoding for compact representation of windows with white pixels.
-output filename Specifies an output file name.
-append filename Specifies a file name previously produced by xpr to which the window is to be appended.
-noff When specified in conjunction with -append, the window appears on the same page as the previous window.
-split n-pages Allows the user to split a window onto several pages. This might be necessary for very large windows that would otherwise cause the printer to overload and print the page in an obscure manner.
-psfig Suppresses translation of the PostScript picture to the center of the page.
-density dpi Indicates dot-per-inch density to be used by the HP printer.
-cutoff level Changes the intensity level where colors are mapped to either black or white for monochrome output on a LaserJet printer. The level is expressed as percentage of full brightness. Fractions are allowed.
-noposition Causes header, trailer, and image positioning command generation to be bypassed for LaserJet, PaintJet and PaintJet XL printers.
-gamma correction Changes the intensity of the colors printed by the PaintJet XL printer. The correction is a floating-point value in the range 0.00 to 3.00. Consult the operator's manual to determine the correct value for the specific printer.
-render algorithm Allows the PaintJet XL printer to render the image with the best quality versus performance tradeoff. Consult the operator's manual to determine the available algorithms.
-slide filename Allows overhead transparencies to be printed using the PaintJet and PaintJet XL printers.

The program contains the following limitations:

Program limitations with an LN03 printer:

Program limitations with a LA100 printer:

Program limitations with an HP printer:


Previous Next Contents Index