The simplest use of FIXEDFORM is when a text file is used to define a form to be generated much like it could be drawn on paper: ┌──────────────────────────────────────────────────────────────────────────────┐ │ │ │ A basic form definition: ♦ RED │ │ o Underlines become input fields ♦ WHITE │ │ o Up-carets become menu options ♦ BLUE │ │ o Pound characters define boxes │ │ o Text otherwise displays as-is │ │ for the most part. Connected by pound characters the │ │ Name: John S. Urban menu acts as a radio button: │ │ Date: 2014-12-31 ┌──────┬───────┬──────┐ │ │ Value: 12,345,678.90 ♦ ♦ ♦ ♦ │ │ EAST WEST NORTH SOUTH │ │ │ │ When the cursor is over a menu item it is toggled by pressing the space bar. │ │ A tab character moves to the next selectable item. Typing in an input value │ │ changes the value. When the form is complete use the ENTER key. │ └──────────────────────────────────────────────────────────────────────────────┘ By default all that is returned when the RETURN key is entered is a tab-delimited string composed of all the input fields. A selected menu item returns a T character, otherwise it returns an F character. For larger forms with more than one selection per line it becomes difficult to ensure which value goes with which entry so you have to get more complicated. But for a small basic form that's pretty much it. BASIC RULES FOR CREATING A FORM: INPUT FIELDS o Underlines become one-line input fields o Up-carets become clickable menu options When adjacent to a single row or column of pound characters they act as a radio button. The pound characters will display as connecting lines. o The tab key goes to next input selection. DISPLAY OPTIONS o Adjacent pound characters define boxes o Single pound characters display as a degree symbol o Text between tilde characters is in reverse-video o Text between at characters has a green background o Other text displays as-is as white text on a black background. ┌──────────────────────────────────────────────────────────────────────────────┐ │ LIMITATIONS ON USING POUND CHARACTERS: │ │ Note that the lines defined by pound characters need separated by non-pounds │ │ to behave as described, and that only a single row or column should be used │ │ to define a radio-button menu. The ABCDEF menu is NOT a radio button because │ │ it has an extra row of box characters between the line and the menu options. │ │ │ ┌────────────────────────────┐ │ │ Pick a weekday ♦ │ Pick all the true choices │ │ │ ┌──────┬──────┬──────┐ │ ├─────┬─────┬─────┬─────┬────┤ │ │ ♦ RED ♦ ♦ ♦ ♦ ♦ │ │ │ │ │ │ │ │ ♦ WHITE TUE WED THU FRI │ ♦ ♦ ♦ ♦ ♦ ♦ │ │ ♦ BLUE ♦ A B C D E F │ │ │ │ │ ┌♦TOP An up-carat makes a button. Connected with pound-characters │ │ ├♦MIDDLE they act as a group of radio buttons. │ │ └♦BOTTOM ♦─♦─♦─♦─♦─♦─♦─♦─♦─♦─ │ │ ♦──♦──♦──♦──♦ 0 1 2 3 4 5 6 7 8 9 │ │ ┌┬┐ 1 2 3 4 5 │ │ ├♦┤ │ │ ├┼┤ ┌♦┬┬┬┬┬┬♦┬┬┬┬♦┬┬┬♦┬♦┬♦┬┬♦┬┐ │ │ ├♦┤ ├┼♦┼┼♦┼┼♦┼♦┼♦┼♦┼♦┼┼♦┼┼♦┼┼┼┤ │ │ └┴┘ └┴┴♦┴┴┴┴♦┴┴┴┴♦┴┴┴♦┴┴┴┴┴┴♦┴┘ │ │ │ └──────────────────────────────────────────────────────────────────────────────┘ There is a fixed function key panel at the bottom and a fixed message line. The rest of the screen is a scrollable area reserved for the form. THE FUNCTION KEYS AND BOXES: PgUp and PgDn, Home, Help, End and Enter buttons at the screen bottom act in an intuitive fashion. The PgUp and PgDn boxes page thru large forms from top to bottom. The Home box puts the upper right corner of the form in the upper right corner of the scrolling region. The Help box displays any help pages defined for the form. The End box ends the program. The Enter box submits the form data back to the calling program for processing. SCROLLING THE FORM REGION: If the terminal is big enough to display the entire form you don't have to know how to scroll it (and at least for an xterm(1) window the program will adjust to the terminal window being resized). But if the form does not fit in the terminal you have many ways to scroll the visible subsection of the form.... The arrow keys do what you expect and move the cursor until they get to the screen edge. Attempting to move past the screen edges scrolls the form region. In addition ... PgUp, PgDn, ctrl-F, ctrl-B, ctrl-U, ctrl-D, ctrl-E, ctrl-Y act like in vi(1)/vim(1) and ctrl-L and ctrl-R move the window right and left without moving the cursor. SMOOTH SCROLLING: o PgUp or ctrl-B -- 1 screen up ctrl-Y o PgDn or ctrl-F -- 1 screen down │ o ctrl-U - 1/2 screen up ctrl-L ──┼── ctrl-R o ctrl-D - 1/2 screen down │ ctrl-E ALL SCROLLING CONTROLS: ┌──────────────────────────────┬─────────────────────────────────────┐ │ ctrl-F(orward) or page-down │ advance down the form one page │ ├──────────────────────────────┼─────────────────────────────────────┤ │ ctrl-B(ackward) or page-up │ advance up the form one page │ ├──────────────────────────────┼─────────────────────────────────────┤ │ ctrl-U(p) │ advance up the form one-half page │ ├──────────────────────────────┼─────────────────────────────────────┤ │ ctrl-D(own) │ advance down the form one-half page │ ├──────────────────────────────┼─────────────────────────────────────┤ │ ctrl-E or shifted up-arrow │ advance up the form one line │ │ or moving the cursor past │ │ │ the top screen edge │ │ ├──────────────────────────────┼─────────────────────────────────────┤ │ ctrl-Y or shifted down-arrow │ advance down the form one line │ │ or moving the cursor past │ │ │ the bottom screen edge │ │ ├──────────────────────────────┼─────────────────────────────────────┤ │ ctrl-L or shifted left-arrow │ scrolls the form to the right │ │ or moving the cursor past │ │ │ the left edge of the screen │ │ ├──────────────────────────────┼─────────────────────────────────────┤ │ ctrl-R or shifted right-arrow│ scrolls the form to the left │ │ or moving the cursor past │ │ │ the right edge of the screen │ │ └──────────────────────────────┴─────────────────────────────────────┘ ──────────────────────────────────────────────────────────────────────────────── CURSOR MOVEMENT: The cursor is moved with the arrow keys or by toggling on vi-mode. In vi-mode the j,k,l,m keys move the cursor as they do in the vi(1) editor until ctrl-v is re-entered. The Home key places the top right corner of the form in the top right corner of the form display region and puts the cursor at the corner. The Tab key moves to the next selectable field. ────────────────────────────────────────────────────────────────────────────────