|
Purpose |
Waits in a map field | ||
|
Old names |
#define select(mapnr,fieldnr) | ||
|
Syntax |
int askm_special(mapnr, fieldnr, flags, mnem_map) | ||
|
Parameters |
int mapnr |
Number of owning map | |
|
|
int* fieldnr |
Pointer to field to wait in | |
|
|
int flags |
Parameter specifying display format | |
|
|
int mnem_map |
Number of a map which is usually displayed on the screen with mnemonic letters | |
|
|
The parameter flags can take any of the following values: | ||
|
|
Value |
Meaning | |
|
|
FUNC_KEYS |
Allows the use of the function and number keys to select an option | |
|
|
NR_KEYS |
Allows the number keys to select an option | |
|
|
CURS_KEYS |
Causes the <Ins>, <Del>, <Pg Up> and <Pg Dn> keys to select the currently highlighted option, and return with the global variable abort_code set to the appropriate value | |
|
|
NO_WRAP |
This makes the function askm_special() return with the value of the key pressed if the user tries to move outside the choice array | |
|
Description |
The askm_special() function highlights a field and waits for the user to press a key. It is often used to allow the user to select an option from a menu which has already been displayed. This menu is passed as the parameter mnem_map. If the menu is not being used, the parameter mnem_map should be set to 0. If a mnemonic letter is pressed, the function askm_special() returns the value of the global variable abort_code, which is set to the number of the field whose mnemonic letter was pressed. The parameter fieldnr is set to where the next input should be. If a mnemonic key is pressed, fieldnr does not change at all, and the function inpm_omit() should be called if the field is part of a data entry function. If the global variable realpass is FALSE, the function always returns RIGHT. This occurs when the function map_get_inputs() is called with the parameter flag set to the value PREDISPLAY, or the function map_predisplay() is called. The function askm_special() is unlike the function inpm_e() because it does not check that the number chosen corresponds to a field on the menu. | ||
|
Return values |
Returns the value of the global variable abort_code. If a mnemonic letter is pressed, it returns the corresponding field number | ||
|
See also |
|||
|
Example |
| ||