[Next] [Previous] [Up] [Top] [Contents] [Index]

Chapter 2 Basic Operations

3. The Modify Display Options


The following sections cover the options in the modify display submenu. The options in this submenu are global for the entire display, just like the other options in the display menu. Using these options you can set defaults for the drawing area and all the objects within the drawing area. An object will inherit these defaults when you draw it, but individual objects can override them using the non-global operations in the drawing area. Figure 2-7 shows the submenus of the Modify Display option.

The Modify Display Submenu.

Notice the submenu's three options: attributes, color table, and color rules. The following sections cover each of these options; however, how to configure color rules is covered in Chapter 3, Working With Templates And Color Rules.

3.1. The Display Attributes Window

If you invoke the modify display->attributes, the Display Attributes Modify window or, more simply, the Display Attributes window, appears (Figure 2-8). The Display Attributes window has 15 attributes, which affect either the display itself, the drawing area, all the objects in the drawing area, or a combination of these. The first two attributes, the 'horizontal and vertical position attributes,' affect only the display window. The 'horizontal and vertical size' attributes affect the size of the display and its window. The 'foreground and background color' attributes affect the color of the drawing area as well as the objects created within it. Except for the last attribute, the 'external color palette display name' attribute, the rest of the attributes are inherited by objects and don't affect the drawing area as a whole.

Note that the attributes that affect only objects--and the 'foreground and background color' attributes as far as they affect objects--are defaults. When you create objects, objects inherit defaults as properties. The properties that an object inherits can only be changed by changing those properties individually for each object, in the object's property sheet. You cannot change an object's properties once it is drawn with the attributes in the Display Attributes window. It is also important to note that the 'foreground and background color' attributes affect the drawing area and that changing the color of each attribute will change the color of the drawing area, but not the color of the objects that have already inherited those defaults.

The following sections describe each attribute and what it does in detail.

The Display Attributes Window.

3.1.1. Horizontal and Vertical Position
IMPORTANT: The 'horizontal and vertical position' attributes only affect the position of the display on the workstation screen at run-time. They do not affect the position of the display in EDD. Thus, you can only see the results of any changes to these attributes in DM.

By default, both of these attributes have the values 180, which places the display in the top, left-hand corner of the screen. A higher value for the 'horizontal position' will configure the display so that it appears further to the right in DM. Likewise, a higher value for the 'vertical position' attribute will configure the display so that it appears further to the bottom of the screen. If you would like to see where the position of the current values will be at run-time, you can choose the activate display option (discussed earlier in the chapter), which will start DM with the current display.

3.1.2. Horizontal and Vertical Size (the Display Window Size)

These attributes determine the size of the display window and thus of the drawing area. The 'horizontal size' attribute determines the display's width, and the 'vertical size' attribute, its height. These attributes are sliders.

As of version 2.4, when displays configured in EDD are brought up in DM, you can make the display's size proportional to the monitor size. Before version 2.4, when a display was configured in EDD, EDD would save the display's size in pixels. When the display was brought up in DM, DM would use size the display according to the pixel size saved by EDD. If the display were brought up on a monitor whose resolution was different from the one the display was configured on, the size of the display would differ. As of 2.4, EDD also saves the resolution of the monitor on which the display is configured, so when the display is brought up in DM, if the resolution of the monitor differs, DM will size the display proportionally according to the size of the monitor and the size in pixels. Thus, a display can be the same size on different monitors.

To enable this new feature, the Xresource Dm.propResize must be set to True in the user's .Xdefaults files:

Dm.propResize	 True

3.1.3. Foreground Color and Background Color

The next attributes in the Display Attributes window are 'foreground color' and 'background color.' These attributes control the colors of two things: the drawing area as a whole, and the default colors for the objects you create. When you create an object, the object will inherit these colors. You can then override the colors in the object's property sheet (property sheets are explained in Chapter 4, Creating and Manipulating Objects). How the objects use these colors depends on the object: some objects inherit only the foreground color because they only have one color property. Most inherit both, as they have a 'foreground color' and a 'background color' property. For now, we'll discuss how the foreground and background color affect the drawing area as a whole and how to change the color for each attribute.

Notice in Figure 2-8 that next to these attributes is a bar indicating the current color. In the figure, the foreground color is white and the background color is black. Remember that the drawing area is the area enclosed by the rectangular outline. The foreground color determines this outline's color. The background color determines the actual color of the drawing area, the area within the outline. To change the color of either attribute:

1. Highlight the color bar of the attribute and hold down the right mouse button, which will bring up a menu with a "palette" of the possible colors to choose from.

2. Highlight the desired color. The highlighted color on the palette will be outlined with dashes.

3. Release the mouse button. The color bar changes to the color you chose.

The Color Table determines the colors that appear in the color palette. See section 3.2., The Color Table, for more about how to add, delete, and change colors within this color table.

3.1.4. Default Edge Style and Default Fill Style

The next two attributes after 'foreground and background color' are the 'default edge style,' the 'default fill style,' and the 'default line width' properties. These attributes are defaults, so they are inherited by objects. Only objects from the graphics subclass inherit these attributes, as the objects in the other classes have no corresponding properties for these attributes. These attributes have no effect on the drawing area as a whole.

The 'default edge style' attribute has a choice button with two choices: solid and dash. Likewise, the 'default fill style' attribute also has two choices: outline and solid. Boxes A-D in Figure 2-9 show examples drawn with the different combinations of these two options. In all the objects in the example, A-E, the foreground color is white, and the background color is black. An object drawn with dash as the edge style and outline as the fill style will have an outline made up of dashes whose color is determined by the foreground color (in this case, white) and an interior whose color is determined by the background color (in this case, black), as in object A. Object C is similar to A except that the edge style was set to solid. Objects B and D were both created with the default fill style set to solid, but B was created with the default edge style set to dash and D was created with default edge style set to solid. Note that there is no difference between the two. The solid fill style makes the edge style invisible, whatever it is. Note also that the background color (black, in this case) is not used when the default fill style is set to solid.

Object E in the figure is an example of an object drawn with the 'default line width' set at 48. In the rest of the objects, the default line width was 0.

Default Edge and Default Fill Styles.

To change the 'default edge style' attribute:

1. Highlight the choice button for the attribute.

2. Left-click on the desired choice in the button: solid for solid outlines and dash for outlines with dashes.

To change the 'default fill style' attribute:

1. Highlight the choice button for the attribute.

2. Left-click on the desired choice in the button: outline or solid.

To change the 'default line width' attribute:

1. Highlight the slider for the attribute.

2. Hold down the left mouse button and drag the mouse right or left to increase or decrease the line width's current value.

3.1.5. The Default Color Modifier

The next option in the Display Attributes Modify window is the 'default color modifier' attribute.

There are three things that can determine an object's color within a display: (1) the foreground and background color attributes in the Display Attributes window, which we discussed previously, (2) the color property in an object's property sheet, and (3) a color rule. A Color rule modifies an object's color at run-time so that the object will turn a certain color when certain conditions exist. Chapter 3, Working With Templates And Color Rules, discusses color rules and how to configure them. For now we will only discuss how to turn the color rule capability on or off.

The 'default color modifier' attribute is a default setting, so it basically works like the defaults discussed previously; that is, all objects created in the display will automatically have their color rule capabilities turned on or off according to how this attribute is set. You can then turn the color rule capability on or off for each object individually in the object's property sheet. Changing the setting in the display attributes window will not change any objects created before the change.

The 'default color modifier' attribute has two settings: static and rule. The static setting turns the color rule capability off so that the color of objects created with this setting will be determined by the other factors that determine an objects color, i.e., its background and foreground colors. The rule setting turns the color rule capability on so the color of all objects created with this setting will be determined by a color rule.

To change the setting of the Default Color Modifier:

1. Highlight the entry line.

2. Hold down the right mouse button. This will bring up a menu with the two settings, static and rule.

3. Choose the setting you want.

Though this option turns the color rule capability on, to make a color rule fully functional for an object you must create a color rule; then you must specify the color rule an object is to use and which part of the color rule, that is, the color rule argument. With the 'default color rule' attribute in the Display Attributes window you can specify a color rule that all newly created objects will have, but you must specify the color rule argument for each object individually in the object's property sheet. We will discuss color rules and color rule arguments more fully in Chapter 3.

3.1.6. The Default Visibility Modifier

The next attribute, the 'visibility modifier' attribute, is a default setting. It only affects objects in the graphics subclass; it has no affect on other types of objects -- controllers, monitors, nor plots. It has three different settings: static, if not zero, and if zero. The static setting turns the visibility modifier off so that dynamic graphics objects are always visible at run-time. The other two settings cause dynamic graphical objects to appear or disappear depending on the value of the channel. The if not zero setting causes the object to appear when the channel's value is anything other than zero and causes it to disappear when the value is equal to zero. The if zero setting does the opposite: it causes the object to appear if the value of the channel is equal to zero and to disappear if the value of the channel is anything other than zero.

You cannot change the values of the conditions that the visibility modifier uses. You cannot create, for instance, a setting called if > 10. The visibility modifier understands values only in terms of zero and non-zero. Thus, you can see that it would be used mostly to monitor discrete channels, but could be used to tell if an analog channel had a value other than zero.

3.1.7. Precision Override

This attribute is available only as of version 2.3. By setting it to any positive integer, you can determine the precision with which certain objects--indicators, valuators, and text-update objects-- will display floating-point numbers at run-time. This property has no significance for other objects.

When you specify a negative integer in this attribute, indicators, valuators, and text-update objects will display floating-point numbers with the precision retrieved from the database. In versions prior to 2.3, the floating-point precision was always determined by the database from which the values are retrieved. Now, the database precision can be overridden for the above-mentioned objects. For example, if you give this attribute a value of four, then a valuator in DM would display four decimal places of precision as in 10.2345. If you specified -1 in this attribute, the precision would depend on the database. If the channel controlled by the valuator was the VAL field of an analog output record, the precision would be retrieved from the PREC field of the analog record, though this may not be the case for all channels.

3.1.8. Default Color Rule Name

In the 'default color rule' attribute you can specify a default color rule that all objects will inherit. See Chapter 3 for more information on color rules.

3.1.9. Default Channel

With this option you can specify a channel that all dynamic objects will connect to at run-time. All dynamic objects have a property in which you can specify a name for that object to control or monitor. You don't necessarily have to enter the entire channel name in this attribute. In fact, this attribute is most useful for specifying the part of the channel name that all channels in a certain system or subsystem may have. On many EPICS projects, it is a common practice to name database records so that they include an element that identifies them as part of a system, database, or a subsystem.

For example, a record name might be sub1:analog_input4, where sub1 is the element of the channel name identifying the record as belonging to subsystem 1. The next element of the channel name, analog_input4, identifies the particular record. If all or most of the objects in the display were going to connect to channels in subsystem1, you could specify sub1 in this attribute so that you wouldn't have to specify it in every object's property sheet.

3.1.10. External Color Palette Display Name

With this option you can specify another display file that the current display will reference for its colors. In effect, it will share colors with the referenced file. The referenced file is known as a color template file.

Color template files have two purposes:

(1) The first is color uniformity among displays or groups of displays. Since each display can potentially have its own set of colors in its color table (see following section), there is a need to provide some uniformity of color among a group of displays. For instance, you may want to configure a group of displays so that they use exactly the same colors for the same purposes (the same red for all message buttons, for instance).

(2) The second reason pertains only to EDD/DM versions before 2.2. All displays created with a pre-2.2 version of EDD used allocated colors. That is, they did not "share" their colors with other displays unless they shared a color template file with those displays. When several displays were activated using DM, if they did not use a common color template file, each would allocate its own set of colors, regardless of whether those colors were the same used by other displays. Thus, displays could rapidly eat up the colors available on a color monitor. When they had hogged all the colors in this fashion, any extra displays that were activated would not display all their colors, which could be very undesirable at run-time. The remedy to this problem was to have a group of displays reference a color template file, which would allow any number of displays to share the colors of the template file. If you are currently using an EDD/DM version prior to 2.2, you must keep this in mind. If you are using EDD 2.2 or later, you don't have to worry about sharing colors unless the displays you are configuring use a lot of blinking colors as blinking colors are allocated in all versions of EDD.

Chapter 3, Working With Templates And Color Rules, has a more complete discussion of color template files. For now, you should be aware that when displays share colors, they also share color rules, no exceptions. If a display references a color template file, the color rules of the display are lost.

To reference a color template file, enter the filename in the text-entry line.

3.2. The Color Table

The Modify Display submenu has two more options after attributes: color table and color rules. This section discusses the color table option. Color tables are the palette from which you can choose the colors you will use for individual objects as well as the drawing area as a whole. A file's color table is displayed in the Color Map Modify when you invoke color table.

If, however, the file you are working on references a color template file (see the previous discussion), EDD will beep at you when you choose the color table option and bring up a dialog box. Basically, the dialog box tells you that the display file you are working on gets its colors from another file and that in order to make shared changes to the color table you must load that file. If you load that file and make changes to its color table, the changes will show up in the color tables of both files. This is usually how you will want to modify the color table of a file that shares colors.

The dialog box also informs you that you can copy the color table from the template file to this file, giving the current file a local copy of the color template file's color table. It also warns you that doing this will "reduce the number of colors available to others." However, this is only true of displays created with an EDD version prior to 2.2. Display files created with version 2.2 or later share their colors with other displays that are being used.

If you wish to receive a local copy of the color table to edit, then left-click copy on the choice button at the bottom of the dialog box. If you do not wish to receive a local copy of the color table, left-click cancel on the choice button.

3.2.1. Modifying the Color Table

When you choose color table from the Modify Display submenu, the Color Map Modify window appears, as in Figure 2-10. The topmost line after the window title shows the current number of colors currently in the color table. Each color takes up a row in the rest of the window. You can add to or subract from the current number of colors by entering in a new number. A color table can have up to 256 colors.

The first three columns from the left are the red, green, and blue or RGB columns. Each color has a value for each of these columns. Different combinations of RGB values produce different colors. You can change the RGB value by manipulating its slider. The range of the slider in the figure, the range of the RGB value, is 0 to 255.

The next column from the left is the blink column. In each row of this column is a choice button with which you can turn on or off the blink feature of each color. When a color's blinking feature is turned on, the color continuously switches from a dimmed version of the color to its normal color, giving it a blinking effect.
IMPORTANT: All blinking colors are allocated, regardless of EDD/DM version. Recall that as of EDD/DM 2.2, displays can share colors with other displays, even if they don't reference a common color template file. However, displays cannot share blinking colors, unless they reference a common color template file. Thus, if you are not referencing a color template file, you must remember not to use too many blinking colors. Otherwise, the displays will "hog" the monitor's colors at run-time. When a monitor's colors are all used up, other displays or applications will have trouble opening or may not display properly. If you wish to use a lot of blinking colors, use a color template file (see Chapter 3, Working With Templates And Color Rules).

The actual color of the RGB values appears in the color bar in the next column. The color in the color bar changes as you changes the RGB values.

The next column, labeled 'intensity,' is used for grey-scale or monochrome monitors. The range is 0 to 255. You can change the intensity of the color by manipulating its slider. With this part of the color table, you can create different shades of grey, in addition to white and black. Changing these values has no effect on the RGB values or on color monitors.

The Color Table.

To add colors to the color map:

1. Delete the current number of colors and enter the new number of colors in the number of colors entry line.

2. The additional rows for the new colors appear at the bottom of the color map, each with its RGB values set to zero (the color black), its blinking ability turned off, and its intensity also set to zero.

3. You can then manipulate the RGB values to produce a color other than black.

To subtract colors from the color map:

1. Delete the current number of colors and enter the new number of colors: the new number will equal the current number minus the number of colors you wish to subtract.

2. EDD will beep at you and a dialog box will appear, warning you that if you continue you will discard a number of colors at the bottom of the color map.

3. Left-click decrease on the choice button at the bottom of the window if you wish to discard the colors.

Be aware that a display cannot have less than eight colors. If you open the color map of a blank display window, you will see eight colors: white, black, two reds, two yellows, and two blues. You can modify or change these colors, but you cannot delete them.

3.3. Adding and Deleting Color Rules

The color rules option has a submenu that consists of an edit list option and a list of color rules for the current display file. The edit list option brings up a window in which you can add or delete color rules. A display can have up to eight color rules.

To add to the list of color rules:

1. Invoke the edit list option.

2. Type in the new number of color rules in the text-entry line where it says number of color rules: type in the number that is the sum of the current number and the number of rules you wish to add.

3. One blank text-entry line appears for each color rule you wish to add. Type in the name of the color rule you wish to add to the list.

The new color rule(s) will appear in the color rules list. You can then configure each new color rule by choosing it from the color rule list which will bring up a window in which you can configure the color rule. See Chapter 3, Working With Templates And Color Rules, for more on configuring color rules.

To subtract from the list of color rules:

1. Choose the edit list option.

2. Type in a new number at the number of color rules text-entry line: the new number will be the current number minus the number of rules you wish to subtract.

3. A dialog box appears warning you that if you continue you will discard a number of color rules at the bottom of the list. The number to be discarded equals the number of color rules you wish to subtract.

4. Click decrease on the choice button at the bottom of the dialog box.

This is the only way to delete color rules. You cannot delete a color by deleting the name of the color rule from its entry line in the edit list window. It will simply be a color rule without a name, and there will be a blank in the color rules list. There is no easy way to delete, for example, the second of three color rules without deleting the third also. To do this you will probably have to make a copy of the display, delete the second and third color rules, then add a color rule, and then copy the third color rule by typing in its characteristics, using the copied display as a guide. Once again, for more information on color rules see the section on color rules in the next chapter.

3.1. - The Display Attributes Window
3.1.1. - Horizontal and Vertical Position
3.1.2. - Horizontal and Vertical Size (the Display Window Size)
3.1.3. - Foreground Color and Background Color
3.1.4. - Default Edge Style and Default Fill Style
To change the 'default edge style' attribute:
To change the 'default fill style' attribute:
To change the 'default line width' attribute:
3.1.5. - The Default Color Modifier
To change the setting of the Default Color Modifier:
3.1.6. - The Default Visibility Modifier
3.1.7. - Precision Override
3.1.8. - Default Color Rule Name
3.1.9. - Default Channel
3.1.10. - External Color Palette Display Name
3.2. - The Color Table
3.2.1. - Modifying the Color Table
To add colors to the color map:
To subtract colors from the color map:
3.3. - Adding and Deleting Color Rules
To add to the list of color rules:
To subtract from the list of color rules:

EDD/DM User's Manual, 2.4 - 27 MARCH 1997
[Next] [Previous] [Up] [Top] [Contents] [Index]


| LANL | Lansce | UC | DOE |

L O S   A L A M O S   N A T I O N A L    L A B O R A T O R Y
Operated by the University of California for the US Department of Energy

Copyright 1996 UC   Disclaimer   


For problems or questions regarding this web site contact George Vaughn.