                              8.

                              .

     孨 ꥪ⭮-ਥ஢  ணࠬ஢     Turbo
Vision      ᯮᮡ 樨     
ᯮᮡ ஥ 易  ꥪ.   ᫨ 
  ࠭ ꥪ  ᪥?
      ᫥ ६  ࠭       
 뫠  ,        Turbo  Vision  設⢥
砥 室   ꥪ⮢.  筮,      ⤥
   ꥪ      .   ᪮ ᮢ⭮
࠭       訥  २⢠,  ࠧ  
᭮ 뫮  蠣 .
          Turbo Vision  -      ஡?
  ⮣ ࠧࠡ⠭ ⮪.
     ⮪ Turbo Vision -     ꥪ⮢    ।
ᯮᮡ ࠭:  筮  䠩, EMS, ᫥⥫쭮  
஬ 㣮 ன⢥.  ⮪  ࠡ뢠  /    ஢
ꥪ,      ஢ .     ꥪ Turbo
Vision,  室  ᯥ  ࠡ      ,
  ।.


                       : / ꥪ⮢.

      ணࠬ  ᪠  ,      ⮣,    
ᬮ 믮  /,      ᪠    ⨯
  㤥          䠩.      
⨯஢  ⨯   ।  ६ 樨.
     Turbo Pascal ॠ  祭    ᪫祭    ⮣
ࠢ:       ⨯஢   䠩  १  BlockWrite  
BlockRead.   室  ஢ન  ⨯  ᮧ      ணࠬ
। ᫮,     믮 祭 
 /.
      ஡    ⮬,       ᯮ짮 䠩
אַ  ꥪ⠬.  Turbo Pascal    ᮧ 䠩 ⨯
ꥪ.   ᪮  ꥪ   ᮤঠ 㠫 ⮤,
   ।      ६   믮,   ࠭
ଠ樨 VMT  ணࠬ ᫥;  ⥭ ⠪ ଠ樨
 ணࠬ   ᫥.
         ஡.   ᪮஢  
 ꥪ⮢  ࠭  ଠ  䠩,   ⥬  
ந ꥪ     .     ⭮ 襭 
᫮ ᮧ ꥪ⮢.


                          ⢥: ⮪.

     Turbo Vision         㤭,   ⠪ 
।⠢     ⥫    .    ⮪
।⠢ ⮩,   १砩     ᯮᮡ  ࠭
 ꥪ  ணࠬ.


                   ⮪  묨.

     ⮪ Turbo  Vision      २⢮   ⨯஢ 
⨯஢ 䠩:  ஢ઠ ⨯  믮,   , 
   ᫠    ⮪,    易  ।    ६
樨. 稭 ⮣  ⮬,   ⮪    ࠡ
 ꥪ⠬ ,  ᫨ ⮫쪮 ꥪ ஦  TObject, ⮪ 
ࠡ뢠 .   ᠬ ,  ࠧ  ꥪ  Turbo  Vision
     ⮪,  㯯  ꥪ⮢.


                  ࠢ ꥪ⠬  ⮪.

     ,    ᤥ -  ।   ⮪, 
ꥪ   ࠡ뢠, ⮡    ᮢ 
 VMT.  ⥬    ꥪ   ⮪      
⭮   ᨫ.
                ⮪  ⠪  ࠧ
ꥪ   TDeskTop  TDilog   ६ 樨   
 ꥪ    ࠡ뢠?    ᨫ쭮  ⫨砥   
/ ࠤ樮   ᪠.      ⢨⥫쭮   ⮪   
ࠡ뢠   ⨯ ꥪ⮢,     뫨 ᮧ
  樨 ⮪.
      蠥   ॣ樨.  ⨯ ꥪ Turbo
Vision (  ⨯ ꥪ⮢,    ஦  娨)
砥 㭨   ॣ樮    .        
뢠  ⮪ । 묨 ꥪ. ⥬,   ⠥
ꥪ  ⮪,  Turbo Vision  ॣ樮      
᭮       ᪮쪮            VMT
ᮥ  訬 .


                  魮 ᯮ짮 ⮪.

      㭤⠫쭮  ஢      㬠  ⮪  
䠩 ᪠.    ᢮  ᭮  䠩  ᪠   -      
᫥⥫쭮 ன⢮ /,        ⠥
 .   ᢮ । ⮪ -   䭮  ᫥⥫쭮
ன⢮ /,    砥,        ᥡ  ⠪ ,  
᫥⥫ 䠩,     ⠪     ꥪ
ࠧ筮 ⨯.
     ⮪  ⠪  ᬠਢ (   䠩  ᪠)  
ன⢮ /    㯮,    ⠭  
䠩, ⠥        ⮩  窨,  頥   
㪠⥫ 䠩    ..   樨 ⠪  㯭  ⮪ 
ᠭ  ࠧ "אַ   ⮪".
      2  ᯥ ᯮ짮 ⮪,    
 ᥡ ।⠢      祭 .  -
 ⠭ ⮪, ன - ⥭   ꥪ⮢  ⮪.


                         ⠭ ⮪.

      ᯮ짮 ⮪        樠஢
.     ᨭ⠪   ࠪ   Init   㤥   
 ᨬ   ⨯  ᯮ㥬  ⮪.  ਬ,  ᫨  
뢠 ⮪ DOS,   ॡ ।  䠩 DOS  ०
㯠 (⥭, , ⥭/)  䠩, ᮤঠ饬 ⮪.
     ਬ, ⮡  樠஢ ਧ ⮪ DOS 
㧪 ꥪ  ࠭  ணࠬ,  ॡ ⮫쪮:

     var
       SaveFile: TBufStream;
     begin
       SaveFile.Init('SAMPLE.DSK', stOpen, 1024);
       ...

     ᫥ ⮣,     樠஢  ⮪,      
ᯮ짮.
     TStream -  ࠪ  堭  ⮪        
ᮧ     ,      ꥪ ⮪ ஦ 
TStream.     TDosStream,  ᯥ稢騩  ᪮  /,
TBufStream, ᯥ稢騩  ਧ  /    ᪠ (,
᫨  ⠥     讥  ⢮    ᪮
)    TEmsStream,    뫠  ꥪ   EMS 
(ᮡ   ॠ樨  ᮢ).
     Turbo Vision   ⠪     ॠ  ஢  ⮪  
㪠⥫      ⮪.      㪠⥫,  
 ⢫ אַ   ⮪.


                      ⥭   ⮪.

      ꥪ ⮪ TStream ॠ  3  ᭮  ⮤:
Get, Put  Error.  Get  Put ਬ୮ ᮮ⢥ 楤ࠬ Read
 Write.  楤 Error 뢠      訡  
⮪.


                          뢮  ⮪.

     砫 ᬮਬ 楤 Put. 騩 ᨭ⠪ ⮤ Put:

     SomeStream.Put(PSomeObject);

      SomeStream -   ꥪ,  ஦   TStream  
樠஢,   PSomeObject -  㪠⥫   ꥪ,
஦  TObject  ॣ஢    ⨬  ⮪.  
,     ᤥ.  ⮪  㧭  VMT PSomeObject
⨯ ꥪ  (।,     ⨯      ॣ஢)   ,
᫥⥫쭮, ,      ID 뢠  ᪮쪮 
 ᫥ .
        ,    ணࠬ  Turbo Vision,  㤥
ᮡ  ,       뢠    ⮪  㯯  
⠬,       ⮬᪨  뢠  
⮪. ⮬ ࠭ ᫮ ꥪ 㤥    ᫮,
᪮ 믮   ⮬᪨!       ࠭  
ﭨ 襩 ணࠬ  ᠢ    ࠭    ⮪.
     ணࠬ ᭮  㧨  ࠭,
ணࠬ 㤥  ⮬  ﭨ,    窥 ࠭ 
࠭.


                            ⮪.

      ꥪ  ⮪  ⠪    .      ,
ᯮ 㭪 Get:

     PSomeObject := SomeStream.Get;

          ࠭ SomeStream - 樠஢ ⮪ Turbo
Vision,  SomeObject  -  㪠⥫      ⨯  ꥪ  Turbo
Vision. Get    頥  㪠⥫  ,    ⠫ 
⮪. 쪮   ⠫   ⨯ VMT   稫  ⨬
 ।      ⨯   PSomeObject,    ⨯  ꥪ,
   ⮪.  ⮬,  ᫨  ꥪ    ⥪饩   樨
SomeStream  ⮣  ⨯,   PSomeObject,   砩
ଠ.
        Put,  Get  ⠭ ᫮ ꥪ.  ,  ᫨
ꥪ, ⠭   ⮪,  -   , 騩
⠬,   ⠪  㦥.


                          砥 訡.

     , 楤  Error  ।    ந,  
 訡.  㬮砭 TStream.Error  ⠭ 2
 (Status  ErrorInfo)  ⮪. ᫨   믮 㣨
⢨, ਬ  ᣥ஢  訡  ६  믮  
뢥 訡      ,      室   ४
楤 Error.


                          ⮪.

       稢 ᯮ짮 ⮪,   뢠  
⮤ Done 筮 ⠪ ,   뢠 Close  ᪮ 䠩.
    ꥪ Turbo Vision,   

     Dispose(SomeStream, Done);

      㤠 ꥪ ⮪.


                 ᯮ짮 ꥪ⮢  ⮪.

      ⠭  ꥪ Turbo Vision ⮢  ᯮ짮 
⮪   ⮪ Turbo Vision    ⠭  ꥪ.
   ஦    ⨯  ꥪ     ⠭,
祭   ⮢      ᯮ짮     ⮪   
ᮮ ⮪   ⢮.


                       ⮤ Load  Store.

     ⢨⥫쭮 ⥭   ꥪ⮢  ⮪ ࠡ뢠
⮤ Load    Store.      ꥪ  ᮤঠ 
⮤  ⮣,  ⮡   뫮 ᯮ짮  ⮪,  
  뢠  אַ.  ( 뢠  Get  Put). ,
  ॡ ᤥ -  㡥,   ꥪ  
᫠ ᥡ  ⮪,    ᤥ .
        ࠡ 祭 , ᪮  
堭 ᫥  ꥪ ।. ,   ꥪ 
ᤥ -    㧨    ࠭    ,     
;  ⠫쭮 ⢥砥 맮 ⮤ ।.
     ਬ  த  ⨯      TWindow,
     ⭮  ॠ  ,  
ᮢ   ⨭  :

     type
       Tagritte = object(TWindow)
       Painted: Boolean;
       constructor Load(var S: TStream);
       procedure Draw;
       procedure Store(var S: TStream);
     end;

        뫮  ⮫쪮     Boolean.  
⮣, ⮡   㧨   ꥪ,      ⠥  ⠭
TWindow,  ⥬ ⠥ ⥫ ,  ᮮ⢥騩 
Boolean.     ᠬ  ਬ   ࠭ ꥪ:   
뢠 TWindow,   ⮬ 뢠    .  
⮤ Load  Store  ஦ ꥪ⮢  :

     constructor Targitte.Load(var S: Stream);
     begin
       TWindow.Load(S);
       S.Read(Painted, SizeOf(Boolean))
     end;

     procedure Targitte.Store(var S: Stream);
     begin
       TWindow.Store(S);
       S.Write(Painted, SizeOf(Boolean))
     end;

     ।०:       ⢥⢥      ,   
࠭ ⮫쪮  ,  ᪮쪮  㦠    
㦠  ⮬  浪,     ࠭﫨.  
 뤠 訡.   ਢ  ஬ ஡, ᫨ 
. ᫨         ꥪ⮢,  㡥,  
᪮४஢  Load  Store.


                         ⮪.

          ।  ⮤  Load  Store  
ꥪ,     ⠪    ॣ஢    ⨯  ꥪ
 ⮪.     -    ⮩  蠣  ,  
।  ॣ樨 ⮪  ।     
楤 RegisterType.
     ⮡ ।  ॣ樨  ⮪,    ᫥
ଠ.   ॣ樨  ⮪  -      ᪠  ⨯
TStreamRec, ।:

     PStreamRec = ^TStreamRec;
     TStreamRec = record
       ObjType: Word;
       VmtLink: Word;
       Load: Pointer;
       Store: Pointer;
       Next: Word;
     end;

     ਬ砭:      ⠭     ꥪ    Turbo    Vision
ॣ஢    㦭  ⮣.

      ᮣ襭 Turbo Vision      ॣ樨  ⮪
   ᮮ⢥  ꥪ ⨯   砫쭮 
 R.    ॣ樨   TDeskTop  -  RDeskTop    
ॣ樨  TMagritte - RMagritte.  ࠪ ⨯, ⠪ 
TObject  TView   ॣ樮 ᥩ, ᪮ 
 ᮧ  ⮣ ⨯.


                        ID ꥪ⮢.

      ObjType -    ⢥    ,    
 .    ⨯, । , 㤥 ॡ
᢮ ᮡ⢥   㭨쭮      ⨯.   Turbo   Vision
१ࢨ ॣ樮      0    99   ⠭
ꥪ⮢.   ᯮ짮 ॣ樮    100  
65,535.

     ਬ砭:  ⢥⢥  ᮧ  প ⥪
஢ ID    ꥪ⮢,   ᯮ  ⮪
/   ᤥ ID 㯭묨  짮⥫  㫥.
   ⠭  ,  ,  砥       
᮫⭮ ந묨, , ⮡  뫨 㭨묨.


                       ⮬᪨ .

      VmtLink -    ⠡楩 㠫  ⮤ (VMT)
ꥪ.   砥   ᬥ饭 ⨯ 襣 ꥪ:

     RSomeObject.VmtLink := Ofs(TypeOf(TSomeObject)^);

      Load   Store ᮤঠ  ⮤ Load  Store 襣
ꥪ.

     RSomeObject.Load := @TSomeObject.Load;
     RSomeObject.Store := @TSomeObject.Store;

     ᫥   Next 砥  楤 RegisterType  
ॡ 襣 ⥫⢠.    ।祭    ७
ᯮ짮  易 ᯨ᪥ ॣ樮 ᥩ ⮪.


                           .

     ᫥ ⮣,     ᮧ    ॣ樨  ⮪,  
뢠 RegisterType,  ।      .  ,  ⮡
ॣ஢ ꥪ TMagritte  ᯮ짮   ⮪, 
:

     const
       RMagritte: TStreamRec = (
         ObjType: 100;
         VmtLink: Ofs(TypeOf(TMagritte)^);
         Load: @TMagritte.Load;
         Store: @TMagritte.Store
       );
     RegisterType(RMagritte);

        뢮     ⨯  ꥪ  
 ⮪ Turbo Vision      ⮪.


                         堭 ⮪.

     ,   ᬮ५  ᯮ짮  ⮪,  
ᬮਬ     Turbo  Vision   訬 ꥪ⠬,   
  뢮 .


                             Put.

        뫠  ꥪ   ⮪ ⮤ Put,  ⮪ 
㪠⥫ VMT  ᬥ饭 0    ꥪ    ᬠਢ  ᯨ᮪
⨯, ॣ஢    ⮪    ᮮ⢥⢨.   
室 ᮮ⢥⢨,  ⮪  롨ࠥ  ॣ樮     ID
ꥪ  뢠   ⮪.  ⮪ ⥬ 뢠 ⮤ Store
ꥪ   ꥪ.  ⮤ Store ᯮ 楤 Write
⮪,  뢠 ࠢ쭮 ᫮   ⮪.
      ꥪ 祣    ⮪.      ᪮
䠩, EMS    㣮 ⨯ ⮪ -  ꥪ  
"   ⮪"  ⮪ 믮 ⠫쭮.


                             Get.

         ⠥  ꥪ    ⮪  ⮤  Get,  砫
  ID  ᪠ ᯨ᮪ ॣ஢  ⨯ 
ᮮ⢥⢨.    ᮮ⢥⢨   ,     ॣ樨
।⠢ ⮪  ⮤ Load    VMT  ꥪ.  ⥬
뢠 ⮤ Load  ⥭ ᮮ⢥饣 ⢠ 
 ⮪.
      ᭮,       ⮪  ᫥騩 ꥪ 
 㪠⥫   .   ꥪ    ,  
 ⮪   祭. ⮪ ᯥ稢 ⥭ ࠢ쭮
⢠ , ᯮ ⮤ Load ꥪ.
      뢠   ॣ஢ ⨯  ⪨ / 
⮪.


                ࠡ⪠ nil 㪠⥫  ꥪ.

          nil  ꥪ    ⮪.  ,   
 ,   ⮪ 뢠 ᫮  祭 0.  ⥭
ID = 0,  ⮪ 頥 nil 㪠⥫, ⮬ 0 १ࢨ஢ 
  ᯮ짮  ID  ꥪ.


                樨  ⮪:  ਬ.

         7  "樨"          ࠭  
 ࠧ,    易  ꥪ.    ⮪  ⠪  
ਬ   ᢮⢠        ᯮ짮  
࠭ 楫 樨  ᪥    ⠭    㣮
६     㣮 ணࠬ.  ᬮਬ  ࠧ TVGUID20.PAS.
 㦭 ᤥ, ⮡  ணࠬ 뢥   ⮪?
     ⢥ 㤨⥫쭮 .  -, 筥   ꥪ
TGraphObject  "稬"   ࠭     (X    Y)  
⮪.    ⮤ Store.  ⥬ ।  ⮤ Store
  ᫥ TGraphObject,      
(TGraphCircle    Radius;   TGraphRect    Width  
Height).
     ⥬ ᮧ   ॣ樮          ⨯
ꥪ,  㤥 ࠭  ॣ㥬    
⨯.    .    ⠫쭮      筮  /뢮:
 ६ ⮪;  ᮧ   ⮪;    
  ⮪  ஬; ன ⮪.


                      ⮤ Store.

      ਢ ⮤  Store.  ⨬,    PGraphPoint  
ॡ ,  ᪮          ᫥ 
PGraphObject.

     type
       PGraphObject = ^TGraphObject;
       TGraphObject = object(TObject);
       ...
       procedure Store(var S: TStream); virtual;
     end;

     PGraphCircle = ^TGraphCircle;
     TGraphCircle = object(TGraphObject)
       Raduis: Integer;
       ...
       procedure Store(var S: TStream); virtual;
     end;

     PGraphRect = ^TGraphRect;
     TGraphRect = object(TGraphObject)
       Width, Height: Integer;
       ...
       procedure Store(var S: TStream); virtual;
     end;

      Store  ᮢ襭  .    ꥪ 뢠
᫥㥬 ⮤ Store,   ࠭  ᫥㥬 .
⥬ ⮤  Write ⮪ 뢠 ⥫ .

     { TGraphObject  뢠 TObject.Store, ᪮ TObjet 
   ࠭ }
     procedure TGraphObject.Store(var S: TStream);
     begin
       S.Write(X, SizeOf(X));
       S.Write(Y, SizeOf(Y));
     end;

     procedure TGraphCircle.Store(var S: TStream);
     begin
       TGraphObject.Store(S);
       S.Write(Radius, SizeOf(Radius));
     end;

     procedure TGraphRect.Store(var S: TStream);
     begin
       TGraphObject.Store(S);
       S.Write(Width, SizeOf(Width));
       S.Write(Height, SizeOf(Height));
     end;

     ⨬,  ⮤ Write  TStream 믮  .
    ࠬ        ६    ⨯,  
TStream.Write   ࠧ  ⮩  ६.  ன  ࠬ
।⠢   ଠ     ᯮ짮 ⠭
㭪 SizeOf.  ࠧ, ᫨    न
⥬, ᯮ  ᫠    饩 窮,    ॡ
४஢ ⮤ Store.


                         ॣ樨.

     । ⠭      ॣ樨      
᫥㥬 ⨯,  믮  ᫥  蠣.     
᫥ ᮣ襭  Turbo  Vision    :  ᯮ R 
⢥ ࢮ 㪢.

     ਬ砭: ᯮ,     ॣ樨  砥
㭨   䨪  ꥪ  (Objtype).  Turbo Vision
१ࢨ   0    99    ⠭  ꥪ⮢.  㥬
࠭ ID      ꥪ⮢        
㡫஢.

     const
       RGraphPoint: TStreamRec = (
         ObjType: 150;
         VmtLink: Ofs(TypeOf(TGraphPoint)^);
         Load: nil;
         Store: @TGraphPoint.Store;

       RGraphCircle: TStreamRec = (
         ObjType: 151;
         VmtLink: Ofs(TypeOf(TGraphCircle)^);
         Load: nil;
         Store: @TGraphCircle.Store;

       RGraphRect: TStreamRec = (
         ObjType: 152;
         VmtLink: Ofs(TypeOf(TGraphRect)^);
         Load: nil;
         Store: @TGraphRect.Store;

        ॡ  ॣ樮      TGraphObject,
᪮  ࠪ ⨯     ஢    
頥       ⮪.    㪠⥫ Load 
ॣ樨 ⠭  nil, ᪮  ਬ  ᮧ
⮫쪮  ࠭   ⮪. ⮤ Load  ।,
 ॣ樮    ᪮४஢     ᫥饬   ਬ
(TVGUID22.PAS).


                           .

        뢠 ॣ஢    ᥩ 
믮 /뢮    ⮪.  ⥩訩 ᯮᮡ ᤥ  -
    楤  맢   砫 襩 ணࠬ
(  ⮤ Init 襩 ணࠬ).

     procedure StreamRegistration;
     begin
       RegisterType(RCollection);
       RegisterType(RGraphPoint);
       RegisterType(RGraphCircle);
       RegisterType(RGraphRect);
     end;

     ⨬,     ॣ஢  TCollection (ᯮ 
  RCollection  -  ⥯      祬  ᮣ襭   
 頥   ணࠬ஢),         ।﫨
TCollection.  ࠢ :   ⢥砥  ॣ  
⨯ ꥪ⮢,  뢮  ⮪.


                            ⮪.

     ,  ⠫ ᤥ -  筠 ᫥⥫쭮 /
 䠩: ᮧ ⮪;   ()  ; 
⮪.     ᯮ    ForEach      
 樨    ⮪.      ⮪ 
  ⮪:

     { TVGUID21.PAS }
     var
       GraphicsList: PCollection;
       GraphicsStream: TBufStream;
     begin
       StreamRegistration;
       ...
       GraphicsStream.Init('GRAPHICS.STM', stCreate, 1024);
       GraphicsStream.Put(GraphicsList);
       GraphicsStream.Done;
       ...
     end.

     㤥 ᮧ  ᪮   䠩,      ᮤন   
ଠ, 室  ⥭ 樨  .   ⮪
뢠   뢠 (. TVGUID22.PAS),  
裡   樥    ⠬  ꥪ⠬   ⠡栬
㠫 ⮤  ⠭.  孨 ᯮ 
IDE Turbo  Pascal  ࠭  䠩  ࠭. 騩
ਬ 뢠   ᤥ .  砫   
ꥪ, 뢮    ⮪,    ᮤঠ  裡    㣨
ꥪ⠬.


                           ࠭?

      ।०  ⮪:  짮⥫ ꥪ  -  
  ꥪ,      뢠  ꥪ  ⮪.  
।०  ⮬    ⭮  ⠫ 
ᯮ짮 ࠤ樮 ᪠:   㪠⥫ -  ,
  ᢮  㪠⥫.
      ᫮  ॠ쭮  ணࠬ  ᫥  ꥪ  
 ᮤঠ 㪠⥫  - .  ਤ ६
 /   ⮪,       ;  ⮫쪮
   뫠        ⮪.    
   ⮪ ᪮쪮   .  ⥬  
㤥  ⮪ 㤥 ᮧ ᪮쪮 ஢  
 ⤥ ꥪ ⥯ 㤥 㪠뢠  ᮡ⢥ 
  ⢥ ࢮ砫쭮 .


                   ⮢.

      㤥  㤮  ࠭ 㪠⥫   㯯 
  ६.  ਬ,    
࠭ 㪠⥫    ꥪ  ⮢  ࠢ  ᪨
   饭 㯠 (⠪    OKButton 
FileInputLine).         ⠢  ॢ
 ⮢,     ᮤন   2   㪠⥫      
,   ,  㣮  ᯨ᪥ ⮢. ᫨  
ࠧ蠥 ,  ⥭ ꥪ  ⮪ ਢ    㡫஢
஢.
     襭 -      ।⠢   ⮤    GetSubViewPtr    
PutSubViewPtr   TGroup.   ࠭ ,  ஥ 
⮬,    ⮣  ⮡    㪠⥫,     
  㣨 ६묨,  뢠 PutSubViewPtr, 
࠭ 뫪          ᯨ᪥  ⮢
㯯.   ࠧ   㦠 㯯   Load 
⮪,    맢 GetSubViewPtr,   ࠭, 
   ᯨ᮪ ⮢ 㪠뢠   ꥪ.
     ਢ ⪨   ਬ   ᯮ짮   GetSubViewPtr   
PutSubViewPtr  ⮬ :

     type
       TButtonWindow = object(TWindow)
         Button: PButton;
         constructor Load(var S: TStream);
         procedure Store(var S: TStream);
       end;

     constructor Load(var S: TStream);
     begin
       TWindow.Load(S);
       GetSubViewPtr(S, Button);
     end;

     procedure Store(var S: TStream);
     begin
       TWindow.Store(S);
       PutSubViewPtr(S, Button);
     end;

      ᬮਬ  祬  ⮫  ⮤   Store   ⫨砥   
ଠ쭮 Store.  ᫥  ࠭        ࠭
뫪   Button  ࠭  ᠬ  .    ꥪ
 ࠭         ,        맢
TWindow.Store.         ⥫쭮      饭
ଠ樨   ⮪    ,    Button  㪠뢠  
. ⮤ Load       ⭮  浪,  砫
㦠    ,  ⥬ ⠭ 㪠⥫
    Button.


                  .

     筠   ,      
, 㪠뢠饥  ࠢ    .    
뢠 ࠢ  㣮    ,  ᫨    
 ਭ    㯯.  訩  ਬ  -  ஫.
᪮ ஫         ஫,  
⠬ ,  ஬ ਭ ஫,    ,
 㪠뢠    .
        묨 ⠬,      ஡ 
⥭    뫮  ࠢ    ⮪. 襭
⠪ .  ⮤ PutPeerViewPtr  GetPeerViewPtr ।祭
 㯠      樨   㣮         ᯨ᪥
ꥪ⮢ .
     㦭   ⮫쪮    㧪  뫮  ࠢ 
,    㦥 (..       ᯨ᪥
⮢    ᫥⥫쭮        ⮪).  Turbo  Vision
ࠡ뢠  ⮬᪨,  ࠭   ⠪  뫮
।  ࠧ ,    㯯  㦥.
 室 ,   뫪  ࠢ     
⢨⥫     ,      㤥  襭    Load.
᫥⢨ ⮣      ⮤  Load  ,  
ᯮ ,  騥    ࠢ ⮢,  
१  ।᪠㥬.


               ࠭  㧪  ࠭.

     ᫨  ࠭  ࠭  ⮪,  ࠭ 㤥
࠭  ᢮ ᮤন:  ।  ࠭,  
⥪騥  .
     ᫨   ࠧ 짮⥫ ࠭  ࠭,
 室 㡥,       
ᮮ⢥騥   Store    Load,      
 ॣ஢,  ᪮  짮⥫  ࠭
 ࠭   .
     ⮡ ᤥ    ᯮ짮  :

     procedure TMyApp.RestoreDeskTop;
     var
       SaveFile: TBufStream;
       Temp: PDeskTop;
     begin
       SaveFile.Init('T.DSK', stOpen, 1024);
       Temp := PDeskTop(SaveFile.Get);
       SaveFile.Done;
       if Temp <> nil then
       begin
         Dispose(DeskTop, Done);
         DeskTop := Temp;
         Append(DeskTop);
         DeskTop^.DrawView;
       end;
       if SaveFile.Status <> 0 then ErrorReadingFile;
     end;

        ᤥ ᫥騩 蠣  ࠭  ⠭
 ணࠬ.  ꥪ   TApplication      ᠬ   ࠭   
⠭ ᥡ.


                       ஢ ⮪.

     TStream  ⮤ CopyFrom(S, Count),   Count
   ⮪  S.  CopyFrom   ᯮ짮  ஢
ᥣ ᮤন  ⮪    㣮  ⮪.  ᫨      ﭭ
頥   ᪮  ⮪,      ᪮஢   EMS
⮪   ண 㯠:

     NewStream := New(TEmsStream, Init(OldStream^.GetSize));
     OldStream^.Seek(0);
     NewStream^.CopyFrom(OldStream, OldStream^.GetSize);


                     אַ   ⮪.

              ᯮ짮  ⮪    ᫥⥫
ன⢠:  뢮 ꥪ      ⮪    뢠  
⭮    ⮬      浪.   Turbo  Vision  ।⠢  
⥫ .    ஢ ⮪
 㠫쭮 ன⢮   㯮.     Get 
Put,   ᮮ⢥  Read    Write      䠩,   ⮪
।⠢       䠩  Seek,  FilePos,
FileSize  Truncate.
     - 楤  Seek  ।  㪠⥫  ⥪饣  ⮪ 
  (      砫  ⮪)    ⠭⭠
楤 Seek Turbo Pascal.
     - 㭪  GetPos  ⭠  楤  Seek.     頥
LongInt  ⥪饩 樥  ⮪.
     - 㭪 GetSize 頥 ࠧ ⮪  .
     - 楤  Truncate 㤠   ᫥ ⥪饩 樨
⮪,  ⥪  ᫥  ⮪.
     ⮡   뫮 ᯮ짮  ணࠬ,  אַ  
⮪ ॡ ᮧ  ⮪ ,  ᮤঠ饣  砫
樨  ꥪ  ⮪.   쭠  ⮩ 楫
  ⢨⥫쭮 ᯮ  Turbo Vision  䠩 ᮢ
( 㦤   9). ᫨   ᯮ짮 אַ
  ⮪,   ᯮ짮 䠩 .


                       -ꥪ  ⮪.

               ⮪  ,      
ꥪ⠬,       ᯮ짮    ⮬  㣮  室.
⠭ ⮤  Get    Put  ॡ,  ⮡    ࠭﫨 
㦠 ꥪ,  ஦  TObject.  ᫨    ᮧ
⮪ -ꥪ⮢, ३ אַ  ஢ 楤 Read
 Write,     ⠥    ᫮   
⮪.     堭  ᯮ    Get   Put  ⥭ 
   ꥪ⮢;         室   堭   VMT,
ᯮ㥬  Get  Put.


                   ஥஢  ⮪.

      ࠧ 㬬 ⮤     ࠡ⪨  訡
⮪ Turbo Vision ⠪, ⮡      ᯮ짮
 ᮧ  ⨯ ⮪.
     TStream -      ࠪ   ꥪ,      
७, ⮡  ᮧ  ᯮ㥬  ⨯   ⮪.   設⢮
⮤ TStream  ࠪ        ॠ   
᫥,  㣨    ⮤  TStream.  쪮  ⮤
Error, Get  Put  ॠ  TStream.  GetPos, GetSize,
Read, Seek,  SetPos,  Truncate  Write   ४.  ᫨
⨯ ஦  ꥪ  ,  ⠪    ४
⮤ Flush.


                     ࠡ⪠ 訡 ⮪.

     TStream   ⮤  Error(Code,  Info),   뢠,
 ⮪ 㦨 訡.  Error   ⠭  
Status        ⠭,  ਢ    ࠧ  "⠭
stXXXX"  14.
      ErrorInfo    ᪫祭  樨,   Status ࠢ
stGetError  stPutError,  ।. ᫨ Status - stGetError,
 ErrorInfo  ᮤন    ID  ॣ஢  ⨯  
⮪. ᫨ Status - stPutError,   ErrorInfo ᮤন ᬥ饭
VMT   ⨯,     ⠥   ⮪.   
४ TStream.Error    ᮧ     ࠡ⪨   訡,
 訡 ६ 믮.
