home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol285 / graphics.m < prev    next >
Encoding:
Text File  |  1986-12-22  |  7.5 KB  |  186 lines

  1. ;**   Last revision: May 27, 1986 at 7:59
  2. ;**
  3. ;**  by: H.M. Van Tassell, a NON-copywrited public domain contribution!
  4. ;** 
  5. ;**    These next 6 sets of macros assign single or double line graphics,
  6. ;**    Double/Single, Single/Double, or, other graphics, or the regular
  7. ;**    number functions to the numeric key pad keys
  8. ;**
  9.  
  10. (macro slines
  11.     (
  12.       (assign_to_key "#18231" "no_s7")       ;** Assigned to NumbPad 7.
  13.       (assign_to_key "#18488" "no_s8")             ;** Assigned to NumbPad 8. 
  14.         (assign_to_key "#18745" "no_s9")            ;** Assigned to NumbPad 9. 
  15.         (assign_to_key "#19252" "no_s4")             ;** Assigned to NumbPad 4.
  16.       (assign_to_key "#19509" "no_s5")       ;** Assigned to NumbPad 5.
  17.         (assign_to_key "#19766" "no_s6")            ;** Assigned to NumbPad 6. 
  18.       (assign_to_key "#20273" "no_s1")       ;** Assigned to NumbPad 1.
  19.         (assign_to_key "#20530" "no_s2")             ;** Assigned to NumbPad 2. 
  20.         (assign_to_key "#20787" "no_s3")            ;** Assigned to NumbPad 3.
  21.       (assign_to_key "#21040" "no_s0")       ;** Assigned to NumbPad 0.
  22.       (assign_to_key "#21294" "no_sp")       ;** Assigned to NumbPad ..
  23.         (message "┌┬┐  ├┼┤  └┴┘  │─ line graphics on keypad.")
  24.     )
  25. )
  26. (macro no_s7 (_insert "┌"))
  27. (macro no_s8 (_insert "┬"))
  28. (macro no_s9 (_insert "┐"))
  29. (macro no_s4 (_insert "├"))
  30. (macro no_s5 (_insert "┼"))
  31. (macro no_s6 (_insert "┤"))
  32. (macro no_s1 (_insert "└"))
  33. (macro no_s2 (_insert "┴"))
  34. (macro no_s3 (_insert "┘"))
  35. (macro no_s0 (_insert "│"))
  36. (macro no_sp (_insert "─"))
  37.  
  38. (macro dlines
  39.     (
  40.       (assign_to_key "#18231" "no_d7")       ;** Assigned to NumbPad 7.
  41.       (assign_to_key "#18488" "no_d8")         ;** Assigned to NumbPad 8. 
  42.         (assign_to_key "#18745" "no_d9")            ;** Assigned to NumbPad 9. 
  43.         (assign_to_key "#19252" "no_d4")             ;** Assigned to NumbPad 4.
  44.       (assign_to_key "#19509" "no_d5")       ;** Assigned to NumbPad 5.
  45.         (assign_to_key "#19766" "no_d6")            ;** Assigned to NumbPad 6. 
  46.       (assign_to_key "#20273" "no_d1")       ;** Assigned to NumbPad 1.
  47.         (assign_to_key "#20530" "no_d2")             ;** Assigned to NumbPad 2. 
  48.         (assign_to_key "#20787" "no_d3")            ;** Assigned to NumbPad 3.
  49.       (assign_to_key "#21040" "no_d0")       ;** Assigned to NumbPad 0.
  50.       (assign_to_key "#21294" "no_dp")       ;** Assigned to NumbPad ..
  51.         (message "╔╦╗  ╠╬╣  ╚╩╝  ║═ line graphics on keypad.")
  52.    )                           
  53. )
  54. (macro no_d7 (_insert "╔"))
  55. (macro no_d8 (_insert "╦"))
  56. (macro no_d9 (_insert "╗"))
  57. (macro no_d4 (_insert "╠"))
  58. (macro no_d5 (_insert "╬"))
  59. (macro no_d6 (_insert "╣"))
  60. (macro no_d1 (_insert "╚"))
  61. (macro no_d2 (_insert "╩"))
  62. (macro no_d3 (_insert "╝"))
  63. (macro no_d0 (_insert "║"))
  64. (macro no_dp (_insert "═"))
  65.  
  66. (macro graphics
  67.     (
  68.       (assign_to_key "#18231" "no_o7")       ;** Assigned to NumbPad 7.
  69.       (assign_to_key "#18488" "no_o8")         ;** Assigned to NumbPad 8. 
  70.         (assign_to_key "#18745" "no_o9")            ;** Assigned to NumbPad 9. 
  71.         (assign_to_key "#19252" "no_o4")             ;** Assigned to NumbPad 4.
  72.       (assign_to_key "#19509" "no_o5")       ;** Assigned to NumbPad 5.
  73.         (assign_to_key "#19766" "no_o6")            ;** Assigned to NumbPad 6. 
  74.       (assign_to_key "#20273" "no_o1")       ;** Assigned to NumbPad 1.
  75.         (assign_to_key "#20530" "no_o2")             ;** Assigned to NumbPad 2. 
  76.         (assign_to_key "#20787" "no_o3")            ;** Assigned to NumbPad 3.
  77.       (assign_to_key "#21040" "no_o0")       ;** Assigned to NumbPad 0.
  78.       (assign_to_key "#21294" "no_op")       ;** Assigned to NumbPad ..
  79.         (message "░▒▓  █▌▐▄▀  --  ─┘graphics on keypad.")
  80.    )                           
  81. )
  82. (macro no_o7 (_insert "░"))   
  83. (macro no_o8 (_insert "▒"))   
  84. (macro no_o9 (_insert "▓"))   
  85. (macro no_o4 (_insert "█"))   
  86. (macro no_o5 (_insert "▌▐"))  
  87. (macro no_o6 (_insert "▄▀"))  
  88. (macro no_o1 (_insert "-"))  
  89. (macro no_o2 (_insert ""))         
  90. (macro no_o3 (_insert "-"))  
  91. (macro no_o0 (_insert ""))  
  92. (macro no_op (_insert "─┘"))
  93.  
  94. (macro dslines
  95.     (
  96.       (assign_to_key "#18231" "no_ds7")      ;** Assigned to NumbPad 7.
  97.       (assign_to_key "#18488" "no_ds8")         ;** Assigned to NumbPad 8. 
  98.         (assign_to_key "#18745" "no_ds9")        ;** Assigned to NumbPad 9. 
  99.         (assign_to_key "#19252" "no_ds4")        ;** Assigned to NumbPad 4.
  100.       (assign_to_key "#19509" "no_ds5")      ;** Assigned to NumbPad 5.
  101.         (assign_to_key "#19766" "no_ds6")        ;** Assigned to NumbPad 6. 
  102.       (assign_to_key "#20273" "no_ds1")      ;** Assigned to NumbPad 1.
  103.         (assign_to_key "#20530" "no_ds2")        ;** Assigned to NumbPad 2. 
  104.         (assign_to_key "#20787" "no_ds3")        ;** Assigned to NumbPad 3.
  105.       (assign_to_key "#21040" "no_ds0")      ;** Assigned to NumbPad 0.
  106.       (assign_to_key "#21294" "no_dsp")      ;** Assigned to NumbPad ..
  107.         (message "╒╤╕  ╞╪╡  ╘╧╛  │═  line graphics on keypad.")
  108.    )                           
  109. )
  110. (macro no_ds7 (_insert "╒"))
  111. (macro no_ds8 (_insert "╤"))
  112. (macro no_ds9 (_insert "╕"))
  113. (macro no_ds4 (_insert "╞")) 
  114. (macro no_ds5 (_insert "╪")) 
  115. (macro no_ds6 (_insert "╡")) 
  116. (macro no_ds1 (_insert "╘")) 
  117. (macro no_ds2 (_insert "╧")) 
  118. (macro no_ds3 (_insert "╛"))
  119. (macro no_ds0 (_insert "│"))
  120. (macro no_dsp (_insert "═"))
  121.  
  122. (macro sdlines
  123.     (
  124.       (assign_to_key "#18231" "no_sd7")      ;** Assigned to NumbPad 7.
  125.       (assign_to_key "#18488" "no_sd8")         ;** Assigned to NumbPad 8. 
  126.         (assign_to_key "#18745" "no_sd9")        ;** Assigned to NumbPad 9. 
  127.         (assign_to_key "#19252" "no_sd4")        ;** Assigned to NumbPad 4.
  128.       (assign_to_key "#19509" "no_sd5")      ;** Assigned to NumbPad 5.
  129.         (assign_to_key "#19766" "no_sd6")        ;** Assigned to NumbPad 6. 
  130.       (assign_to_key "#20273" "no_sd1")      ;** Assigned to NumbPad 1.
  131.         (assign_to_key "#20530" "no_sd2")        ;** Assigned to NumbPad 2. 
  132.         (assign_to_key "#20787" "no_sd3")        ;** Assigned to NumbPad 3.
  133.       (assign_to_key "#21040" "no_sd0")      ;** Assigned to NumbPad 0.
  134.       (assign_to_key "#21294" "no_sdp")      ;** Assigned to NumbPad ..
  135.         (message "╓╥╖  ╟╫╢  ╙╨╜  ║─  line graphics on keypad.")
  136.    )                           
  137. )
  138. (macro no_sd7 (_insert "╓"))
  139. (macro no_sd8 (_insert "╥"))          
  140. (macro no_sd9 (_insert "╖"))          
  141. (macro no_sd4 (_insert "╟"))          
  142. (macro no_sd5 (_insert "╫"))          
  143. (macro no_sd6 (_insert "╢"))          
  144. (macro no_sd1 (_insert "╙"))
  145. (macro no_sd2 (_insert "╨"))
  146. (macro no_sd3 (_insert "╜"))
  147. (macro no_sd0 (_insert "║"))
  148. (macro no_sdp (_insert "─"))
  149.  
  150. (macro numbers
  151.     (
  152.       (assign_to_key "#18231" "self_insert")   ;** Assigned to NumbPad 7.
  153.       (assign_to_key "#18488" "self_insert")      ;** Assigned to NumbPad 8. 
  154.         (assign_to_key "#18745" "self_insert")      ;** Assigned to NumbPad 9. 
  155.         (assign_to_key "#19252" "self_insert")      ;** Assigned to NumbPad 4.
  156.       (assign_to_key "#19509" "self_insert")   ;** Assigned to NumbPad 5.
  157.         (assign_to_key "#19766" "self_insert")      ;** Assigned to NumbPad 6. 
  158.       (assign_to_key "#20273" "self_insert")   ;** Assigned to NumbPad 1.
  159.         (assign_to_key "#20530" "self_insert")      ;** Assigned to NumbPad 2. 
  160.         (assign_to_key "#20787" "self_insert")      ;** Assigned to NumbPad 3.
  161.       (assign_to_key "#21040" "self_insert")   ;** Assigned to NumbPad 0.
  162.       (assign_to_key "#21294" "self_insert")   ;** Assigned to NumbPad ..
  163.         (message "Numbers 0-9 on keypad.")
  164.     )
  165. )
  166.  
  167. ;**
  168. ;** either insert either before cursor or overwrite 
  169. ;**
  170. (macro _insert
  171.    (
  172.       (string char)
  173.       (get_parm 0 char)
  174.       (if (inq_mode)
  175.          (insert char)
  176.       ;else
  177.          (
  178.             (delete_char)
  179.             (insert char)
  180.          )
  181.       )
  182.    )
  183. )
  184.  
  185.                                                         
  186.