home *** CD-ROM | disk | FTP | other *** search
-
- Inspired by BARMENU from BWTOOLS by Dave Evers and using mouse
- and screen handling routines from ADVBAS by Thomas Hanlin III,
- MOUSEMEN is hereby placed in the Public Domain.
-
- This subroutine was tested with ADVBAS v3.4, 06/25/87
- QuickBasic v3.0, 04/07/87
-
- Ray Schwarz 76012,133
-
-
-
-
- MOUSEMNU
-
- Purpose: Produces a display similar to the editing screen of
- QuickBASIC with a bar across the top and uses the mouse
- to Pull-down 1-6 menues. When the mouse is 'clicked' at
- a Menu Bar, a Pull-Down menu is displayed as long as the
- mouse button is held. A highlighted bar follows the mouse
- cursor to indicate items to be selected.
-
- SUB MOUSEMNU(MLINE$(1),MENUFG%,MENUBG%,BLKSIZE%,BLKNUM%,MAXSIZE%(1),
- MAXITEMS%(1),ITEMS$(2),MENUSLCT%,ITEMSLCT%) STATIC
-
- Passed: MLINE$ - A string array holding the Menu Headings that
- will be placed on the second screen line (to
- allow or a screen border if desired).
-
- MENUFG% - An integer holding the foreground color of
- the Menu line.
-
- MENUBG% - An integer holding the background color of
- the Menu line.
-
- BLKSIZE% - The Menu line is divided into BLOCKS of
- fixed size, which will be highlighted as
- each is selected and the appropriate menu
- 'drops down' beneath it. This integer sets
- the size of these blocks.
-
- BLKNUM% - The number if fixed blocks of BLKSIZE% that
- are present in array MLINE$.
-
- MAXSIZE%() - An integer array with one element for each
- menu that will appear (i.e., BLKNUM%). This
- array element holds the maximum length of the
- items contained in the corresponding menu.
-
- MAXITEMS%() - An integer array also with one element per
- menu holding the number of items in each
- corresponding menu.
-
- ITEM$( , ) - A two-dimensional array (i.e. ITEMS$(1,1)
- holding the actual menu item strings. The
- first dimension holds the menu number, and
- the second holds the item number within a
- menu. Thus, ITEMS$(1,1) would be the first
- item in Menu #1; and ITEMS$(5,10) would be
- the 10th item in Menu #5.
-
- Returns: MENUSLCT% - An integer holding the menu number of the
- selection made.
-
- ITEMSLCT% - An integer holding the item number within
- the menu selected.
-
- For example, if item 10 in menu #5 were
- selected, MENUSLCT% would be 5 and
- ITEMSLCT% would be 10.
-
-
-
- Other files:
-
- MOUSESAM.BAS - QuickBasic program to demo MOUSEMNU
- NEWLIB.BLD - Buildfile to add MOUSEMNU to the files contained in
- ADVBAS.EXE user library.
-
- To add:
- 1. Compile MOUSEMNU to .obj (using BRUN30.EXE)
- 2. Extract the .OBJ files from OBJECT.ARC included with
- ADVBAS to the same disk/directory.
- 3. Enter BUILDLIB < NEWLIB.BLD
- 4. The resulting file "NEWLIB.EXE" will have all of the
- ADVBAS routines as well as MOUSEMNU.
-
- A similar process can be followed to add MOUSEMNU to the
- ADVBAS.LIB using the /o (using BCOM30.EXE) option and the MASM
- LIB program or alternately the MOUSEMNU.OBJ (again /o) can be
- added during the LINK process:
-
- LINK prog+MOUSEMNU,.....