An explanation of each of the arguments in fm_def() follows.
The first two arguments, rb and cb, specify the screen coordinates of the upper-left corner of the form window. Numbering screen rows and columns starts with zero; therefore, the coordinate (0, 0) is the top left corner of the screen. You can specify CENTER_WN for either coordinate to have the form window centered horizontally or vertically. CENTER_WN is a constant that is #defined in the header file vv_sys.h.
The arguments rowq and colq specify the number of rows and columns you want the form window to have. This size includes the characters for the border. When you specify the size of the form, make sure you take into account the spaces required by the border. The form window must fit on the physical screen. However, you can make the form itself much larger. See Chapter 14, "Virtual Data Forms," for more information.
Video display in Vermont Views is controlled by logical display attributes. A single logical attribute contains physical video attributes for color and for monochrome modes. Vermont Views automatically detects the computer's current video mode and uses the correct physical attribute. When you use logical attributes, you do not need to include any conditional code to handle different display modes. For a more detailed explanation of the logical attribute system and how to customize color control, see Chapter 46, "Controlling Color with Logical Attributes."
The form attribute is set to the attribute specified in fm_def(). The form attribute is used as the background color of the form and also used when writing prompt text to the window. In the example program, the form attribute is set to LNORMAL. LNORMAL is a logical attribute that is set to appear on the screen as normal on monochrome displays and as white on blue on color displays. Table 6.1 gives a partial list of the system-defined logical attributes and their corresponding monochrome and color display attributes. You can change the system definitions or add your own. For information on how to change attributes in the Designer, see the Designer User's Guide. For a complete list of system-defined logical attributes and information on how to change attributes in your code, see Chapter 46, "Controlling Color With Logical Attributes."
Table 6.1: Partial List of Logical Attribute Definitions
| PCDOS & Memory-Mapped XENIX | UNIX & VMS | |||
| Logical Attribute | Monochrome | Color | Monochrome | Color |
| LSYS | Normal | White on Black | NORMAL | COLOR9 |
| LNORMAL | Normal | White on Blue | NORMAL | COLOR10 |
| LREVERSE | Reverse | Blue on White | REVERSE | COLOR11 |
| LHIGHLITE | High intensity | Bright White on Blue | HIGH_INT | COLOR12 |
| LFLDINACT | High intensity | Cyan on Blue | HIGH_INT | COLOR15 |
| LFLDACT | Reverse | Black on Cyan | REVERSE | COLOR16 |
| LFLDSKIP | High intensity | Black on White | NORMAL | COLOR15 |
Table 6.2 lists the #defined pointers to the system borders and what type of borders they are. The border pointers are defined in the header file vv_sys.h; the border structures are initialized in the header file vv_main.h. Appearance of borders is operating system dependent. Specify one of the border pointers listed in Table 6.2 for the bdrp argument.
Table 6.2: Border Types
| Border Pointer | Type of Border |
| BDR_SLNP | Single-line |
| BDR_DLNP | Double-line |
| BDR_SPACEP | Space character |
| BDR_DOTP | Stippled block graphics character or dot/colon |
| BDR_STARP | Asterisk |
| BDR_SOLIDP | Solid block graphics character or |
| BDR_NULLP | No border |