uses VenomGFX,Wokna32,FNfont2;
{$INCLUDE defines.inc}

type
PKonOkno = ^TKonOkno;
TKonOkno = object(Tokno_s_tlacitky)
kon:Pkonzole;
   Constructor init;
   Procedure Akce(var i:longint);virtual;
   Destructor Done;virtual;
end;


Constructor TKonOkno.Init;
begin
inherited Init(100,100,500,400,'Konzolove okno',w_OK+#13#10+w_CANCEL);
kon:=New(PKonzole,Init(x+20,y+25,400,300,80,20,fn_vga16,0,50));
Pridej(kon);
kon^.Print('Konzole bezi...'#13#10);
kon^.Vstup_z_klavesnice(true);
end;


Procedure TKonOkno.Akce(var i:longint);
var s:string;
begin
if i=100 then
   begin
   kon^.hotovo:=false;
   s:=kon^.hodnota^.vs;
   if s<>'' then kon^.PrintS('Vstup prijat! : '+s+#13#10);
   kon^.hodnota^.Smaz;
   kon^.je_kurzor_videt:=true;
   kon^.Zobraz;
   end;
end;


Destructor TKonOkno.Done;
begin
inherited Done;
end;


var ko:PKonOkno;
     v:virtualwindow;
     t:file;
     a,b:longint;
     p:pchar;





begin
ObvyklyStart;

ko:=New(PKonOkno,Init);
ko^.kon^.vyznam:=100;

ko^.Zobraz;
{readln;}
ko^.Run;
Dispose(ko,Done);

ObvyklyKonec;
end.
