home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / beehive / program / bw.arc / BW.DOC next >
Encoding:
Text File  |  1991-02-18  |  4.0 KB  |  117 lines

  1.             BeeWindows
  2.             ==========
  3.  
  4. n.b this is for MicroBees only. BeeWindows would need major modification for 
  5. use on other systems.
  6.  
  7.     BW.PAS is Turbo Pascal include file which lets the programmer use 
  8. virtual screens, with windows on the physical screen display areas of the
  9. virtual screens.
  10.  
  11.     When a window is opened, ( displayed ), it overlays any other infor-
  12. mation on the screen and when closed the screen is returned to its prior state.
  13. To aid the user in identifying different winows a boarder is drawn around each
  14. window.
  15.  
  16.     Windows are accessed through a pointer to a record, to use a window
  17. you declare a variable of type `window'. There are routines to manipulate the
  18. window, display it on the screen, move it, change its size, clear it, etc..
  19.  
  20.     The following is a short description of each routine:
  21.  
  22. procedure init_windows;
  23.  
  24.     - must be called before using any windows
  25.     - initializes boarder drawing characters and internal variables
  26.  
  27.  
  28. function make_window : window;
  29.  
  30.     - returns pointer to a window record
  31.     - the window is initialized to a clean, full sscreen window, with its
  32.       cursor at the upper left hand corner
  33.  
  34. procedure break_window( var w : window );
  35.  
  36.     - deallocates the window's buffer and nulls the pointer
  37.  
  38. procedure open_window( w : window );
  39.  
  40.     - if the window is on the screen it is closed
  41.     - the window is then overlayed on the screen
  42.  
  43. procedure close_window( w : window );
  44.  
  45.     - if the window is on the screen it is taken off
  46.     - the screen is returned to it prior state
  47.  
  48. procedure move_window( w : window; x, y : integer );
  49.  
  50.     - if x,y is in range 1 .. 75, 1 .. 21 the upper left hand corner of 
  51.       the window is placed at x,y 
  52.     - note that this is the position of the boarder on the screen
  53.     - the size of the window may be changed to clip it against the
  54.       physical screen boundaries
  55.  
  56. procedure resize_window( w : window; x, y : integer );
  57.  
  58.     - if x,y is in range 4 .. 78, 2 .. 22 then the window's size is set
  59.       to x,y
  60.     - x,y is clipped against the physical screen boundaries
  61.  
  62. procedure resite_window( w : window; x, y : integer );
  63.  
  64.     - each virtual screen is 22 lines of 78 characters, resite allows you
  65.       to control what area of the virtual screen is displayed in the 
  66.       window.
  67.     - x,y defines the position of the first character on the virtual
  68.       screen displayed in the window. Characters are displayed from 
  69.       the upper left hand corner of the window.
  70.  
  71. procedure clean_window( w : window );
  72.  
  73.     - cleans the window's buffer to all blanks
  74.  
  75. procedure wputc( w : window; c : char );
  76.  
  77.     - adds the character to the buffer at the current cursor positon and
  78.       updates the cursor
  79.     - if the window is on the screen and was not the last opened then 
  80.       nothing is done
  81.  
  82. procedure wputs( w : window; s : any_string );
  83.  
  84.     - calls wputc for each character in s
  85.  
  86. procedure wgotoxy( w : window; x, y : integer );
  87.  
  88.     - positions the window's cursor at x,y if x,y in range 1 .. 78, 1 .. 22
  89.  
  90. procedure wputsxy( w : window; s : any_string; x, y : integer );
  91.  
  92.     - puts string on virtual screen at x,y
  93.  
  94. procedure save_window( w : window; var fn : any_string );
  95.  
  96.     - saves the contents of a virtual screen in a file called fn
  97.     - any_string is defined as string[ 255 ]
  98.  
  99. procedure load_window( w : window; var fn : any_string );
  100.  
  101.     - loads a virtual screen from a file
  102.  
  103.     A program using BeeWindows must be compiled with the $V option to
  104. turn off strict type checking of strings.
  105.  
  106.     A window must be closed before it can be cleaned, moved, resized,
  107. resited, saved or loaded.
  108.  
  109.     Use the `kbd' device for console input ( no echo ) and display the
  110. character using `wputc'.
  111.  
  112.     All identifiers meant to be private to bw are prefixed with 'window_',
  113. so its in your intrests to avoid using identifiers with that prefix.
  114.  
  115.     BeeWindows redefines the first 12 PCG characters to draw the boarders.
  116.  
  117.