home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / sampler / 03 / ptollwin / ptoolwi3.doc < prev    next >
Encoding:
Text File  |  1988-09-02  |  6.9 KB  |  141 lines

  1. ==========================================================================
  2.  
  3.  PTOOLWI3.INC   Copyright 1984  R D Ostrander                   Version 3.0
  4.                                 Ostrander Data Services             of
  5.                                 5437 Honey Manor Dr             PTOOLWIN.INC
  6.                                 Indianapolis  IN  46241
  7.  
  8.  These Turbo Pascal procedures are text window manipulation tools used to ease
  9.  the manipulation of Windows in an IBM PC environment. They are used to open
  10.  and close windows while saving the data covered by the window. Borders around
  11.  windows are also supported.
  12.  
  13.  This program has been placed in the Public Domain by the author and copies
  14.  may be freely made for non-commercial, demonstration, or evaluation purposes.
  15.  Use of these subroutines in a program for sale or for commercial purposes in
  16.  a place of business requires a $20 fee be paid to the author at the address
  17.  above.  Personal non-commercial users may also elect to pay the $20 fee to
  18.  encourage further development of this and similar programs. With payment you
  19.  will be able to receive update notices, diskettes and printed documentation
  20.  of this and other PTOOLs from Ostrander Data Services.
  21.  
  22.  
  23.  PTOOL, and PTOOLxxx are Copyright Trademarks of Ostrander Data Services
  24.  
  25.  Turbo Pascal is a Copyright of Borland International Inc.
  26.  
  27. Version 2.0 of PTOOLWIN (aka PTOOLWI2) supports stack operations for holding
  28. screen image data. Each screen opened absorbs 4006 bytes of Heap/Stack while
  29. it is open for the storage of the image on the screen before the new screen
  30. was opened. This area is freed up when the window is closed. No checks are
  31. made within PTOOLWIN to ensure that there is sufficient space on the
  32. Heap/Stack for PTOOLWIN to execute properly. The calling program must do this
  33. via a MaxAvail call such as
  34.  
  35.     If MaxAvail < 0 or MaxAvail > 4006 then PTWOpen (1)
  36.                                        else (((((ERROR ROUTINE)))));
  37.  
  38. Version 3.0 of PTOOLWIN (aka PTOOLWI3) automatically determine whether a
  39. Color/Graphics or a Monochrome display card are active and sets the output
  40. accordingly IF PTOOLWIN_Screen_Type IS AN 'X' WHEN PTWSET is first called.
  41. This variable still has all the functionality in Version 1.0 and 2.0 - if
  42. PTOOLWIN_Screen_Type is set to a 'C' or 'M' by the calling program, it will
  43. take precedence and the switching of screens can still be done this way.
  44.  
  45.      Version 3.0 was developed by LEW PAPER of St. Paul MN using the
  46.      card routine "WINDOW.PAS" developed by BELA LUBKIN of Borland.
  47.  
  48.      Thanks to both of these people by the original author. A good
  49.      example of User Supported Software at work.
  50.                                                 RDO.
  51.  
  52.  
  53.  
  54. Procedures available in PTOOLWIN.INC are:
  55.  
  56.  
  57.  PTWSet  (Screen#, X1, Y1, X2, Y2,  - Sets up window coordinates so that later
  58.          BorderSwitch,                references can be made by Mnemonic only.
  59.          BackgroundColor,             PTWSet must be done once for each window
  60.          ForegroundColor)             before it is Opened.
  61.                                       The Screen# is a number between 1 and
  62.                                       the maximum number of windows allowable
  63.                                       set in the Constants Block below.
  64.                                       The X and Y Coordinates are the same as
  65.                                       for the Turbo Pascal Window procedure.
  66.                                       A border may be placed around the window
  67.                                       and the size of the window will be
  68.                                       decreased to fit inside the border. The
  69.                                       BorderSwitch functions are:
  70.                                          0 - No border
  71.                                          1 - Single line block graphics border
  72.                                          2 - Double line block graphics border
  73.                                         -1 - Single line Reversed color border
  74.                                         -2 - Double line Reversed color border
  75.                                       The BackgroundColor and ForegroundColor
  76.                                       parameters are the same as for the Turbo
  77.                                       Pascal TextColor and TextBackground
  78.                                       procedures.
  79.  
  80.  PTWOpen (Screen#)                  - Activates a window (previously set by
  81.                                       PTWSet) and saves the screen covered by
  82.                                       the window.
  83.                                       In the Constants Block following, there
  84.                                       is a parameter that sets the maximum
  85.                                       number of windows that may be open at
  86.                                       any one time.
  87.  
  88.  PTWClose                           - De-activates the open window, activates
  89.                                       the previous window and restores the
  90.                                       screen covered by the closed window.
  91.                                       Note that the PTWOpen & PTWClose have a
  92.                                       "Push/Pop" type of action.
  93.  
  94.  
  95.  
  96. Constants in the PTOOLWIN.INC file that must be set by the programmer before
  97. compilation are:
  98.  
  99.  
  100.    PTOOLWIN_Number_of_Windows = nn;
  101.  
  102.         This determines the number of windows that may be set with the
  103.         PTWSet procedure. This is easily determined when the calling
  104.         program is designed.
  105.  
  106.         It also determines the number of windows that may be open at any one
  107.         time.
  108.  
  109.         Use the largest of the two figures that you expect.
  110.  
  111. There is a constant that must be set before the PTWOpen or PTWClose procedures
  112. are called:
  113.  
  114.  
  115.    PTOOLWIN_Screen_Type : Char = 'C';
  116.  
  117.         If the final program is going to be run on an IBM PC with a Monochrome
  118.         video card then this parameter must be set to 'M'. If the PC has
  119.         a Color/Graphics card then it must be set to 'C'. This setting may be
  120.         done at run time rather than at compile time since the difference that
  121.         this parameter makes is whether to store and recall the screen data at
  122.         $B8000 (Color Graphics) or $B0000 (Monochrome) via the absolute
  123.         variables :
  124.                      PTOOLWIN_C_Screen   : Char absolute $B800:$0000;
  125.                      PTOOLWIN_M_Screen   : Char absolute $B000:$0000;
  126.  
  127.         This may be found in the calling program by using either the
  128.         PTEMonoAttached or PTEColorAttached functions found in the PTOOLENV
  129.         Environment control.
  130.  
  131.  
  132.  
  133.  Now go out and try PTOOLWIN and by all means, look at the code of both
  134.  PTOOLWIN.PAS and PTOOLWIN.INC to completely understand how to incorporate
  135.  the Ostrander Data Services product into your programs.
  136.  
  137.  Write to find out about other ODS software available that might not be
  138.  on this bulletin board.
  139.  
  140. 
  141.