Controlling the Display and Viewing of Memory Files

Function mf_browse() carries out all the steps for allowing the user to browse through a memory file by doing the following:

1 If the window is not already on the screen, sets the window on the screen with wn_up().
2 Places the cursor in the window with csr_plwn().
3 Passes control to the user.
4 When the user presses the Quit key or Exit key, removes the window from the screen with wn_dn().

You can control these steps by calling these functions yourself. For instance, to place the window on the screen and perform other actions before allowing the user to browse the window, you can use a code fragment like this:

...

...

wn_up(wnp);

/* Display window with memory file

*/
...    

...
/* Perform other tasks
*/
mf_browse(wnp)
/* Allow user to browse memory file
*/
wn_dn();    

...

...
/* Remove window from screen
*/

If you do not want to pass control to the user to allow scrolling through a memory file or have information that fits only in one window, you can skip the call to mf_browse(). Instead, you might remove the window when the user presses any key. For example:

...

...

wn_up(wnp);

ki();                    /* Waits for user keystroke            */

wn_dn(wnp)

...

...


Home Contents Previous Next