home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / calculat / rpn30src.zip / RPNIO.H < prev    next >
C/C++ Source or Header  |  1990-05-25  |  3KB  |  141 lines

  1. /**
  2.  ** RPNIO.H
  3.  **
  4.  ** Dimensions & colors for the calculator display window & help windows.
  5.  ** For version 2, these two defines become global variables in "rpn.h":
  6.  **    #define TOP       6
  7.  **    #define LEFT      39
  8.  **
  9.  ** For v2.3, these defines become global variables in "rpn.h":
  10.  **    #define D_BKGND   BLACK
  11.  **    #define D_BORDER  LIGHTGRAY
  12.  **    #define D_NUM     YELLOW
  13.  **    #define D_FTN     CYAN
  14.  **
  15.  ** 90.05.23 v3.0
  16.  **    Complete defines for the function-keys and some others;
  17.  **    Help-window defines.  Display-window stuff moved out.
  18.  **/
  19. #ifndef RPNIO_H
  20. #define RPNIO_H
  21.  
  22.  
  23. #if (__TURBOC__ < 0x0200)
  24. #define NEWLINE "\n"
  25. #else
  26. #define NEWLINE "\n\r"
  27. #endif
  28.  
  29. /*
  30. | Cursor keys, used to move the display around.
  31. | These consist of the 2nd byte of the extended scan code, concatenated
  32. | onto 0x1b (the 1st byte) to form a legal signed integer.
  33. */
  34. #define MOVELEFT    0x1b4b
  35. #define MOVERIGHT    0x1b4d
  36. #define MOVEUP        0x1b48
  37. #define MOVEDOWN    0x1b50
  38.     /* a.k.a. */
  39. #define LARR    0x1b4b
  40. #define RARR    0x1b4d
  41. #define UARR    0x1b48
  42. #define DARR    0x1b50
  43.  
  44. /*
  45. | f1..f10 keys
  46. | These consist of the 2nd byte of the extended scan code, concatenated
  47. | onto 0x1b (to form a legal signed integer).
  48. */
  49. #define FTN_1    0x1b3b
  50. #define FTN_2    0x1b3c
  51. #define FTN_3    0x1b3d
  52. #define FTN_4    0x1b3e
  53. #define FTN_5    0x1b3f
  54. #define FTN_6    0x1b40
  55. #define FTN_7    0x1b41
  56. #define FTN_8    0x1b42
  57. #define FTN_9    0x1b43
  58. #define FTN_10    0x1b44
  59.  
  60. #define S_FTN_1        0x1b54
  61. #define S_FTN_2        0x1b55
  62. #define S_FTN_3        0x1b56
  63. #define S_FTN_4        0x1b57
  64. #define S_FTN_5        0x1b58
  65. #define S_FTN_6        0x1b59
  66. #define S_FTN_7        0x1b5a
  67. #define S_FTN_8        0x1b5b
  68. #define S_FTN_9        0x1b5c
  69. #define S_FTN_10    0x1b5d
  70.  
  71. #define C_FTN_1        0x1b5e
  72. #define C_FTN_2        0x1b5f
  73. #define C_FTN_3        0x1b60
  74. #define C_FTN_4        0x1b61
  75. #define C_FTN_5        0x1b62
  76. #define C_FTN_6        0x1b63
  77. #define C_FTN_7        0x1b64
  78. #define C_FTN_8        0x1b65
  79. #define C_FTN_9        0x1b66
  80. #define C_FTN_10    0x1b67
  81.  
  82. #define A_FTN_1        0x1b68
  83. #define A_FTN_2        0x1b69
  84. #define A_FTN_3        0x1b6a
  85. #define A_FTN_4        0x1b6b
  86. #define A_FTN_5        0x1b6c
  87. #define A_FTN_6        0x1b6d
  88. #define A_FTN_7        0x1b6e
  89. #define A_FTN_8        0x1b6f
  90. #define A_FTN_9        0x1b70
  91. #define A_FTN_10    0x1b71
  92.  
  93. /*
  94. | Other special keys.  All the special keys are listed in the doco.
  95. | (scancode.txt, maybe?)
  96. */
  97. #define DEL    0x1b53
  98. #define INS    0x1b52
  99. #define PGUP    0x1b49
  100. #define PGDN    0x1b51
  101. #define END    0x1b4f
  102. #define HOME    0x1b47
  103.  
  104. #define SCROLL_LOCK    0x10        /* mask for kbd_status byte */
  105.  
  106.  
  107. /**********  Default frame colors  **************/
  108.  
  109. #define DBKGND BLACK
  110. #define DBORD  LIGHTGRAY
  111. #define DNUM   YELLOW
  112. #define DFTN   CYAN
  113. #define DOOPS  LIGHTRED
  114.  
  115.  
  116. /**********  defines for Help windows  **********/
  117.  
  118. #define  H_BKGND   RED
  119. #define  H_BORDER  BLACK
  120. #define  H_TITLE   YELLOW
  121. #define  H_LABEL   LIGHTCYAN
  122. #define  H_TEXT    WHITE
  123. #define  H_NUM     LIGHTGRAY
  124.  
  125. #define H_LEFT    1
  126. #define H_TOP     1
  127. #define H_WIDTH  40
  128. #define H_DEPTH  24
  129. #define H_RIGHT  (H_LEFT-1 + H_WIDTH)
  130. #define H_BOTTOM  (H_TOP-1 + H_DEPTH)
  131.  
  132. #define HT_OFF   16   /** Relative location of the definitions for **/
  133. #define HL_OFF   11   /** the last block of commands (lower right) **/
  134.  
  135. #define H2_LEFT  (H_RIGHT+1)
  136. #define H2_RIGHT (H2_LEFT-1 + H_WIDTH)
  137. #define H2_TOP    H_TOP
  138. #define H2_BOTTOM (H2_TOP-1 + 5)
  139.  
  140. #endif  /* RPNIO_H */
  141.