home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_BAS
/
MNUSYS22.ZIP
/
README.DOC
< prev
Wrap
Text File
|
1994-01-13
|
8KB
|
177 lines
Menusys PowerBASIC Menuing System
Version 2.2
(C) Copyright 1993, 1994 by Tim Gerchmez
All Rights Reserved.
Menusys is a complete text-mode GUI for PowerBASIC 3.0. Included
is Menulib, a library of support routines that add a great deal of
functionality to Menusys. Menusys can be used either by itself or with
Menulib ; however, using routines in Menulib requires that you link in
the Menusys routines as well.
Both Menusys and Menulib are supplied as PowerBASIC .PBU files
in this package. All the subprograms and functions are detailed in
the files MENUSYS.DOC and MENULIB.DOC.
You may use Menusys and Menulib routines in your programs intended
for PERSONAL USE ONLY, without paying any fees. However, if you intend to
distribute your programs that include Menusys and/or Menulib, either for
profit or for freeware release, you must register Menusys and Menulib with
me. Registration for both packages is $25.00 ($20.00 plus $5 S/H), and
entitles you to the source code for both libraries. You will also be
entitled to ongoing technical support by mail for both libraries.
Businesses may not use the shareware version of Menusys/Menulib
for more than 10 days without registering. Site licensing is available;
please contact me at the address below with a reasonable offer, and I'll
consider it.
To register Menusys/Menulib, please send a check/MO for $25.00
made out to Tim Gerchmez, to:
Tim Gerchmez
12648 S.E. 81st Pl.
Renton, WA 98056-9121
Please specify the disk format desired - if you don't, I'll assume
3 1/2", 1.44Mb High Density format.
BE SURE to include your phone number and return address so I can send
you the source code to Menusys and Menulib, and can notify you when
upgrades are available to the programs. Also, please specify Menusys
for PowerBASIC, as I also have a version for QuickBASIC 4.5. Use the
enclosed MAILER order form if possible for ordering.
Distributors: Please distribute this entire package/archive freely,
making every attempt to keep the files together.
---------------------------------------------------------------------------------
Backup and Installation
-----------------------
To install, create a subdirectory under your PB3 directory entitled
\MENUSYS or something similar, and copy all files in this archive (disk)
to that subdirectory. After this, copy the .PBU files to your PowerBASIC
PBU or Link directory so the PB3 compiler can find them for linking purposes.
If you use the .INC (Include) files, copy them to your INCLUDE directory as
well.
MENUSYS.PBH
-----------
Included is a help file for use with the PowerBASIC 3.0C IDE.
Copy MENUSYS.PBH to your main PowerBASIC directory (usually \PB3). You
can then access online help for Menusys by pressing SHIFT-F1 repeatedly
until you see the Menusys help menu come up. You can also press CTRL-F1
in the editor when the cursor is on a Menusys/Menulib routine for help
with that routine.
Include files
-------------
Programs that use Menusys/Menulib routines in .PBU's don't normally
need to DECLARE SUBs and FUNCTIONS before using them. However, include
files for Menusys and Menulib are supplied in case you wish to put
MENUSYS.PBU and MENULIB.PBU together into a .PBL (PowerBASIC Library),
in which case you WILL need to declare routines before use. Copy MENUSYS.INC
and MENULIB.INC into your PB3 INCLUDE directory (if any), then use
$INCLUDE "MENUSYS.INC" and/or $INCLUDE "MENULIB.INC" to include these files
in your programs. You can also merge the two include files together into
one if you wish. DECLAREing routines in your programs will not automatically
include them in the final .EXE unless they're actually referenced (PB3C and
above).
---------------------------------------------------------------------------------
Using Menusys/Menulib Routines
Menusys requires no special "event-driven" programming techniques.
You simply check for either of the following conditions in the main loop
of your program:
* If the mouse cursor is on the top row of the screen, and the left mouse
button is pressed, call the main MENUSYS routine to display the pulldown
menus. Use the MCHECK sub, and the global variables msy% and lb%.
For example:
call mcheck
IF msy% = 1 AND lb% = 1 then goto dothemenu
* If the alt key is pressed, call the main MENUSYS routine to display the
pulldown menus. Use the ALTKEY% function. For example:
IF altkey% then goto dothemenu
That's all there is to it! The other routines in Menusys and Menulib
you call as needed - for user input, menu selection, check boxes, etc.
You can use the SUB printtopmenu to display the top (bar) menu at the
start of your program. Be sure to call this routine every time you erase
the screen if you want to "keep" a menu at the top of the screen at all times.
See MNSDEMO.BAS to see how this routine can be used.
If you need further help, see the file HELP.TXT, or contact the
author of Menusys at the address toward the top of this document.
---------------------------------------------------------------------------------
Menusys/Menulib Notes
Converting to Version 2.x
-------------------------
Version 2.x of Menusys/Menulib is a major overhaul, and it's
possible that this version will "break" your code written using previous
versions. In updating Menulib, I found it necessary to delete several
routines that I deemed unnecessary or not supportive of the overall concept
of Menusys, to make room for improvements to the really powerful routines.
I apologize for any inconvenience this may cause you.
Monochrome (MDA) Compatibility
------------------------------
Menusys now uses direct buffering for screen saves, rather than
transferring data between screen pages as earlier versions did. This makes
Menusys compatible with ALL display adapters, including the original MDA
adapter (which has only one screen page available). Direct buffering also
also gives you the ability to store many more screens, as you can increase
the subscript of the array variable SCNBUF() in the PAGECOPY routine to as
high a number as desired. You can use the PAGECOPY command, or the new
SCREENSTORE and SCREENRECALL commands, to store and retrieve full-color text
screens. See the docs for each of these commands for more information.
DRAWBOX bug
-----------
There's a minor bug in the DRAWBOX routine that requires you pass
the Y dimension of the box desired PLUS ONE rather than the actual Y
dimension. Fixing this bug will involve a major overhaul of the entire
library, which I intend to do for the next version. For now, be sure to
pass DRAWBOX the Y dimension plus one if you access it directly with your
own routines:
DRAWBOX YD%+1, XD%, TPE%, SHAD%, TITLE$
V2.2 Speed Increase and Improvements
------------------------------------
If you've used versions of Menusys prior to 2.2, you'll notice that
the main MENUSYS and boxdraw routines have been greatly speeded up (try
MNSDEMO.EXE and run the mouse cursor over the top menu bar while holding
down the left mouse button). I hope you enjoy this speed increase and
that it benefits you and your programs. Other routines have been improved
(INPBOX now accepts longer than one line length of input using scrolling
techniques, for example). Keep those bug reports and suggestions for
improvements coming, and you'll see even more positive changes in future
versions of Menusys/Menulib. Coming soon to Menusys: Exploding Boxes!