home *** CD-ROM | disk | FTP | other *** search
- Menusys PowerBASIC Menuing System
- Version/Release 2.1
- (C) Copyright 1993 by Tim Gerchmez
- ----------------------------------
-
- 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 (twenty five dollars), 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, as
- it is intended for evaluation purposes only. A business may only run
- the demo .EXE programs included, and may NOT use Menusys/Menulib routines
- under ANY circumstances 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. Once you register, you're
- automatically registered for ALL future versions of both libraries.
-
- Distributors: Please distribute this entire package/archive freely,
- making every attempt to keep the files together.
- -----------------------------------------------------------------------------
-
- Installing Menusys/Menulib:
-
- To install, create a subdirectory under your PB3 directory entitled
- SHAREMNS or something similar, and copy all files in this archive (disk)
- to that subdirectory. If you're in the RUNME program included with this
- package, you can press <I> now to install the package to the drive/
- subdirectory of your choice (if it doesn't exist, RUNME will create it).
- After that, copy the .PBU files manually to your PowerBASIC .PBU
- directory. Also copy the included PowerBASIC help file MENUSYS.PBH to your
- main PowerBASIC directory. This help file provides online help for Menusys/
- Menulib which is accessible by pressing SHIFT-F1 repeatedly until the Menusys
- help menu comes up.
-
-
- Using Menusys/Menulib Routines
- ------------------------------
-
- Menusys requires no special "event-driven" programming techniques.
- You simply include a special header in your programs (see MNSSHELL.BAS),
- and 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.
-
-
- Explanation of PUBLIC variables
- -------------------------------
-
- Each Menusys/Menulib program should include a header declaring a
- series of PUBLIC variables. A complete example of this header is in the
- file MNSSHELL.BAS, which is a "shell" you can use to add Menusys/Menulib
- routines to your programs. These PUBLIC variables are correspondingly
- declared as EXTERNAL statements in the MENUSYS.PBU and MENULIB.PBU files,
- and are "global" to your program and to Menusys and Menulib. Each of them
- defines an important parameter, and most should be set at the start of your
- program (before calling Menusys/Menulib routines):
-
- * scrnbuf?(min,2) - Declares a buffer for storing text screens. At the start
- of your programs, you should have the statement DIM scrnbuf?(1:4096, 0:3),
- which will actually DIM the scrnbuf?() variable to the required minimum
- values.
-
- * explode% - Set this variable to 0 for normal boxes, or 1 for "exploding"
- boxes in your Menusys/Menulib program. A value greater than 1 introduces
- a delay in the "exploding" effect which will vary from computer to computer.
- You can change the value of this variable "on the fly" to make some boxes
- explode, and some not.
-
- * flash% - Setting this variable to 1 produces a "flashing" effect when
- you pick a menu option, making it easier for a user to tell which option
- was selected. You can change the value of this variable "on the fly."
-
- * mouse% - Set to 1 for MOUSE EXISTS or 0 for NO MOUSE at the start of
- your program. Use MHARDRESET to reset and check for the presence of a
- mouse driver (see docs). Menusys/Menulib will work with or without the
- presence of a mouse (except for a few of the commands, like MOUSEPICK).
-
- * segment& - Defines the current video segment (&hb000 for monochrome or
- &hb800 for color). Set with the function VIDSEG&.
-
- * msx%, msy% - Current location of the mouse cursor on the screen in x
- and y text-screen coordinates (1-80 and 1-25). These variables are set
- by calling SUB MCHECK.
-
- * lb%, rb% - Status of the left and right mouse buttons (1=pressed, 0=
- not pressed). These are set by calling SUB MCHECK.
-
- * topcount% - number of "top" (bar menu) selections. See MNSSHELL.BAS
- for demo of use.
-
- * bottomcount% - number of "bottom" (box menu) selections. See MNSSHELL.BAS
- for demo of use.
-
- * mainclr% - Main screen character color.
-
- * mainbckg% - Main screen background color. '"Main" Screen Colors
-
- * clr% - Temporary screen character color.
-
- * bckg% - Temporary screen background color.
-
- * clr1%, clr2%, clr3% - Alternate character colors used by many routines.
-
- * bckg1%, bckg2%, bckg3% - Alternate Background Colors used by many
- routines.
-
- * helpfn$ - Name of help file for F1 online help. Leave undefined for
- no help. See READHELP for format of help files.
-
- * progname$ - Name of current program. Used by several routines. Leave
- undefined for no name.
-
-
- CONVERTING TO VERSION 2.1
- -------------------------
-
- Version 2.1 of Menusys/Menulib is a major overhaul, and it's likely
- that this version will "break" your code written using previous versions.
- The first thing you have to do is add the following statements to your code:
-
- * In the PUBLIC statements at the top of your program, add:
-
- public scrnbuf?(min,2)
- public explode%, flash%
-
- * Add the following statement to your program prior to calling
- Menusys/Menulib routines:
-
- dim scrnbuf?(1:4096, 0:3)
- explode% = 0: flash% = 0
-
- At this point, I'd suggest compiling your code and making changes
- as the need comes up. 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, and I've
- included the source code to the "old" routines I removed, so you can simply
- merge them into your main source program.
-
-
- Special note for Version 2.0+ : 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). It also means that you
- must set aside a 16K (minimum) buffer at the start of your programs that use
- Menusys/Menulib. This is done with the statement:
-
- DIM scrnbuf?(1:4096,0:3)
-
- You should add this command to all your Menusys programs if you wish
- to compile them with Version 2.0, and should also add a corresponding PUBLIC
- statement:
-
- public scrnbuf?(min,2)
-
- at the top of your programs. See MNSSHELL for an example. Direct buffering
- also gives you the ability to store many more screens, as you can increase
- the 3 to as high a number as there is memory available (4K used for each
- increase of subscript). 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.
-
-
- I hope you enjoy using Menusys and Menulib. A version for
- QuickBASIC 4.5 is also available.
-
-