|
Purpose |
Displays a map on the screen | |
|
Old name |
#define map map_draw | |
|
Syntax |
void map_draw(mapnr, flags) | |
|
Parameters |
int mapnr |
The number of the map to be displayed |
|
|
int flags |
Specifies position and colour of map display |
|
|
The value of the parameter flags can be a combination of the following values: | |
|
|
Value |
Meaning |
|
|
REMARK |
The map is cleared following next input, or next display of a map that contains a remark |
|
|
DATAMAP |
Display map as data map |
|
|
ERRORMAP |
The map is displayed as an error map |
|
|
MENUMAP |
Sets cursor wrap on and displays in menu colours. If possible, the map is displayed with an empty line between it and the map above. Adding RETAIN stops this |
|
|
DEAD |
Normally used with MAP_CHANGE. The map is displayed already 'dead', meaning that it is inaccessible to further operations |
|
|
RETAIN |
The map stays until cleared by one of the map clearing functions. Displays default colours of the map |
|
|
SCROLL |
When the screen is full, the map wraps around to its original position |
|
|
IN_BOX |
The map is displayed in a box. This is rarely used, as a box can be defined as a property of the map in MAPEDIT |
|
|
HIDDEN |
The map is initially displayed as a hidden map |
|
|
CLEAR |
All existing maps are cleared before displaying the existing map |
|
|
INACTIVE |
The map is displayed as inactive |
|
|
NO_SCROLL_OFF |
This makes sure that none of the maps currently on the screen are moved or removed |
|
|
BOTTOM |
The map is placed at the bottom of the screen. Under Windows, maps displayed with this flag are always positioned at the bottom of the window whether it is sized or scrolled |
|
|
STEP_CURSOR |
Obsolete |
|
|
NO_STEP_CURSOR |
Obsolete |
|
|
NO_MEMFILE |
The map is read from the database rather than the workfile. This is used by MAPEDIT |
|
|
POP_UP_WINDOW |
This positions the map as a popup map. Under Windows any map displayed with this flag is independently movable. Free maps acquire this flag automatically if displayed with MENUMAP, REMARK, SYSTEMMAP and ERRORMAP as long as RETAIN or BOTTOM are not specified. Attached maps only have this flag if it is passed explicitly |
|
|
NO_REDIRECTION |
Input redirection with the REDn program is disabled for this map |
|
|
SYSTEMMAP |
This indicates that the map comes from the system mapset contained in the SYSTEM database |
|
Description |
This function is the main function for displaying maps on the screen. The map is taken from the current mapset, loaded with the last call to the function map_load(). Although the database containing the mapset must be open, it need not be the currently open database described by the global variable db_nr. If the map is not on the database, the program is terminated with an error message. The position of the map on the screen is determined by an algorithm that takes account of the value of the parameter flag, and the user preferences defined in the file USERDATA.SYS. For fixing the position of maps, see the function map_attach(). | |
|
See also |
||