Passes control to the user for selecting from the choice list
| Call | ||
| #include <vv_clist.h> | ||
| int cl_rd(start_item, clistp) | ||
|
int start_item |
Choice list item to be initially highlighted |
|
| CLISTPTR clistp | Choice list to read | |
| Returns | ||
| AC_EXIT | The user made a choice from the choice list | |
| AC_QUIT | The user quit without choosing an item from the choice list | |
| 0 | Error. VV_ERR is set to one of the following: | |
| KWDNOTFOUND
ERRREAD FILETOOBIG MEMLACK |
The keyword marking the choice list was not found in the memory file.
An error occurred while trying to read the memory file. The keyworded section used by the choice list is too large to fit in the memory file. There is insufficient memory to allocate the underlying screen image. |
|
| Description
Before calling cl_rd(), the choice list must be displayed on the screen. cl_rd() calls mf_kwdset() to set the memory file to operate within the appropriate keyworded section. The memory file is then redisplayed within the window to ensure that the starting choice list item is visible. The keyboard is then scanned for user input and processed using the choice list event table CLETP. The user may move up or down in the choice list, quit, or select an item. If the user selects an item, the number of the item selected is transferred to the item number member of the choice list structure and AC_EXIT is returned. If the user quits, the current item number member is left unchanged, and AC_QUIT is returned. If a keyword was set prior to calling this function, the memory file is restored so that it operates on the keyworded section that was active when cl_rd() was called. |
||
| Related Functions | ||