home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / nicol / sti_edit / sti_edem.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1980-01-01  |  2.7 KB  |  52 lines

  1. program STI_EDEM;                           { demonstration of editor       }
  2.  
  3. Uses  Crt,                                  { standard TP 5.0 unit          }
  4.       STI_ED_V,                             { editor variables              }
  5.       STI_DIR,                              { directory routine             }
  6.       STI_HELP,                             { help routine                  }
  7.       STI_EDIT;                             { editor routine                }
  8.  
  9. {---------------------------------------------------------------------------}
  10.  
  11. {$F+}                                       { must be declared far          }
  12. procedure Passed(Inch :ChrSet);             { get the passed characters     }
  13. {$F-}                                       { Inch[1] := ASCII code         }
  14.                                             { Inch[2] := SHIFT etc          }
  15. begin                                       { Inch[3] := GRAPH, etc         }
  16. end;                                        { do nothing                    }
  17.  
  18. {---------------------------------------------------------------------------}
  19.  
  20. {$F+}                                       { must be declarde far          }
  21. function Get_File : string;                 { return a file name            }
  22. {$F-}
  23. begin
  24.   Get_File := STI_SelectFile(10,10,59,20,White,
  25.                               Yellow+Reverse,Green+Reverse,TRUE,'*.*');
  26.                                             { get the name & return it      }
  27. end;
  28.  
  29. {---------------------------------------------------------------------------}
  30.  
  31. {$F+}                                       { must be declared far          }
  32. procedure Help;                             { help the user                 }
  33. {$F-}
  34.  
  35. begin
  36.   STI_Do_Help('STI_ED.HLP',5000);           { call the help system          }
  37. end;
  38.  
  39. {---------------------------------------------------------------------------}
  40.  
  41. begin
  42.   STI_ED(1,1,80,23,                         { these are maximum values      }
  43.          White,                             { text color                    }
  44.          Green+Reverse,                     { border color                  }
  45.          Yellow+Reverse,                    { highlight color               }
  46.          FALSE,                             { no border                     }
  47.          'NONAME',                          { file name                     }
  48.          @Help,                             { help routine                  }
  49.          @Get_File,                         { directory routine             }
  50.          @Passed);                          { routine to pass chars to      }
  51.                                             { one call does it all !!!!     }
  52. end.