home *** CD-ROM | disk | FTP | other *** search
- BeeWindows
- ==========
-
- n.b this is for MicroBees only. BeeWindows would need major modification for
- use on other systems.
-
- BW.PAS is Turbo Pascal include file which lets the programmer use
- virtual screens, with windows on the physical screen display areas of the
- virtual screens.
-
- When a window is opened, ( displayed ), it overlays any other infor-
- mation on the screen and when closed the screen is returned to its prior state.
- To aid the user in identifying different winows a boarder is drawn around each
- window.
-
- Windows are accessed through a pointer to a record, to use a window
- you declare a variable of type `window'. There are routines to manipulate the
- window, display it on the screen, move it, change its size, clear it, etc..
-
- The following is a short description of each routine:
-
- procedure init_windows;
-
- - must be called before using any windows
- - initializes boarder drawing characters and internal variables
-
-
- function make_window : window;
-
- - returns pointer to a window record
- - the window is initialized to a clean, full sscreen window, with its
- cursor at the upper left hand corner
-
- procedure break_window( var w : window );
-
- - deallocates the window's buffer and nulls the pointer
-
- procedure open_window( w : window );
-
- - if the window is on the screen it is closed
- - the window is then overlayed on the screen
-
- procedure close_window( w : window );
-
- - if the window is on the screen it is taken off
- - the screen is returned to it prior state
-
- procedure move_window( w : window; x, y : integer );
-
- - if x,y is in range 1 .. 75, 1 .. 21 the upper left hand corner of
- the window is placed at x,y
- - note that this is the position of the boarder on the screen
- - the size of the window may be changed to clip it against the
- physical screen boundaries
-
- procedure resize_window( w : window; x, y : integer );
-
- - if x,y is in range 4 .. 78, 2 .. 22 then the window's size is set
- to x,y
- - x,y is clipped against the physical screen boundaries
-
- procedure resite_window( w : window; x, y : integer );
-
- - each virtual screen is 22 lines of 78 characters, resite allows you
- to control what area of the virtual screen is displayed in the
- window.
- - x,y defines the position of the first character on the virtual
- screen displayed in the window. Characters are displayed from
- the upper left hand corner of the window.
-
- procedure clean_window( w : window );
-
- - cleans the window's buffer to all blanks
-
- procedure wputc( w : window; c : char );
-
- - adds the character to the buffer at the current cursor positon and
- updates the cursor
- - if the window is on the screen and was not the last opened then
- nothing is done
-
- procedure wputs( w : window; s : any_string );
-
- - calls wputc for each character in s
-
- procedure wgotoxy( w : window; x, y : integer );
-
- - positions the window's cursor at x,y if x,y in range 1 .. 78, 1 .. 22
-
- procedure wputsxy( w : window; s : any_string; x, y : integer );
-
- - puts string on virtual screen at x,y
-
- procedure save_window( w : window; var fn : any_string );
-
- - saves the contents of a virtual screen in a file called fn
- - any_string is defined as string[ 255 ]
-
- procedure load_window( w : window; var fn : any_string );
-
- - loads a virtual screen from a file
-
- A program using BeeWindows must be compiled with the $V option to
- turn off strict type checking of strings.
-
- A window must be closed before it can be cleaned, moved, resized,
- resited, saved or loaded.
-
- Use the `kbd' device for console input ( no echo ) and display the
- character using `wputc'.
-
- All identifiers meant to be private to bw are prefixed with 'window_',
- so its in your intrests to avoid using identifiers with that prefix.
-
- BeeWindows redefines the first 12 PCG characters to draw the boarders.
-
-