home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / APCLU.ZIP / APCLU-1.INC next >
Encoding:
Text File  |  1980-01-01  |  2.5 KB  |  109 lines

  1.  
  2. procedure clear_status;
  3. begin
  4.       gotoxy(1,25);
  5.       write(ceol);
  6. end;
  7.  
  8. procedure set_status( l1,l2,l3,l4,l5,l6,l7 : string10);
  9.     begin
  10.     gotoxy(1,25);
  11.  
  12.     if l1 <> '' then write(HI,l1,LO) else write('          '); write(' ');
  13.     if l2 <> '' then write(HI,l2,LO) else write('          '); write(' ');
  14.     if l3 <> '' then write(HI,l3,LO) else write('          '); write(' ');
  15.     if l4 <> '' then write(HI,l4,LO) else write('          '); write(' ');
  16.     if l5 <> '' then write(HI,l5,LO) else write('          '); write(' ');
  17.     if l6 <> '' then write(HI,l6,LO) else write('          '); write(' ');
  18.     if l7 <> '' then write(HI,l7,LO) else write('          '); write(' ');
  19.     end;
  20.  
  21.  
  22.  
  23. procedure w_erase;
  24. { frame and clear window }
  25. var x,y : integer;
  26. begin
  27. if w_table.x1 <> -1 then
  28.   with w_table do begin
  29.     for y := y1 + 1 to y2 - 1 do begin
  30.         gotoxy(x1,y);
  31.         write(#$96,'':x2-x1-2,#$96);
  32.     end;
  33.     gotoxy(x1,y1); write(#$98);
  34.     for x := 3 to x2-x1 do write(#$95); write(#$99);
  35.     gotoxy(x1,y2); write(#$9A);
  36.     for x := 3 to x2-x1 do write(#$95); write(#$9B);
  37.     gotoxy(x1+1,y1+1);
  38.     currx := x1+1; curry := y1+1;
  39. end;
  40. end;
  41.  
  42. procedure w_delete;
  43. begin
  44. end;
  45.  
  46. procedure w_make   (nx1,nx2,ny1,ny2 : integer);  { boundrys }
  47.  { make the sub-window:
  48.          save current screen in 'overwrote'
  49.          set defaults in w_table
  50.          save old cursor position
  51.          call w_erase (above)
  52.  
  53.  }
  54. var x, y : integer;
  55. begin
  56. if w_table.x1 <> -1 then w_delete;
  57. with w_table do begin
  58.   x1 := nx1;
  59.   x2 := nx2;
  60.   y1 := ny1;
  61.   y2 := ny2;
  62.   w_erase;
  63. end;
  64. end;
  65.  
  66. procedure w_writeln;
  67. begin
  68. if w_table.x1 <> -1 then
  69.   with w_table do begin
  70.     currx := x1 + 1;
  71.     if curry >= y2-1 then curry := y1+1
  72.     else curry := curry + 1;
  73.   end;
  74. end;
  75.  
  76. procedure w_write_c(ch : char);
  77. begin
  78. if w_table.x1 <> -1 then
  79.   with w_table do begin
  80.     gotoxy(currx,curry);
  81.     write(ch);
  82.     if currx >= x2-1 then begin
  83.         currx := x1;
  84.         if curry >= y2-1 then
  85.             curry := y1+1
  86.         else curry := curry + 1;
  87.     end
  88.     else currx := currx + 1;
  89.   end;
  90. end;
  91.  
  92. procedure w_write_s(s : maxstr);
  93. var x : integer;
  94. begin
  95. with w_table do begin
  96. for x := 1 to length(s) do w_write_c(s[x]);
  97. end;
  98. end;
  99.  
  100. procedure w_gotoxy (x,y : integer);
  101. begin
  102. if w_table.x1 <> -1 then
  103.   with w_table do begin
  104.     currx := x1 + x;
  105.     curry := y1 + y;
  106.     gotoxy(currx,curry);
  107.   end;
  108. end;
  109.