home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / library / qb_pds / mouse / mousemnu / mousemnu.doc next >
Encoding:
Text File  |  1987-07-12  |  4.2 KB  |  94 lines

  1.               
  2.        Inspired by BARMENU from BWTOOLS by Dave Evers and using mouse 
  3.        and screen handling routines from ADVBAS by Thomas Hanlin III, 
  4.        MOUSEMEN is hereby placed in the Public Domain.
  5.  
  6.        This subroutine was tested with ADVBAS v3.4, 06/25/87
  7.                                        QuickBasic v3.0, 04/07/87   
  8.  
  9.        Ray Schwarz 76012,133
  10.  
  11.  
  12.  
  13.  
  14.       MOUSEMNU
  15.  
  16.       Purpose:     Produces a display similar to the editing screen of
  17.                    QuickBASIC with a bar across the top and uses the mouse
  18.                    to Pull-down 1-6 menues. When the mouse is 'clicked' at
  19.                    a Menu Bar, a Pull-Down menu is displayed as long as the
  20.                    mouse button is held. A highlighted bar follows the mouse
  21.                    cursor to indicate items to be selected.
  22.  
  23.       SUB MOUSEMNU(MLINE$(1),MENUFG%,MENUBG%,BLKSIZE%,BLKNUM%,MAXSIZE%(1),
  24.                    MAXITEMS%(1),ITEMS$(2),MENUSLCT%,ITEMSLCT%) STATIC
  25.  
  26.       Passed:       MLINE$ - A string array holding the Menu Headings that
  27.                              will be placed on the second screen line (to
  28.                              allow or a screen border if desired).
  29.  
  30.                    MENUFG% - An integer holding the foreground color of
  31.                              the Menu line.
  32.  
  33.                    MENUBG% - An integer holding the background color of
  34.                              the Menu line.
  35.  
  36.                   BLKSIZE% - The Menu line is divided into BLOCKS of
  37.                              fixed size, which will be highlighted as
  38.                              each is selected and the appropriate menu
  39.                              'drops down' beneath it.  This integer sets
  40.                              the size of these blocks.
  41.  
  42.                    BLKNUM% - The number if fixed blocks of BLKSIZE% that
  43.                              are present in array MLINE$.
  44.  
  45.                 MAXSIZE%() - An integer array with one element for each
  46.                              menu that will appear (i.e., BLKNUM%).  This
  47.                              array element holds the maximum length of the
  48.                              items contained in the corresponding menu.
  49.  
  50.                MAXITEMS%() - An integer array also with one element per
  51.                              menu holding the number of items in each
  52.                              corresponding menu.
  53.  
  54.                 ITEM$( , ) - A two-dimensional array (i.e. ITEMS$(1,1)
  55.                              holding the actual menu item strings.  The
  56.                              first dimension holds the menu number, and
  57.                              the second holds the item number within a
  58.                              menu.  Thus, ITEMS$(1,1) would be the first
  59.                              item in Menu #1; and ITEMS$(5,10) would be
  60.                              the 10th item in Menu #5.
  61.  
  62.       Returns:   MENUSLCT% - An integer holding the menu number of the
  63.                              selection made.
  64.  
  65.                  ITEMSLCT% - An integer holding the item number within
  66.                              the menu selected.
  67.  
  68.                              For example, if item 10 in menu #5 were
  69.                              selected, MENUSLCT% would be 5 and
  70.                              ITEMSLCT% would be 10.
  71.  
  72.  
  73.  
  74.        Other files:
  75.  
  76.         MOUSESAM.BAS - QuickBasic program to demo MOUSEMNU
  77.         NEWLIB.BLD - Buildfile to add MOUSEMNU to the files contained in
  78.                      ADVBAS.EXE user library.
  79.  
  80.         To add:
  81.                 1. Compile MOUSEMNU to .obj (using BRUN30.EXE)
  82.                 2. Extract the .OBJ files from OBJECT.ARC included with
  83.                    ADVBAS to the same disk/directory.
  84.                 3. Enter BUILDLIB < NEWLIB.BLD
  85.                 4. The resulting file "NEWLIB.EXE" will have all of the
  86.                    ADVBAS routines as well as MOUSEMNU.
  87.                 
  88.        A similar process can be followed to add MOUSEMNU to the
  89.        ADVBAS.LIB using the /o (using BCOM30.EXE) option and the MASM
  90.        LIB program or alternately the MOUSEMNU.OBJ (again /o) can be
  91.        added during the LINK process:
  92.  
  93.                 LINK prog+MOUSEMNU,.....        
  94.