+ ออออ Programming with Panels ออออ Only a few Panel routines are needed to do complete screen level I/O with your application program. What follows here and on subsequent pages is a description of each routine available to link with your program. + void panel_activate(char fn[]); This routine will paint the screen using the panel defined in the text file .pan. Memory is allocated for a panel variable table. If a panel was previously active it will exist behind the new panel. + int panel_execute(char name[], int sub, int alarm); Positions the cursor to the named field or first unprotected field if name is null. Sub is the subscript of name field. A bell will sound if alarm is true. Control will return from this routine when a response key is pressed. The response key code (as defined in panel.h ) is the return value. + void destroy_panel(); This routine frees memory occupied by the panel variable table and restores the panel behind the active panel if present. + void modify_field_attr(char *name, int sub, char attr[]); Changes the screen attributes of the named panel field after the panel has been activated. Useful for indicating an error to the user by highlighting or blinking the contents of the erronious field. + void put_field(char *name, int sub, char value[]); This routine transfers value to the named panel field. + void get_field(char *name, int sub, char value[]); This routine transfers the named panel field to value . + void sound(int freq, int dur); Produces a sound of freq frequency and at least dur duration on the speaker. The duration is in hundreths of a second. + void delay(int dur); Wait for at least dur hundreths of a second to elapse. + int get_key(); Wait for a keystroke from the user and return the key code as defined within the panel.h header file. + void set_idle_func(int (*func)()); Sets up a user supplied function to be called while panel_execute or get_key is waiting for a keystroke from the user. func is a pointer to a function which returns an integer value. The NULLF value, defined within panel.h may be used to disable an idle function call. + void pan_error(16, int line, char *msg); Abort the application program by cleaning up any active panels. This function then displays the msg parameter and line number if not zero. *** End of Help Text ***