home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / nicol / sti_edit / sti_edit.txt < prev    next >
Encoding:
Text File  |  1980-01-01  |  14.9 KB  |  551 lines

  1.  
  2.  
  3.  
  4.         
  5.         
  6.         
  7.         
  8.         
  9.         
  10.         
  11.         
  12.         
  13.         
  14.         
  15.         
  16.                                    EDITOR SUB-SYSTEM 1.0
  17.         
  18.                                For Turbo Pascal Version 5.0
  19.         
  20.         
  21.         
  22.         
  23.         
  24.         
  25.         
  26.         
  27.         
  28.         
  29.         
  30.         
  31.                                   Copyright 1990, 1991 By
  32.         
  33.                              Software Technology International
  34.         
  35.                                     All Rights Reserved
  36.         
  37.         
  38.         
  39.         
  40.         
  41.         
  42.         
  43.         
  44.         
  45.                   
  46.         
  47.         
  48.         
  49.         
  50.         
  51.         
  52.         
  53.         
  54.         
  55.         
  56.         
  57.         
  58.         
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                                             -1-
  65.                                           NOTICE
  66.                                           ------
  67.                   
  68.         
  69.         
  70.                      All parts of this manual and the accompanying  soft-
  71.                   ware  are  copyrighted material. You, as  a  registered 
  72.                   user, are granted permission to make as many copies  of 
  73.                   the  software, or manual, as you wish, as long as  they 
  74.                   are for your personal use. You may not copy this  soft-
  75.                   ware,  or  manual,  in any form  whatsoever  for  usage 
  76.                   outside of your personal use. This includes, but is not 
  77.                   limited  to, duplication of the disk, the files on  the 
  78.                   disk or the manual, by manual or electronic means.
  79.         
  80.         
  81.         
  82.         
  83.         
  84.         
  85.         
  86.         
  87.         
  88.         
  89.         
  90.         
  91.         
  92.         
  93.         
  94.         
  95.         
  96.         
  97.         
  98.         
  99.         
  100.         
  101.         
  102.         
  103.         
  104.         
  105.         
  106.         
  107.         
  108.         
  109.         
  110.         
  111.         
  112.         
  113.         
  114.         
  115.         
  116.         
  117.         
  118.         
  119.         
  120.  
  121.  
  122.  
  123.  
  124.  
  125.                                             -2-
  126.                                      TABLE OF CONTENTS
  127.                                      -----------------
  128.         
  129.                   
  130.                    Subject                                     Page
  131.                    -----------------------------------------------------
  132.         
  133.                    GENERAL DESCRIPTION ......................   4  
  134.                      Introduction ...........................   4  
  135.                      The software ...........................   4  
  136.                                                              
  137.                    THE SOFTWARE IN DETAIL ...................   5  
  138.                      The Main Procedures ....................   5
  139.                      Usage Pointers .........................   8  
  140.                                                              
  141.                    INDEX ....................................   9     
  142.         
  143.         
  144.         
  145.         
  146.         
  147.         
  148.         
  149.         
  150.         
  151.         
  152.         
  153.         
  154.         
  155.         
  156.         
  157.         
  158.         
  159.         
  160.         
  161.         
  162.         
  163.         
  164.         
  165.         
  166.         
  167.         
  168.         
  169.         
  170.         
  171.         
  172.         
  173.         
  174.         
  175.         
  176.         
  177.         
  178.         
  179.         
  180.         
  181.  
  182.  
  183.  
  184.  
  185.  
  186.                                             -3-
  187.                                     GENERAL DESCRIPTION
  188.                                     -------------------
  189.                   Introduction
  190.                   ------------
  191.                   
  192.                      Welcome to Version 1.0 of Software Technology Inter-
  193.                   nationals'  Editor  Sub-System. This unit  provides  an 
  194.                   editor  that you can build into any  application.  This 
  195.                   editor, while not aimed at being a professional editor, 
  196.                   provides  more than ample power to the end user, and  a 
  197.                   lot  of flexibility to the programmer that includes  it 
  198.                   into his/her program.
  199.         
  200.                      The  editor was written to be flexible, as  fast  as 
  201.                   possible, and as easy to use as possible. We hope  they 
  202.                   live up to your expectations. Please feel free to write 
  203.                   to  us  anytime  with bug reports  or  suggestions  for 
  204.                   future  versions.  If you are a registered  user,  this 
  205.                   will entitle you to a free upgrade.
  206.         
  207.                      Remember  that  this  software  is  copyrighted,  so 
  208.                   please don't copy and distribute it, this is a  federal 
  209.                   offense. 
  210.         
  211.                   The Software
  212.                   ------------
  213.         
  214.                      The  software consists of various units, that,  when 
  215.                   combined  make-up  the editor  sub-system.  The  editor 
  216.                   sub-system is accessed through only a single procedure, 
  217.                   and  provides a lot of flexibility. The editor  can  be 
  218.                   various  sizes, can have a border, provides all  common 
  219.                   editing features, and a few that are not so common.  It 
  220.                   also allows you to tie in help and directory routines.
  221.         
  222.                      The editor takes up around 80k in memory alone,  and 
  223.                   about  100k  with  the help unit  and  directory  units 
  224.                   added.  The  files are edited in memory, so  files  are 
  225.                   only limited in size to the size of the memory.
  226.         
  227.                      The editor requires the use of a few other STI units 
  228.                   to be fully functional, but an ambitious programmer can 
  229.                   probably get around this dependency. 
  230.         
  231.         
  232.         
  233.         
  234.         
  235.         
  236.         
  237.         
  238.         
  239.         
  240.         
  241.         
  242.  
  243.  
  244.  
  245.  
  246.  
  247.                                            -4-
  248.                                   THE SOFTWARE IN DETAIL
  249.                                   ----------------------
  250.         
  251.                   
  252.                   The Procedure
  253.                   -------------
  254.         
  255.                      The editor subsystem is accessed through the follow-
  256.                   ing procedure.
  257.         
  258.                   procedure  STI_ED(X1,Y1,
  259.                                     X2,Y2,
  260.                                     TextCol,
  261.                                     BorderCol,
  262.                                     PromptCol : byte; 
  263.                                     Border    : boolean;
  264.                                     Name      : string;  
  265.                                     HelpP,
  266.                                     DirP,
  267.                                     PassP     : pointer);
  268.         
  269.                      The  X1,Y1,X2,Y2  parameters  are  the  screen   co-
  270.                   ordinates for the editor. The area below this is  auto-
  271.                   matically saved, and restored when the editor is  exit-
  272.                   ed.
  273.         
  274.                      The  TextCol,  BorderCol  and  PromptCol  parameters 
  275.                   specify  the  colors for the text, border  and  prompts 
  276.                   respectively.
  277.         
  278.                      The  Border  parameter is a flag  telling  the  sub-
  279.                   system whether a border is required or not.
  280.         
  281.                      The  Name paramater is a string specifying the  name 
  282.                   of the file to be edited.
  283.         
  284.                      The HelpP, DirP and PassP parameters are pointers to 
  285.                   functions  that supply additional abilities. The  HelpP 
  286.                   pointer points to a help routine. The DirP is a pointer 
  287.                   to a procedure that supplies a directory/file selection 
  288.                   routine,  and the PassP pointer points to  a  procedure 
  289.                   that  can  accept an array containing  keystrokes  that 
  290.                   have no meaning to the editor.
  291.         
  292.                      The  prototypes  for  the three  procedures  are  as 
  293.                   follows.
  294.         
  295.                   procedure Help_Me_Please;
  296.                   function  Select_A_File : string;
  297.                   procedure Passed_On_Characters(Chars : ChrSet);
  298.         
  299.                      To  see how these are used, have a look at the  file 
  300.                   STI_EDEM.PAS.
  301.         
  302.         
  303.  
  304.  
  305.  
  306.  
  307.  
  308.                                             -5-
  309.                                          COMMANDS
  310.                                          --------
  311.                   
  312.                      The editor supports the following commands.
  313.         
  314.         
  315.                   BS    : deletes character to the left
  316.                   TAB   : works as one would expect
  317.                   RET   : works as normal
  318.                   ESC   : read, but ignored
  319.                   HELP  : calls help routine is specified
  320.                   F1    : same as help
  321.                   F2    : save the current file
  322.                   F3    : load a file
  323.                   F4    : Search
  324.                   F5    : Search and Replace
  325.                   F6    : Mark block start
  326.                   F7    : Mark block end
  327.                   F8    : Copy a block
  328.                   F9    : Erase a block
  329.                   F10   : Quit
  330.                   Arrow : They work as is normal
  331.         
  332.                   ^PP   : Print editor file
  333.                   ^PB   : Print a block
  334.                   ^S    : Left one character
  335.                   ^D    : Right one character
  336.                   ^E    : Up one line
  337.                   ^X    : Down one line
  338.                   ^A    : One word left
  339.                   ^F    : One word right
  340.                   ^R    : One screen up
  341.                   ^C    : One screen down
  342.                   ^G    : Delete character at cursor
  343.                   ^I    : Insert mode toggle
  344.                   ^Y    : Erase one line
  345.                   ^T    : Erase next word
  346.                   ^KD   : Quit and Save
  347.                   ^KQ   : Quit
  348.                   ^KS   : Save
  349.                   ^KB   : Mark Block Start
  350.                   ^KC   : Copy a block
  351.                   ^KK   : Mark  Block End
  352.                   ^KY   : Delete a Block
  353.                   ^KV   : Move a Block
  354.                   ^KW   : Write a block
  355.                   ^KR   : Read a block
  356.                   ^QQ   : Search and Replace
  357.                   ^QH   : Erase line contents
  358.                   ^QF   : Search
  359.                   ^QC   : Jump to end of file
  360.                   ^QR   : Jump to start of file
  361.                   ^LU   : Uppercase Line
  362.                   ^LD   : Lowercase Line
  363.                   ^LC   : Centre Line (to 128 char width)
  364.  
  365.  
  366.  
  367.  
  368.  
  369.                                             -6-
  370.                   ^LR   : Trim right side of line
  371.                   ^LL   : Trim left side of line
  372.                   ^WU   : Uppercase word
  373.                   ^WD   : Lowercase word
  374.         
  375.                   ^DELETE          : Delete word(^T)
  376.                   ^LEFT ARROW      : Start of line
  377.                   ^RIGHT ARROW     : End of line
  378.                   ^UP ARROW        : One screen up
  379.                   ^DOWN ARROW      : One screen down
  380.         
  381.                   SHIFT+TAB        : Reset tab width
  382.                   SHIFT+ROLL UP    : End of file
  383.                   SHIFT+ROLL DOWN  : Start of file
  384.                   SHIFT+INSERT     : Insert a lne
  385.                   SHIFT+DELETE     : Delete a line
  386.                   SHIFT+HOME CLR   : End of line
  387.                   SHIFT+LEFT       : One word left
  388.                   SHIFT+RIGHT      : One word right
  389.                   SHIFT+UP         : Top of screen
  390.                   SHIFT+DOWN       : Bottom of screen
  391.         
  392.                      All other combinations are passed on to the  calling 
  393.                   program.
  394.         
  395.         
  396.         
  397.         
  398.         
  399.         
  400.         
  401.         
  402.         
  403.         
  404.         
  405.         
  406.         
  407.         
  408.         
  409.         
  410.         
  411.         
  412.         
  413.         
  414.         
  415.         
  416.         
  417.         
  418.         
  419.         
  420.         
  421.         
  422.         
  423.         
  424.         
  425.  
  426.  
  427.  
  428.  
  429.  
  430.                                             -7-
  431.                                       USAGE POINTERS
  432.                                       --------------
  433.                   
  434.                      The main points that the programmer should be  aware 
  435.                   of are that:
  436.         
  437.                   a) The program requires a lot of memory (70k). Most of
  438.                      this is code (63k).
  439.         
  440.                   b) The cursor speed is sometimes too fast. This is  due 
  441.                      to a bug in the Delay routine in TP.
  442.         
  443.                   c) The program edits a file in memory, so the file size
  444.                      is limited to available memory. Sometimes this is a
  445.                      serious limitation.
  446.         
  447.                   d) Without the Help and especially the Directory code
  448.                      the program is not as useful as it is with them.
  449.         
  450.                   e) The editor allows special key combinations to be
  451.                      passed back to the calling routine. This makes it
  452.                      ideal for a situation where you need multiple files
  453.                      or an integrated environment like. 
  454.         
  455.         
  456.         
  457.         
  458.         
  459.         
  460.         
  461.         
  462.         
  463.         
  464.         
  465.         
  466.         
  467.         
  468.         
  469.         
  470.         
  471.         
  472.         
  473.         
  474.         
  475.         
  476.         
  477.         
  478.         
  479.         
  480.         
  481.         
  482.         
  483.         
  484.         
  485.         
  486.  
  487.  
  488.  
  489.  
  490.  
  491.                                             -8-
  492.                                            INDEX
  493.                                            -----
  494.         
  495.                     Topic                                     Page Number
  496.                   -------------------------------------------------------
  497.         
  498.                  Commands..................................       6
  499.                  Contents..................................       3
  500.                  Copying...................................       2
  501.                  Copyright.................................       2
  502.         
  503.                  Descriptions..............................       5
  504.         
  505.                  General Description.......................       4
  506.         
  507.                  Introduction..............................       4
  508.         
  509.                  Procedures................................       5
  510.         
  511.                  Usage.....................................       8
  512.                  Users.....................................       2
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.                                             -9-