|
|
Some applications may need to move the menu's window cursor from the position required for continued processing by the ETI menu driver. To move the cursor back to where it belongs, you use function pos_menu_cursor.
SYNOPSIS
int pos_menu_cursor (menu) MENU menu;
Your application might change the cursor position automatically because of prior calls to menu driver initialization routines such as set_item_init. Or it might do so because of explicit calls to application routines such as writing a prompt. ``Returning cursor to its correct position for menu driver processing'' illustrates this usage.
void generate_prompt (m) MENU * m; {/* display the prompt string associated with the current item */
WINDOW * w = menu_win (m); char * s = item_userptr (current_item (m)); box (w, 0, 0); wmove (w, 0, 0); waddstr (w, s); pos_menu_cursor (m); }
Returning cursor to its correct position for menu driver processing
If function pos_menu_cursor is successful, it returns E_OK. In the following error situations, it fails and returns the indicated value: