home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 287.lha / MenuPal_vA.1 / MenuPal.doc < prev    next >
Text File  |  1989-09-09  |  9KB  |  260 lines

  1.    MenuPal  -   Copyright 1989 by Tim Coffey
  2.                 Alpha release A.1 (Test release)
  3.                 This is a DEMO version only.
  4.                 NOT IN THE PUBLIC DOMAIN.
  5.  
  6.                 NOT TO BE REDISTRIBUTED ON ANY OTHER BULLETIN BOARD
  7.                 WITHOUT PERMISSION OF THE AUTHOR.
  8.  
  9.                 Written using Modula-2/Amiga
  10.                 TDI Software Inc. Dallas, Texas.
  11.  
  12.  
  13.    Okay, here it is - the long needed improvement to the Amiga's menuing
  14.  
  15. operations. My program, 'MenuPal', will take over the entire menuing opera-
  16.  
  17. tions for the Amiga and add some very useful extras. By 'extras', I mean
  18.  
  19. 3 new menu types - including the standard menu type (ScreenBar).
  20.  
  21.    Here are the 4 menu types I support:
  22.  
  23.       ScreenBar: The standard menu look.
  24.  
  25.       WindowBar: The menu bar will appear in the top of the window that
  26.                  controls the menu. For full screen size windows, this
  27.                  will effectively appear just like ScreenBar menus.
  28.  
  29.           PopUp: A menu that appears at the pointer. Allows fast menuing.
  30.  
  31.         TearOff: My personal favorite. This menu type is created from any
  32.                  of the 3 above by placing the pointer in the parent's
  33.                  select box of the menu you want to tear off. Click-hold the
  34.                  left button to 'drag' the menu to the location you wish.
  35.                  Then, release the left button to open the new TearOff menu.
  36.                  Note that releasing the right button while dragging the new
  37.                  TearOff menu will cancel the open. You must then press the
  38.                  right button again and release it again to stop menuing.
  39.  
  40.  
  41.  
  42.       Any window can have it's menus in one of the 3 menu modes: ScreenBar,
  43.  
  44.    WindowBar, or PopUp. You can toggle the mode from one to the next by
  45.  
  46.    activating the menu and pressing the left button while the pointer is
  47.  
  48.    outside the main menubar. Once specified, the window stays in the mode
  49.  
  50.    that you have specified. Note that upon opening, a window may be in any
  51.  
  52.    of the 3 modes randomly. This is unavoidable, but easily changed by
  53.  
  54.    pressing the Left button until it is the type you want.
  55.  
  56.  
  57. TearOffs:
  58.  
  59.       TearOff menus operate very differently. First, they are activated by
  60.  
  61.    placing the pointer inside the TearOff menu box. You need not press the
  62.  
  63.    menu button. Second, the window is notified of any items you pick only
  64.  
  65.    after the pointer leaves the TearOff menu box. Third, TearOff menus
  66.  
  67.    stay on screen until you explicitly close them. You will also notice
  68.  
  69.    that an opened TearOff menu has some gadgets drawn into them.
  70.  
  71.    These gadgets are:
  72.  
  73.                   Close:  Does what you expect. Shuts the TearOff menu
  74.  
  75.       Depth arrangement:  Function just like any other depth gadgets.
  76.  
  77.                  Sizing:  Works differently than a normal sizing gadget.
  78.                           It toggles the TearOff menu between full-size and
  79.                           reduced mode. When reduced, only the top of the
  80.                           TearOff menu is shown. This helps avoiding
  81.                           cluttering of the screen with TearOff menus.
  82.  
  83.                           Note that the TearOff menu can still be used
  84.                           when in reduced mode by placing the pointer in
  85.                           the visible portion and 'pulling down' the menu
  86.                           with the mouse. There is no need to press any
  87.                           buttons to do this.
  88.  
  89.                    Drag:  Is used to drag the TearOff menu around the
  90.                           screen. They do not look the same as other drag
  91.                           gadgets, but are functionally equivalent.
  92.                           Note that pressing the right button while dragging
  93.                           the TearOff menu to it's new location will cancel
  94.                           the dragging process.
  95.  
  96.  
  97.    TearOff menus will close
  98.  
  99.    automatically whenever it's parent window closes. There are also
  100.  
  101.    rare instances when a TearOff menu will close because it's 'checksum'
  102.  
  103.    (used to insure integrity) is wrong. This can happen if the application
  104.  
  105.    does some weird stuff with it's menus. An example is PowerWindows by
  106.  
  107.    Inovatronics.
  108.  
  109.  
  110. Rendering differences:
  111.  
  112.    MenuPal will render menu's almost identical in look to Intuition menus.
  113.  
  114.    On occasion, especially for PopUp menus in extreme Left/Right/Top/Bottom
  115.  
  116.    places, parts of the menu will render justified some way so that the
  117.  
  118.    entire strip can appear on screen. Functionality is not impaired by this.
  119.  
  120.  
  121. MenuPal's own menu:
  122.  
  123.    ShutDown Menu
  124.       MenuPal - will close MenuPal. Same as clicking the close gadget on
  125.                 MenuPal's window.
  126.  
  127.    Options Menu
  128.       Send MenuVerify - when checked, MenuVerify messages will be sent
  129.                         to the application before menuing starts, just
  130.                         like Intuition would.
  131.  
  132.                         When NOT checked, the MenuVerify will NOT be sent.
  133.                         Instead, menuing will start immediately. This could
  134.                         cause problems with some applications. It is here
  135.                         because some applications like to CANCEL menuing
  136.                         if the pointer is not in a certain part of the screen.
  137.                         This way, PopUp menus can be used anywhere on the
  138.                         screen. DPaint, I believe, is one such application
  139.                         that requires the pointer be at the top of the
  140.                         screen before it allows menuing.
  141.  
  142.                         Also, as of this time, a TearOff menu will NOT
  143.                         send a MenuVerify before it is activated.
  144.  
  145.  
  146.       Sleeping - when checked, MenuPal is effectively asleep as far as
  147.                  menuing operations are concerned. Any menuing will then
  148.                  be controlled by Intuition.
  149.  
  150.    TearOffs Menu
  151.       Close for Window - will close all TearOff menus for the last
  152.                          active window.
  153.       Reduce for Window - will reduce all TearOff menus for last active
  154.                           window.
  155.       Expand for Window - will expand all TearOff menus for last active
  156.                           window.
  157.       Front for Window - will bring all TearOff menus for last active window
  158.                          to front.
  159.       Back for Window - will push all TearOff menus for last active window
  160.                          to back.
  161.  
  162.       xxx for Screen - will do the same as described except it will affect
  163.                        all TearOff menus for last active screen.
  164.  
  165.  
  166.  
  167. Constraints:
  168.  
  169.       MenuPal will NOT control menus for it's own window or any window
  170.  
  171.       controlled by the Workbench program proper. This is to prevent
  172.  
  173.       potential lockups. I'm sure you don't mind this.
  174.  
  175.  
  176.       Also, MenuPal does NOT listen for Mouse equivalent keyboard
  177.  
  178.       combinations. Example - pressing Right Amiga+Right ALT to activate
  179.  
  180.       a menu will NOT be seen by MenuPal. Instead, Intuition will see it
  181.  
  182.       and render the menu itself. This will be changed in a later release
  183.  
  184.       so that MenuPal recognizes keyboard combinations as their corres-
  185.  
  186.       ponding Mouse events.
  187.  
  188.  
  189. INFO:
  190.  
  191.    Okay, how did I do all this you ask? Well, I have to draw the entire
  192.  
  193.    menu strip myself. this is not too tough and takes up about 20% of the
  194.  
  195.    code. I also have to monitor the input.device for mouse activity. This
  196.  
  197.    is about 30% of the code. The rest is TearOff menu support and stuff
  198.  
  199.    like sending IDCMP messages to windows.
  200.  
  201.  
  202. FUTURE ENHANCEMENTS:
  203.  1.
  204.    Conserving bitmap allocation for applications, like paint programs, that
  205.  
  206.    use a lot of colors. Currently, if the screen depth is 5, I allocate
  207.  
  208.    5 rasters per menu strip - even if the largest color used in defining
  209.  
  210.    the menu could be rendered in 2 rasters. This will be a 'transparent'
  211.  
  212.    change. (Pun intentional)
  213.  
  214.  
  215.  2.
  216.    For my own sanity, porting this thing off of TDI to some other
  217.  
  218.    Modula-2. Right now, I can't afford a new compiler or memory upgrade
  219.  
  220.    that some require to run.
  221.  
  222. BUGS:
  223.  
  224.    Yes, there are bugs. Hey, this is an Alpha release, remember? Anyway
  225.  
  226.    I don't seem to handle low-memory very well. 'Poorly' is the word.
  227.  
  228.    Most of the other problems seem to be related exclusively to the
  229.  
  230.    Layers functions I have to use to manipulate TearOff menus. Layers
  231.  
  232.    seems to be a very non-forgiving library. Anything slightly wrong
  233.  
  234.    calls the GURU. Moving TearOff menus seems to cause the most
  235.  
  236.    problems.
  237.  
  238.  
  239.    Hey, let me know what this thing does not work with. I don't own
  240.  
  241.    all commercially available software, so I have to rely on you folks
  242.  
  243.    as testers.
  244.  
  245.  
  246.    This doc should be enough to get you going. Using MenuPal isn't too
  247.  
  248.    complicated, so the amount of docs required isn't that much.
  249.  
  250.  
  251.       Use it in good health. Please inform me of problems.
  252.  
  253.             Tim Coffey
  254.  
  255.             72377,2617
  256.  
  257.             (614) 848-9724
  258.  
  259.  
  260.