You are here: Development Standards > Routines > General Routines > GENGULIN.PUB

# GENGULIN.PUB

GENGULIN.PUB is a public program that displays and processes commands for a GUI scrolling or HLE (horizontal line entry) screen.

`0197 ENTER LN[ALL],LOC[ALL],LN$[ALL],MASK$,ACT$,YDISABLE$,TASK$,GUI_LN[ALL],`
`0197:ID,ROW_ID,BUTTON_KEYS$[ALL],OSGUI$,SAVE_FLD_HLP$,PASS_PROG$,GENINPUT$`

Variable | Description
LN[0] | -1 = Clear grid and exit 0 = do not display data 1 = display data 2 = display and exit, x+10 = display option, return any command keypress.
LN[1] | Not used
LN[2] | Total number of rows in the scroll region (a multiple of lines per item)
LN[3] | Lines per item
LN[4] | Starting column for scroll region
LN[5] | Starting row for scroll region
LN[6] | Maximum number of items in the scroll region (LN[2]/LN[3])
LN[7] | X value of the first LN$[X,Y] cell displayed in the current scroll region
LN[8] | X value of the current LN$[X,Y] cell (where the command prompt is never greater than LN[6])
LN[9] | Number of items in the current scroll region (never greater than LN[6])
LN[10] | Line number display column
LN[11] | Line number display row (if LN[11]=99, display line number for each item; otherwise, display only the current line number at column LN[10] and row LN[11])
LN[12] | LN$[X,Y] string truncate position (if zero, do not truncate). This allows data to be maintained at the end of the LN$[X,Y] strings
LOC[0] | Maximum number of transaction lines allowed (for example, maximum of 998 lines in an order)
LOC[1] | First transaction line (sequence) displayed in the scroll region
LOC[2] | Current transaction line (where command prompt is)
LOC[3] | Total number of transaction lines (never more than LOC[0])
LOC[4] | "Info" indicator (0 = not available, 1 = available)
LOC[5] | Function level of screen colors (0, 1, 2, 3); 1 becomes 0
LN$[X,Y] | Scroll region data (formatted strings)
MASK$ | Mask for line number display
ACT$ | Action returned to CALLing program (similar to Y$ in GENINPUT)
YDISABLE$ | Reserved
TASK$ | Command returned to CALLing program
GUI_LN[X,1] | Stores ending position within LN$[ALL] lines of each column
GUI_LN[X,2] | Alignment type: 0 - Left Alignment 1 - Right Alignment 2 - Centered 3 - Check box; a ‘Y’ in the first position in GUI_LN[X,1] determines whether the box is checked
ID | Control ID of the current grid
ROW_ID | Control ID of the current row display
BUTTON_KEYS$ [ALL] | Array to tie control ID’s of buttons to character keystrokes
OSGUI$ | GUI template (see GENGURES.PUB for more detail)
SAVE_FLD_HLP$ | Help ID of common-field help screen
PASS_PROG$ | Name of program CALLing GENGULIN.PUB
GENINPUT$ | Template used for miscellaneous functions. See GENINPUT routine for variable details.

LN[7] and LOC[1] are updated simultaneously, LN[8] and LOC[2] are updated simultaneously, and LN[9] and LOC[3] are updated simultaneously.

TASK$ return values:

Control Value | Meaning
LD | Line Down (down arrow and right arrow)
LU | Line Up (up arrow and left arrow)
PD | Page Down
PU | Page Up
EN | End
HO | Home
DL | Delete Line (Del)
IL | Insert Line (Ins)
TB | Tab Key

Valid one-character command include the numbers 0–9, the uppercase letters A–Z, and the symbols ?, <, >, @, *, +, -, =, and /.