





                                                November 11, 1987


                                   TPWINDO
                             MULTI-LEVEL WINDOWS
                       FOR BORLANDS TURBO PASCAL VER. 4
                                 Version 3.2

          PURPOSE:

          This utility creates  incredibly quick multi-level windows
          in Turbo Pascal programs for IBM PC/XT/AT compatibles.

          TEST DRIVE:

          Compile and run the tutoring program TPDEMO32.PAS to get a
          feel for features and speed.

          FILES:

          In this version, TPW32.ARC contains:
               TPWINDO.TPU    - Turbo Pascal Window Unit
               TPWINDO.HDR    - Header for TPWINDO.TPU
               TPDEMO32.PAS   - Demonstration program source code
               TPWIND32.DOC   - This document file.

          USING TPWINDO

          You  can  either  leave the  TPWINDO.TPU  unit  file  as a
          stand-alone unit or  put it in  the TURBO.TPL library with
          the TPUMOVER program.   At the beginning  of your programs
          that you intend to use windows add the statement:
                       Uses
                         tpwindo;

          Using the MAKEWINDOW procedure:

          MAKEWINDOW(ROW,COL,ROWS,COLS,ATTR,BRDRSEL,SHADOW,ZOOM)

          Where: ROW - the screen row of the upper left hand corner
                       of your desired window.  Value should be
                       between 2 and 23 (for reasons explained
                       below).  WARNING - the procedure does not
                       check for proper values. You must check these
                       yourself or accept the consequences.

                COL -  the screen column of the upper left hand
                       corner.  Value should be between 2 and 79.

               ROWS - the number of rows long the window should be.

               COLS - the number of columns wide the window should
                      be.



                                    - 1 -









               ATTR - the attribute of the window colors.

            BRDRSEL - the border you desire  around the window.
                      Valid selections in this release are:

                      0 - No Frame (just a border of BACKground
                          color.)
                      1 - Single Line Frame
                      2 - Double Line Frame
                      3 - Single Horizontal Line, Double Vertical
                          Line
                      4 - Single Vertical Line, Double Horizontal
                          Line
                      5 - Double Line Frame with an arrowhead in the
                          upper left corner.

             SHADOW - shadow selection

                      0 - No Shadow
                      1 - Left Shadow
                      2 - Right Shadow

               ZOOM - zoom selection

                      0 - Do Not Zoom
                      1 - Zoom
          
          using the TITLEWINDOW procedure:

          TITLEWINDOW(LOC,TITLE)

          Where: LOC - Indicates where the title should be placed.
                       Valid selections are:

                       1 - Top left hand corner
                       2 - Top center
                       3 - Top right hand corner
                       4 - Lower left hand corner
                       5 - Lower center
                       6 - Lower right hand corner

               TITLE - The string data you would like printed.

          NOTE:  The TITLEWINDOW procedure uses the coordinates from
                 the most recent use of MAKEWINDOW.  Use this
                 procedure only after a call has been made to
                 MAKEWINDOW.

          Using the RemoveWindow procedure:

          REMOVEWINDOW

          There  are no  parameters passed  to this  procedure.  The
          window created by  the last call  to MakeWindow is removed


                                    - 2 -









          from the screen.

          Using the ClearWindow procedure:

          CLEARWINDOW

          There  are  no  parameters pass  to  this  procedure.  The
          window created by  the last call  to MakeWindow is cleared
          inside the frame.

          Using the PrtWindow procedure:

          PRTWINDOW(ROW,COL,STRDAT)

          Where:  ROW - Is the row within the window you want to
                        print on.

                  COL - Is the column within the  window where you
                        want printing to start.

          NOTE:  The ROW and COL  coordinates are relative to the
                 current window.  Row 1 Col 1 refers to the first
                 character position inside the frame in the upper
                 left corner.  No parameter checking is done so if
                 the string data exceeds the  width of the window it
                 will spill out the right side.
          
               STRDAT - Is the string  data you want printed inside
                        the window.

          Using the PrtCWindow procedure:

          PRTCWINDOW(ROW,STRDAT)

          Where:  ROW - Is  the row  within  the  window you want to
                        have your string data centered on.

          NOTE:  This procedure uses the current window and will
                 attempt to center the string data between the left
                 border and the right border.  No parameter checking
                 is done so if the string data exceeds the width of
                 the window, it will spill out the sides.

               STRDAT - Is the string data  you want printed within
                        the window.

          Using the ATTR function:

          ATTR(FORE,BACK)

          Where: FORE - is the foreground color.  Any Turbo Pascal
                        color number is valid.

                 BACK - is the backgound color.  Any Turbo Pascal


                                    - 3 -









                        background color is valid.

          ATTR returns the attribute of the colors specified.

          Using the MAKEMENU procedure:

          Define and title your menu with calls to MakeWindow and
          TitleWindow.  Then define the  selections available to the
          user in  a string  array named  item[].  Assign  the total
          selections  available   to  itemcount   and  the  starting
          selection number to startpos.  Now call MAKEMENU.

          When a selection has be made in the MakeMenu procedure the
          item  number selected  will  be assigned  to  the variable
          curntpos.  You can now use  this number to direct the flow
          of you  main program.  Please  see the source  code of the
          demo  program for  a better  understanding.  One  point to
          remember is  that a MENU  window is no  different than any
          other window.  You  can pop one over  the other and remove
          them as you would a normal window.

          These are the  basic meat and  potatoes routines to create
          windows  in  your  programs.    There  are  several  other
          routines  in  the  TPWINDO environment  that  can  be used
          individually.   Please see  the  TPWINDO.HDR file  and the
          quick  reference for  the  calling syntax.   Feel  free to
          experiment.   The  only  caution is  the  Qsave  and Qrest
          routines  do not  perform  the heap  management.   This is
          taken care  of in  the MakeWindow  procedure with standard
          pascal heap management routines.  If you want to use these
          procedures be  aware that  you will  have to  provide this
          information to  those routines.   Other than  that TPWINDO
          requires no  special handling  when it  comes to compiling
          your program. Just make certain that all of your variables
          passing parameters to  the TPWINDO unit  are identified as
          integers or string data, and  you will be  able to proceed
          with the compile operation as with any other program.

          These utilities  are released  into the  public domain for
          anyone to  use as they  see fit however,  anyone who feels
          inspired and would like to  contribute to my printer paper
          and computer supplies fund may feel free to do so.

          Rick Fothergill
          141 Oak Hill Road
          Pittsfield, MA 01201

          GEnie Address: R.FOTHERGILL
             Compuserve: 76210,443
                    BBS: (413) 499-7245  300-1200-2400 Baud N-8-1
                         8:00am - 4:00pm Monday through Friday





                                    - 4 -










                           TPWINDO QUICK REFERENCE


          
          MakeWindow(Row,Col,Rows,Cols,Attr,BrdrSel,Shadow,Zoom)

                            TitleWindow(Loc,Title)

                                 RemoveWindow

                                 ClearWindow

                                   MakeMenu

                          PrtWindow(Row,Col,StrDat)

                            PrtCWindow(Row,StrDat)

                               Attr(Fore,Back)

                        Qsave(Row,Col,Rows,Cols,Scrn^)

                        QRest(Row,Col,Rows,Cols,Scrn^)

                         Qprint(Row,Col,StrDat,Attr)

                  QprintC(Row,ColLeft,ColRight,StrDat,Attr)

                      QFill(Row,Col,Rows,Cols,Char,Attr)

                        QAttr(Row,Col,Rows,Cols,Attr)

                     QBox(Row,Col,Rows,Cols,Attr,BrdrSel)






















                                    - 5 -



