The System Logical Attribute Table

Whether color or monochrome physical attributes are used is determined during system initialization. Logical attributes are defined in the system logical attribute table in vv_main.h. There are three different logical attribute tables, one for each of the following: (1) PCDOS and OS/2, (2) UNIX, XENIX, POSIX, and VMS systems, and (3) memory-mapped versions. You are supplied with the logical attribute table(s) appropriate for your version of Vermont Views.

The PCDOS and OS/2 logical attribute table has two columns, one containing monochrome physical attribute bytes and another containing color physical attribute bytes. The UNIX, XENIX, POSIX and VMS logical attribute table also has two columns, one containing the monochrome terminal attribute codes and another containing the color terminal attribute codes. The memory-mapped logical attribute table contains four columns: memory-mapped monochrome mode, memory-mapped color, terminal monochrome, and terminal color.

When a Vermont Views program begins, the initialization routine determines the current video mode. The column in the system logical attribute table that contains attribute information for the current video mode is copied into a one-dimensional array called the system logical attribute array. For example, if the system is running in monochrome video mode (or black and white mode on a color monitor), the monochrome column of the system logical attribute table is copied into the array. If the system is running in a color video mode, the color column is copied. For a program running under memory-mapped output, the column copied depends on whether the program is running in monochrome memory-mapped mode, color memory-mapped mode, terminal color mode, or terminal monochrome mode. Thus, the system logical attribute array contains the physical attributes in use for the current hardware and operating configuration.

The one-dimensional system logical attribute array that contains the attribute information for the current video mode is #defined for your convenience as LATT_SYS. By default, logical attributes contained in LATT_SYS are used to display all Vermont Views global windows (FM_WNP, MN_WNP, WN_WNP, CLIST_WNP, HELP_WNP, ERR_WNP, MSG_WNP, and FULL_WNP). Any data forms, menus, or windows that you define in code also use LATT_SYS by default.


Home Contents Previous Next