home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0040 - 0049 / ibm0040-0049 / ibm0040.tar / ibm0040 / ZINC_6.ZIP / DOSSRC.ZIP / UI_MAP.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-01  |  16.4 KB  |  533 lines

  1. //    Zinc Interface Library - UI_MAP.HPP
  2. //    COPYRIGHT (C) 1990, 1991.  All Rights Reserved.
  3. //    Zinc Software Incorporated.  Pleasant Grove, Utah  USA
  4.  
  5. #ifndef UI_MAP_HPP
  6. #define UI_MAP_HPP
  7. #ifndef UI_EVT_HPP
  8. #include <ui_evt.hpp>
  9. #endif
  10.  
  11. #ifdef ZIL_MSWINDOWS // ---------------------------------------------------
  12.  
  13. // ----- MS Windows scan-codes --------------------------------------------
  14. // ----- virtual key codes OR'ed with shift state found in event.rawCode --
  15. #ifdef USE_RAW_KEYS
  16. const USHORT ESCAPE                    = 0x001B;    // Miscellaneous keys
  17. const USHORT ENTER                    = 0x000D;
  18. const USHORT BACKSPACE                = 0x0008;
  19. const USHORT CTRL_BACKSPACE            = 0x0408;
  20. const USHORT TAB                    = 0x0009;
  21. const USHORT CTRL_TAB                = 0x0409;
  22. const USHORT BACKTAB                = 0x0309;
  23.  
  24. const USHORT CTRL_BREAK                = 0x0403;
  25. const USHORT CTRL_C                    = 0x0443;
  26.  
  27. const USHORT ALT_ESCAPE                = 0x081B;
  28. const USHORT ALT_PERIOD                = 0x08BE;
  29. const USHORT ALT_SPACE                = 0x0820;
  30. const USHORT ALT_WHITE_MINUS        = 0x08BD;
  31. const USHORT ALT_WHITE_PLUS            = 0x08BB;
  32.  
  33. const USHORT ALT_A                    = 0x0861;
  34. const USHORT ALT_B                    = 0x0862;
  35. const USHORT ALT_C                    = 0x0863;
  36. const USHORT ALT_D                    = 0x0864;
  37. const USHORT ALT_E                    = 0x0865;
  38. const USHORT ALT_F                    = 0x0866;
  39. const USHORT ALT_G                    = 0x0867;
  40. const USHORT ALT_H                    = 0x0868;
  41. const USHORT ALT_I                    = 0x0869;
  42. const USHORT ALT_J                    = 0x086A;
  43. const USHORT ALT_K                    = 0x086B;
  44. const USHORT ALT_L                    = 0x086C;
  45. const USHORT ALT_M                    = 0x086D;
  46. const USHORT ALT_N                    = 0x086E;
  47. const USHORT ALT_O                    = 0x086F;
  48. const USHORT ALT_P                    = 0x0870;
  49. const USHORT ALT_Q                    = 0x0871;
  50. const USHORT ALT_R                    = 0x0872;
  51. const USHORT ALT_S                    = 0x0873;
  52. const USHORT ALT_T                    = 0x0874;
  53. const USHORT ALT_U                    = 0x0875;
  54. const USHORT ALT_V                    = 0x0876;
  55. const USHORT ALT_W                    = 0x0877;
  56. const USHORT ALT_X                    = 0x0878;
  57. const USHORT ALT_Y                    = 0x0879;
  58. const USHORT ALT_Z                    = 0x087A;
  59.  
  60. const USHORT ALT_1                    = 0x0831;
  61. const USHORT ALT_2                    = 0x0832;
  62. const USHORT ALT_3                    = 0x0833;
  63. const USHORT ALT_4                    = 0x0834;
  64. const USHORT ALT_5                    = 0x0835;
  65. const USHORT ALT_6                    = 0x0836;
  66. const USHORT ALT_7                    = 0x0837;
  67. const USHORT ALT_8                    = 0x0838;
  68. const USHORT ALT_9                    = 0x0839;
  69. const USHORT ALT_0                    = 0x0840;
  70.  
  71. const USHORT GRAY_ENTER                = 0x000D;    // Grey keys
  72. const USHORT GRAY_UP_ARROW            = 0x0026;
  73. const USHORT GRAY_DOWN_ARROW        = 0x0028;
  74. const USHORT GRAY_LEFT_ARROW        = 0x0025;
  75. const USHORT GRAY_RIGHT_ARROW        = 0x0027;
  76. const USHORT GRAY_INSERT            = 0x002D;
  77. const USHORT GRAY_DELETE            = 0x002E;
  78. const USHORT GRAY_HOME                = 0x0024;
  79. const USHORT GRAY_END                = 0x0023;
  80. const USHORT GRAY_PGUP                = 0x0021;
  81. const USHORT GRAY_PGDN                = 0x0022;
  82. const USHORT GRAY_DIVIDE            = 0x006F;
  83. const USHORT GRAY_MULTIPLY            = 0x006A;
  84. const USHORT GRAY_PLUS                = 0x006B;
  85. const USHORT GRAY_MINUS                = 0x006D;
  86.  
  87. const USHORT CTRL_GRAY_UP_ARROW        = 0x0426;
  88. const USHORT CTRL_GRAY_DOWN_ARROW    = 0x0428;
  89. const USHORT CTRL_GRAY_LEFT_ARROW    = 0x0425;
  90. const USHORT CTRL_GRAY_RIGHT_ARROW    = 0x0427;
  91. const USHORT CTRL_GRAY_INSERT        = 0x042D;
  92. const USHORT CTRL_GRAY_DELETE        = 0x042E;
  93. const USHORT CTRL_GRAY_HOME            = 0x0424;
  94. const USHORT CTRL_GRAY_END            = 0x0423;
  95. const USHORT CTRL_GRAY_PGUP            = 0x0421;
  96. const USHORT CTRL_GRAY_PGDN            = 0x0422;
  97. const USHORT CTRL_GRAY_DIVIDE        = 0x046F;
  98. const USHORT CTRL_GRAY_MULTIPLY        = 0x046A;
  99. const USHORT CTRL_GRAY_PLUS            = 0x046B;
  100. const USHORT CTRL_GRAY_MINUS        = 0x046D;
  101.  
  102. const USHORT ALT_GRAY_UP_ARROW        = 0x0826;
  103. const USHORT ALT_GRAY_DOWN_ARROW    = 0x0828;
  104. const USHORT ALT_GRAY_LEFT_ARROW    = 0x0825;
  105. const USHORT ALT_GRAY_RIGHT_ARROW    = 0x0827;
  106. const USHORT ALT_GRAY_INSERT        = 0x082D;
  107. const USHORT ALT_GRAY_DELETE        = 0x082E;
  108. const USHORT ALT_GRAY_HOME            = 0x0824;
  109. const USHORT ALT_GRAY_END            = 0x0823;
  110. const USHORT ALT_GRAY_PGUP            = 0x0821;
  111. const USHORT ALT_GRAY_PGDN            = 0x0822;
  112. const USHORT ALT_GRAY_DIVIDE        = 0x086F;
  113. const USHORT ALT_GRAY_MULTIPLY        = 0x086A;
  114. const USHORT ALT_GRAY_PLUS            = 0x086B;
  115. const USHORT ALT_GRAY_MINUS            = 0x086D;
  116.  
  117. const USHORT WHITE_UP_ARROW            = 0x0026;    // White keys
  118. const USHORT WHITE_DOWN_ARROW        = 0x0028;
  119. const USHORT WHITE_LEFT_ARROW        = 0x0025;
  120. const USHORT WHITE_RIGHT_ARROW        = 0x0027;
  121. const USHORT WHITE_INSERT            = 0x002D;
  122. const USHORT WHITE_DELETE            = 0x002E;
  123. const USHORT WHITE_HOME                = 0x0024;
  124. const USHORT WHITE_END                = 0x0023;
  125. const USHORT WHITE_PGUP                = 0x0021;
  126. const USHORT WHITE_PGDN                = 0x0022;
  127. //const USHORT WHITE_CENTER            = 0x002A;
  128.  
  129. const USHORT CTRL_WHITE_UP_ARROW    = 0x0426;
  130. const USHORT CTRL_WHITE_DOWN_ARROW    = 0x0428;
  131. const USHORT CTRL_WHITE_LEFT_ARROW    = 0x0425;
  132. const USHORT CTRL_WHITE_RIGHT_ARROW    = 0x0427;
  133. const USHORT CTRL_WHITE_INSERT        = 0x042D;
  134. const USHORT CTRL_WHITE_DELETE        = 0x042E;
  135. const USHORT CTRL_WHITE_HOME        = 0x0424;
  136. const USHORT CTRL_WHITE_END            = 0x0423;
  137. const USHORT CTRL_WHITE_PGUP        = 0x0421;
  138. const USHORT CTRL_WHITE_PGDN        = 0x0422;
  139. //const USHORT CTRL_WHITE_CENTER         =0x042A;
  140.  
  141. const USHORT F1                        = 0x0070;    // Function keys
  142. const USHORT F2                        = 0x0071;
  143. const USHORT F3                        = 0x0072;
  144. const USHORT F4                        = 0x0073;
  145. const USHORT F5                        = 0x0074;
  146. const USHORT F6                        = 0x0075;
  147. const USHORT F7                        = 0x0076;
  148. const USHORT F8                        = 0x0077;
  149. const USHORT F9                        = 0x0078;
  150. const USHORT F10                    = 0x0079;
  151. const USHORT F11                    = 0x007A;
  152. const USHORT F12                    = 0x007B;
  153.  
  154. const USHORT SHIFT_F1                = 0x0370;
  155. const USHORT SHIFT_F2                = 0x0371;
  156. const USHORT SHIFT_F3                = 0x0372;
  157. const USHORT SHIFT_F4                = 0x0373;
  158. const USHORT SHIFT_F5                = 0x0374;
  159. const USHORT SHIFT_F6                = 0x0375;
  160. const USHORT SHIFT_F7                = 0x0376;
  161. const USHORT SHIFT_F8                = 0x0377;
  162. const USHORT SHIFT_F9                = 0x0378;
  163. const USHORT SHIFT_F10                = 0x0379;
  164. const USHORT SHIFT_F11                = 0x037A;
  165. const USHORT SHIFT_F12                = 0x037B;
  166.  
  167. const USHORT CTRL_F1                = 0x0470;
  168. const USHORT CTRL_F2                = 0x0471;
  169. const USHORT CTRL_F3                = 0x0472;
  170. const USHORT CTRL_F4                = 0x0473;
  171. const USHORT CTRL_F5                = 0x0474;
  172. const USHORT CTRL_F6                = 0x0475;
  173. const USHORT CTRL_F7                = 0x0476;
  174. const USHORT CTRL_F8                = 0x0477;
  175. const USHORT CTRL_F9                = 0x0478;
  176. const USHORT CTRL_F10                = 0x0479;
  177. const USHORT CTRL_F11                = 0x047A;
  178. const USHORT CTRL_F12                = 0x047B;
  179.  
  180. const USHORT ALT_F1                    = 0x0870;
  181. const USHORT ALT_F2                    = 0x0871;
  182. const USHORT ALT_F3                    = 0x0872;
  183. const USHORT ALT_F4                    = 0x0873;
  184. const USHORT ALT_F5                    = 0x0874;
  185. const USHORT ALT_F6                    = 0x0875;
  186. const USHORT ALT_F7                    = 0x0876;
  187. const USHORT ALT_F8                    = 0x0877;
  188. const USHORT ALT_F9                    = 0x0878;
  189. const USHORT ALT_F10                = 0x0879;
  190. const USHORT ALT_F11                = 0x087A;
  191. const USHORT ALT_F12                = 0x087B;
  192. #endif    // USE_RAW_KEYS
  193.  
  194. #else    // not ZIL_MSWINDOWS 
  195.  
  196. // ----- Raw DOS scan-codes -------------------------------------------------
  197. #ifdef USE_RAW_KEYS
  198. #define ESCAPE                    0x011B    // Miscellaneous keys
  199. #define ENTER                    0x1C0D
  200. #define BACKSPACE                0x0E08
  201. #define CTRL_BACKSPACE            0x0E7F
  202. #define TAB                        0x0F09
  203. #define CTRL_TAB                0x9400
  204. #define BACKTAB                    0x0F00
  205.  
  206. #define CTRL_BREAK                0x0000
  207. #define CTRL_C                    0x2E03
  208.  
  209. #define ALT_ESCAPE                0x0100
  210. #define ALT_PERIOD                0x3400
  211. #define ALT_SPACE                0x3920
  212. #define ALT_WHITE_MINUS            0x8200
  213. #define ALT_WHITE_PLUS            0x8300
  214.  
  215. #define ALT_Q                    0x1000
  216. #define ALT_W                    0x1100
  217. #define ALT_E                    0x1200
  218. #define ALT_R                    0x1300
  219. #define ALT_T                    0x1400
  220. #define ALT_Y                    0x1500
  221. #define ALT_U                    0x1600
  222. #define ALT_I                    0x1700
  223. #define ALT_O                    0x1800
  224. #define ALT_P                    0x1900
  225.  
  226. #define ALT_A                    0x1E00
  227. #define ALT_S                    0x1F00
  228. #define ALT_D                    0x2000
  229. #define ALT_F                    0x2100
  230. #define ALT_G                    0x2200
  231. #define ALT_H                    0x2300
  232. #define ALT_J                    0x2400
  233. #define ALT_K                    0x2500
  234. #define ALT_L                    0x2600
  235.  
  236. #define ALT_Z                    0x2C00
  237. #define ALT_X                    0x2D00
  238. #define ALT_C                    0x2E00
  239. #define ALT_V                    0x2F00
  240. #define ALT_B                    0x3000
  241. #define ALT_N                    0x3100
  242. #define ALT_M                    0x3200
  243.  
  244. #define ALT_1                    0x7800
  245. #define ALT_2                    0x7900
  246. #define ALT_3                    0x7A00
  247. #define ALT_4                    0x7B00
  248. #define ALT_5                    0x7C00
  249. #define ALT_6                    0x7D00
  250. #define ALT_7                    0x7E00
  251. #define ALT_8                    0x7F00
  252. #define ALT_9                    0x8000
  253. #define ALT_0                    0x8100
  254.  
  255. #define GRAY_ENTER                0xE00D    // Grey keys
  256. #define GRAY_UP_ARROW            0x48E0
  257. #define GRAY_DOWN_ARROW            0x50E0
  258. #define GRAY_LEFT_ARROW            0x4BE0
  259. #define GRAY_RIGHT_ARROW        0x4DE0
  260. #define GRAY_INSERT                0x52E0
  261. #define GRAY_DELETE                0x53E0
  262. #define GRAY_HOME                0x47E0
  263. #define GRAY_END                0x4FE0
  264. #define GRAY_PGUP                0x49E0
  265. #define GRAY_PGDN                0x51E0
  266. #define GRAY_DIVIDE                0xE02F
  267. #define GRAY_MULTIPLY            0x372A
  268. #define GRAY_PLUS                0x4E2B
  269. #define GRAY_MINUS                0x4A2D
  270.  
  271. #define CTRL_GRAY_UP_ARROW        0x8DE0
  272. #define CTRL_GRAY_DOWN_ARROW    0x91E0
  273. #define CTRL_GRAY_LEFT_ARROW    0x73E0
  274. #define CTRL_GRAY_RIGHT_ARROW    0x74E0
  275. #define CTRL_GRAY_INSERT        0x92E0
  276. #define CTRL_GRAY_DELETE        0x93E0
  277. #define CTRL_GRAY_HOME            0x77E0
  278. #define CTRL_GRAY_END            0x75E0
  279. #define CTRL_GRAY_PGUP            0x84E0
  280. #define CTRL_GRAY_PGDN            0x76E0
  281. #define CTRL_GRAY_DIVIDE        0x9500
  282. #define CTRL_GRAY_MULTIPLY        0x9600
  283. #define CTRL_GRAY_PLUS            0x9000
  284. #define CTRL_GRAY_MINUS            0x8E00
  285.  
  286. #define ALT_GRAY_UP_ARROW        0x9800
  287. #define ALT_GRAY_DOWN_ARROW        0xA000
  288. #define ALT_GRAY_LEFT_ARROW        0x9B00
  289. #define ALT_GRAY_RIGHT_ARROW    0x9D00
  290. #define ALT_GRAY_INSERT            0xA200
  291. #define ALT_GRAY_DELETE            0xA300
  292. #define ALT_GRAY_HOME            0x9700
  293. #define ALT_GRAY_END            0x9F00
  294. #define ALT_GRAY_PGUP            0x9900
  295. #define ALT_GRAY_PGDN            0xA100
  296. #define ALT_GRAY_DIVIDE            0xA400
  297. #define ALT_GRAY_MULTIPLY        0x3700
  298. #define ALT_GRAY_PLUS            0x4E00
  299. #define ALT_GRAY_MINUS            0x4A00
  300.  
  301. #define WHITE_UP_ARROW            0x4800    // White keys
  302. #define WHITE_DOWN_ARROW        0x5000
  303. #define WHITE_LEFT_ARROW        0x4B00
  304. #define WHITE_RIGHT_ARROW        0x4D00
  305. #define WHITE_INSERT            0x5200
  306. #define WHITE_DELETE            0x5300
  307. #define WHITE_HOME                0x4700
  308. #define WHITE_END                0x4F00
  309. #define WHITE_PGUP                0x4900
  310. #define WHITE_PGDN                0x5100
  311. #define WHITE_CENTER            0x4C00
  312.  
  313. #define CTRL_WHITE_UP_ARROW        0x8D00
  314. #define CTRL_WHITE_DOWN_ARROW    0x9100
  315. #define CTRL_WHITE_LEFT_ARROW    0x7300
  316. #define CTRL_WHITE_RIGHT_ARROW    0x7400
  317. #define CTRL_WHITE_INSERT        0x9200
  318. #define CTRL_WHITE_DELETE        0x9300
  319. #define CTRL_WHITE_HOME            0x7700
  320. #define CTRL_WHITE_END            0x7500
  321. #define CTRL_WHITE_PGUP            0x8400
  322. #define CTRL_WHITE_PGDN            0x7600
  323. #define CTRL_WHITE_CENTER        0x8F00
  324.  
  325. #define F1                        0x3B00    // Function keys
  326. #define F2                        0x3C00
  327. #define F3                        0x3D00
  328. #define F4                        0x3E00
  329. #define F5                        0x3F00
  330. #define F6                        0x4000
  331. #define F7                        0x4100
  332. #define F8                        0x4200
  333. #define F9                        0x4300
  334. #define F10                        0x4400
  335. #define F11                        0x8500
  336. #define F12                        0x8600
  337.  
  338. #define SHIFT_F1                0x5400
  339. #define SHIFT_F2                0x5500
  340. #define SHIFT_F3                0x5600
  341. #define SHIFT_F4                0x5700
  342. #define SHIFT_F5                0x5800
  343. #define SHIFT_F6                0x5900
  344. #define SHIFT_F7                0x5A00
  345. #define SHIFT_F8                0x5B00
  346. #define SHIFT_F9                0x5C00
  347. #define SHIFT_F10                0x5D00
  348. #define SHIFT_F11                0x8700
  349. #define SHIFT_F12                0x8800
  350.  
  351. #define CTRL_F1                    0x5E00
  352. #define CTRL_F2                    0x5F00
  353. #define CTRL_F3                    0x6000
  354. #define CTRL_F4                    0x6100
  355. #define CTRL_F5                    0x6200
  356. #define CTRL_F6                    0x6300
  357. #define CTRL_F7                    0x6400
  358. #define CTRL_F8                    0x6500
  359. #define CTRL_F9                    0x6600
  360. #define CTRL_F10                0x6700
  361. #define CTRL_F11                0x8900
  362. #define CTRL_F12                0x8A00
  363.  
  364. #define ALT_F1                    0x6800
  365. #define ALT_F2                    0x6900
  366. #define ALT_F3                    0x6A00
  367. #define ALT_F4                    0x6B00
  368. #define ALT_F5                    0x6C00
  369. #define ALT_F6                    0x6D00
  370. #define ALT_F7                    0x6E00
  371. #define ALT_F8                    0x6F00
  372. #define ALT_F9                    0x7000
  373. #define ALT_F10                    0x7100
  374. #define ALT_F11                    0x8B00
  375. #define ALT_F12                    0x8C00
  376. #endif    // USE_RAW_KEYS
  377. #endif    // ZIL_MSWINDOWS
  378.  
  379. // ----- Logical events used by Zinc Interface Library ----------------------
  380. const UCHAR HOT_KEY_MAXIMIZE        = 252;
  381. const UCHAR HOT_KEY_MINIMIZE        = 253;
  382. const UCHAR HOT_KEY_SYSTEM            = 254;
  383. const UCHAR HOT_KEY_SUB_WINDOW        = 255;
  384.  
  385. const int L_EXIT                    = 1000;        // general logical events
  386. const int L_VIEW                    = 1001;
  387. const int L_SELECT                    = 1002;
  388. const int L_BEGIN_SELECT            = 1003;
  389. const int L_CONTINUE_SELECT            = 1004;
  390. const int L_END_SELECT                = 1005;
  391. const int L_BEGIN_ESCAPE            = 1006;
  392. const int L_CONTINUE_ESCAPE            = 1007;
  393. const int L_END_ESCAPE                = 1008;
  394. const int L_HELP                    = 1009;
  395. const int L_CANCEL                    = 1010;
  396. const int L_EXIT_FUNCTION            = 1011;
  397.  
  398. const int L_RESTORE                    = 1020;        // window manager
  399. const int L_MOVE                    = 1021;
  400. const int L_SIZE                    = 1022;
  401.  
  402. const int L_UP                        = 1050;        // window object
  403. const int L_DOWN                    = 1051;
  404. const int L_LEFT                    = 1052;
  405. const int L_RIGHT                    = 1053;
  406. const int L_PREVIOUS                = 1054;
  407. const int L_NEXT                    = 1055;
  408. const int L_FIRST                    = 1056;
  409. const int L_LAST                    = 1057;
  410. const int L_TOP                        = 1056;
  411. const int L_BOTTOM                    = 1057;
  412. const int L_PGUP                    = 1058;
  413. const int L_PGDN                    = 1059;
  414.  
  415. const int L_BEGIN_MARK                = 1101;    // string
  416. const int L_CONTINUE_MARK            = 1102;
  417. const int L_END_MARK                = 1103;
  418. const int L_CUT                        = 1104;
  419. const int L_PASTE                    = 1105;
  420. const int L_CUT_PASTE                = 1106;
  421. const int L_MARK                    = 1107;
  422. const int L_COPY_MARK                = 1127;
  423. const int L_DELETE                    = 1108;
  424. const int L_DELETE_WORD                = 1109;
  425. const int L_DELETE_EOL                = 1110;
  426. const int L_INSERT_TOGGLE            = 1114;
  427. const int L_WORD_LEFT                = 1115;
  428. const int L_WORD_RIGHT                = 1116;
  429. const int L_BOL                        = 1117;
  430. const int L_EOL                        = 1118;
  431.  
  432. // ----- OBJECT IDENTIFICATIONS - THESE NUMBERS CANNOT BE CHANGED -----------
  433.  
  434. const int ID_END                    = -1;    // Special value
  435. //      int ID_SCREEN                    = 0;    // Defined in ui_dsp.hpp
  436.  
  437. // Simple object types: 1 through 999
  438. const int ID_BORDER                    = 1;
  439. const int ID_BUTTON                    = 2;
  440. const int ID_DATE                    = 3;
  441. const int ID_FORMATTED_STRING        = 4;
  442. const int ID_ICON                    = 5;
  443. const int ID_INTEGER                = 6;
  444. const int ID_MAXIMIZE_BUTTON        = 7;
  445. const int ID_MINIMIZE_BUTTON        = 8;
  446. const int ID_NUMBER                    = 9;
  447. const int ID_POP_UP_WINDOW            = 10;
  448. const int ID_PROMPT                    = 11;
  449. const int ID_REAL                    = 12;
  450. const int ID_STRING                    = 13;
  451. const int ID_TEXT                    = 15;
  452. const int ID_TIME                    = 16;
  453. const int ID_TITLE                    = 17;
  454. const int ID_WINDOW_OBJECT            = 18;
  455. const int ID_POP_UP_ITEM            = 19;
  456. const int ID_HELP_CONTEXT            = 20;
  457.  
  458. // Complex object types: 1000 through 1999
  459. const int ID_MATRIX                    = 1000;
  460. const int ID_POP_UP_MENU            = 1002;
  461. const int ID_PULL_DOWN_ITEM            = 1003;
  462. const int ID_PULL_DOWN_MENU            = 1004;
  463. const int ID_SCROLL_BAR                = 1005;
  464. const int ID_SYSTEM_BUTTON            = 1006;
  465. const int ID_WINDOW                    = 1007;
  466.  
  467. // Special identifications: 2000 through 2999
  468. const int ID_DISPLAY                = 2000;
  469. const int ID_EVENT_MANAGER            = 2001;
  470. const int ID_WINDOW_MANAGER            = 2002;
  471.  
  472. const int ID_OUTLINE                = 2100;
  473. const int ID_WHITE_SHADOW            = 2101;
  474. const int ID_LIGHT_SHADOW            = 2102;
  475. const int ID_DARK_SHADOW            = 2103;
  476. const int ID_BLACK_SHADOW            = 2104;
  477. const int ID_MENU                    = 2105;
  478. const int ID_MENU_ITEM                = 2106;
  479.  
  480. // ----- Palette flags ------------------------------------------------------
  481.  
  482. const USHORT PM_ANY                    = 0x0000;
  483. const USHORT PM_ACTIVE                = 0x0001;
  484. const USHORT PM_INACTIVE            = 0x0002;
  485. const USHORT PM_SELECTED            = 0x0004;
  486. const USHORT PM_CURRENT                = 0x0008;
  487. const USHORT PM_INVALID                = 0x0010;
  488. const USHORT PM_VIEW                = 0x0020;
  489. const USHORT PM_HOT_KEY                = 0x0040;
  490. const USHORT PM_NON_SELECTABLE        = 0x0080;
  491.  
  492. // ----- UI_EVENT_MAP -------------------------------------------------------
  493. // ----- functions found in MAP.CPP -----------------------------------------
  494.  
  495. struct EXPORT UI_EVENT_MAP
  496. {
  497.     // Fields described in UI_EVENT_MAP reference chapter.
  498.     int windowID;
  499.     int logicalValue;
  500.     int eventType;
  501.     USHORT rawCode;
  502. };
  503.  
  504. extern UI_EVENT_MAP *_eventMapTable;
  505. extern UI_EVENT_MAP *_hotKeyMapTable;
  506.  
  507. extern int EXPORT MapEvent(UI_EVENT_MAP *mapTable, const UI_EVENT &event,
  508.     int currentID, int id1 = ID_WINDOW_OBJECT, int id2 = ID_WINDOW_OBJECT,
  509.     int id3 = ID_WINDOW_OBJECT, int id4 = ID_WINDOW_OBJECT,
  510.     int id5 = ID_WINDOW_OBJECT);
  511.  
  512. // ----- UI_PALETTE_MAP -----------------------------------------------------
  513. // ----- functions found in MAP1.CPP ----------------------------------------
  514.  
  515. struct EXPORT UI_PALETTE_MAP
  516. {
  517.     // Fields described in UI_PALETTE_MAP reference chapter.
  518.     int windowID;
  519.     int logicalValue;
  520.     UI_PALETTE palette;
  521. };
  522.  
  523. extern UI_PALETTE_MAP *_normalPaletteMapTable;
  524. extern UI_PALETTE_MAP *_helpPaletteMapTable;
  525. extern UI_PALETTE_MAP *_errorPaletteMapTable;
  526.  
  527. extern UI_PALETTE * EXPORT MapPalette(UI_PALETTE_MAP *mapTable, int logicalValue,
  528.     int id1 = ID_WINDOW_OBJECT, int id2 = ID_WINDOW_OBJECT,
  529.     int id3 = ID_WINDOW_OBJECT, int id4 = ID_WINDOW_OBJECT,
  530.     int id5 = ID_WINDOW_OBJECT);
  531.  
  532. #endif // UI_MAP_HPP
  533.