home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / pascal / wwg-crt / crt.i < prev    next >
Text File  |  1997-07-14  |  3KB  |  149 lines

  1. { Crt.i for PCQ-Pascal Copyright © 1995 by Andreas Tetzl }
  2. { Version 1.0 (15.04.1995) }
  3.  
  4. {
  5.    Reworked, extended 4. July 1997 by Walter Weber-Groß.
  6.    
  7.    GetConSize is now substituted by MaxX and MaxY, which
  8.    return the maximum number of chars in width and height depending
  9.    on the current cli size.
  10.    
  11.    This is done without using intuitionbase. At this point i have and
  12.    want to mention Hothelp by Hartmut Stein and Michael Berling that
  13.    gave me a first kick about ConUnit. In Ralph Babels AMIGA Guru Book
  14.    i found the information about the Lock() independent access to the
  15.    InfoData structure, which made it possible to get the information
  16.    about the current cli char postition.
  17.    
  18.    So, many useful functions and procedures are now available to gain
  19.    full control over char cursor position including a boundary checking.
  20.    
  21.    Additionally you've got access to the window structure associated
  22.    with the current cli window via the element cu_Window of the
  23.    ConUnit structure.
  24.    
  25.    With that i could realize the function ReadKey, which allows to press
  26.    a key without displaying it in the console window.
  27.    
  28.    Grateful thanks to Patrick Quaid for PCQ, Nils Sjoholm for keeping PCQ
  29.    alive and last not least Andreas Tetzl who gave me a start with his crt!
  30. }
  31.  
  32. const
  33.  
  34.    TS_PLAIN     = 0;
  35.    TS_BOLD      = 1;
  36.    TS_ITALIC    = 3;
  37.    TS_UNDERLINE = 4;
  38.    
  39.    {  Eine Konstante für ConBackground, und sie besagt, daß die aktuelle Zeichen-
  40.       hintergrundfarbe als Fenster-Hintergrundfarbe gesetzt werden soll;
  41.       Pass this constant to ConBackground (s. b.) if you want to have set the new
  42.       window background colour the same as the actual cell background colour }
  43.    TEXT_BACKGROUND = -1;
  44.    
  45. { Cursorpositionen }
  46.  
  47. function WhereX : integer;
  48.  External;
  49.  
  50. function WhereY : integer;
  51.  External;
  52.  
  53. function MaxX : integer;
  54.  External;
  55.  
  56. function MaxY : integer;
  57.  External;
  58.  
  59. { Cursorpositionierungen }
  60.  
  61. procedure GotoXY(x, y : integer);
  62.  External;
  63.  
  64. procedure GotoX(x : integer);
  65.  External;
  66.  
  67. procedure GotoY(y : integer);
  68.  External;
  69.  
  70. procedure GoUp(n : integer);
  71.  External;
  72.  
  73. procedure GoDown(n : integer);
  74.  External;
  75.  
  76. procedure GoLeft(n : integer);
  77.  External;
  78.  
  79. procedure GoRight(n : integer);
  80.  External;
  81.  
  82. { Cursordarstellungen }
  83.  
  84. procedure CursorOff;
  85.  External;
  86.  
  87. procedure CursorOn;
  88.  External;
  89.  
  90. { Spezielle Consolen-Aktionen }
  91.  
  92. procedure Bell;
  93.  External;
  94.  
  95. procedure ClrScr;
  96.  External;
  97.  
  98. procedure ConReset;
  99.  External;
  100.  
  101. { Tastatureingaben }
  102.  
  103. function Break : boolean;
  104.  External;
  105.  
  106. function ReadKey : char;
  107.  External;
  108.  
  109. { Farben }
  110.  
  111. function GetTextColor : byte;
  112.  External;
  113.  
  114. function GetTextBackground : byte;
  115.  External;
  116.  
  117. procedure TextColor(fgpen : byte);
  118.  External;
  119.  
  120. procedure TextBackground(bgpen : byte);
  121.  External;
  122.  
  123. procedure ConBackground(bgpen : byte);
  124.  External;
  125.  
  126. { Textdarstellungen }
  127.  
  128. procedure TextReset;
  129.  External;
  130.  
  131. procedure TextStyle(style : byte);
  132.  External;
  133.  
  134. procedure TextMode(style, fgpen, bgpen : byte);
  135.  External;
  136.  
  137. { Text-Zentrierung }
  138.  
  139. procedure CenterText(txt : string);
  140.  External;
  141.  
  142. { Text-Grafiken }
  143.  
  144. procedure TextLine(x1, y1, x2, y2 : Integer; c : Char);
  145.  External;
  146.  
  147. procedure TextRectFill(x, y, w, h : Integer; c : Char);
  148.  External;
  149.