NBPrg40. FILES.PAS. MiniOS. OpenSource.

NBPrg40. FILES.PAS. MiniOS. OpenSource.
***************************************

{ Nikita Beloshenko (GNU) 2013  }

{ NBPRG23 -> ... -> NBPRG40 }

{ Nikita Beloshenko (GNU) 2012 }

Unit Files;

(******************************************************
 *                                                    *
 *   FILES.PAS                                        *
 *                                                    *
 *   Files.                                           *
 *   This is graphical unit for NBPrg23.              *
 *   NBPrg23 is graphical subsystem for               *
 *   NBPrg40(and also NBPrg27-33,34,35,36,37,38,39).  *
 *   Files is not File Manager(FM), just              *
 *   interface for filews (graphical FM).             *
 *                                                    *
 ******************************************************)

Interface

Uses Graph, Crt, filews;

Procedure DoFiles;

Implementation

Uses NBPRG_I;


Procedure DrawRectangle(Var x1,y1,x2,y2:Integer);
Begin
  Line(x1,y1,x2,y1);
  Line(x2,y1,x2,y2);
  Line(x2,y2,x1,y2);
  Line(x1,y2,x1,y1);
End;

Procedure DoFiles;
Var
  x1,y1,x2,y2 : Integer;
  ch1 : Char;
Begin
  x1 := 200; x2 := 300;
  y1 := 200; y2 := 300;

  SetFillStyle(0,SolidFill);
  Bar(x1,y1,x2,y2);

  ch1:=' ';

  { WS FILE MANAGER CALL ...}
  file_panel;

  { NBPRG GRAPHICAL INTERFACE REBUILDING. }
  NBPRG_I_reload_interf;

  While Ord(ch1)<>27 Do
  Begin
    SetColor(2);
    DrawRectangle(x1,y1,x2,y2);
    SetTextStyle(2, HorizDir, 5);
    OutTextXY(x1 + (x2-x1) Div 4,
              y1 + (y2-y1) Div 4,'Files');

    ch1 := ReadKey;
  End;
  SetFillStyle(0,SolidFill);
  Bar(x1,y1,x2,y2);
End;

End.