The Mercutio MDEF is a Menu DEFinition resource that allow developers to easily
and elegantly extend the power of their application menus. These MDEFs allow
menus to have multiple-modifier key-equivalents (e.g. shift-command-C),
custom icons, item callbacks, and other goodies.|
The following new features were added to 1.5 and 1.5.1. Initial MacOS 8
features originally introduced in version 1.3.4 have been rolled into
Major feature additions and changes since 1.2 are:
- Fixed many cosmetic bugs -- see release notes for details.
- Added support for Appearance Manager 1.0, 1.0.1 and 1.0.2 menus,
including Platinum Theme.
- Fixed a bug that would unlock GDevice handles when Mercutio was used
to display popup menus.
- Changed the semantics of sameAlternateAsLastTime constant to
"don't redraw by default". Fixes flickering in menu items whose
icons are set by callback routines.
- Cleared purgeable flag from MDEFFont NFNT resource; this could cause
the font to be unloaded and incorrect glyphs to show up in menus.
As before, Mercutio includes::
- Support for window font/size: Mercutio now correctly draws popup menus in
the current font and size. This means you can use Mercutio for Geneva 9-pt
popup menus and the like.
- Graphic icons for non-printing keys: non-printing key equivalents such as
page up/ down, home/help, etc. can be drawn as text or as icons that look
like the keys on the extended keyboard.
- Noticeable speed-up on text-only menu items.
- Substantially increased stability; fixed several memory-related bugs.
- Various cosmetic changes, optimizations and minor bug fixes.
- New software license -- please read as it defines the terms under which
you may use Mercutio.
Other changes and notes about this release are in the "About Mercutio 1.3"
file included in the archive.
- Support for non-printing keys (function keys, page up/down,
arrow keys, etc)
- Support for icon suites, small and large icons, and SICNs in
hierarchical menu items.
- Support for all 4 modifier keys: (command, shift, option, control)
- User-definable style mapping: developer determines which style
bits are used as feature flags
- Dynamic items: items whose contents change depending on what
modifier keys are being held down (e.g. when the option key is
held down, Save becomes Save All).
- Application callback routine to let you decide on the fly what
the item contents should be.
- System 7's Balloon Help and True Gray.
- Color menus.
- 99% compatible with standard MDEF.
The Mercutio MDEF works under System 6.0.4 or later, with or without
Color QuickDraw. Mercutio is fully compatible with System 7, and supports
all the features of the System MDEF. Integrating the MDEF into your program
shouldn't take more than 15 minutes.
The documentation for Mercutio is in Adobe's PDF format.
- Dymamic menus don't work after submenu selected. or
Dymamic submenus don't work if the mouse is in the parent menuitem.
- This is a limitation of the OS architecture.
MDEFs are written to respond to system generated events passed
to the MDEF by the Menu Manager. The MDEF relies completely on the
Menu Manager for update, hilight, etc. events, which sends these events to
the "current menu". "Current menu" is defined as the one that the mouse
is over, so only one menu gets these events at a time. When the mouse is over
a hierarchical menu item, the submenu is displayed but does not receive
events. When the mouse is moved over the submenu, the submenu receives events
and the parent menu no longer receives them. Thus, Mercutio can only support
dynamic menus in one visible menu at a time. In order for both menus to have active dynamic menu items, the MacOS Menu
Manager would need to be changed send update events to all visible
menus (the parent and sub-menus).
- Key equivalents are triggered for items in a disabled menu.
- Most likely the menu items are in a submenu of a disabled menu. Disabling
a menu does not disable any hierarchical menus that hang off of the
toplevel menu. As a result, any menu items in these hierarchical menus are
fair game for being matched by MDEF_MenuKey.
Note that the toolbox MenuKey routine also exhibits this behavior.
Workaround: Write your own DisableMenu
function that disables a menu and its submenus.
- Key equivalents still work when a dialog box is open or
Disabled menus still hilight while a dialog box is open.
- When you open a
modal dialog, the dialog manager disables toplevel menus, leaving hierarchical
menus enabled (as described above). The Dialog Manager automatically calls
the toolbox MenuKey routine to handle Cmd- keypresses. Since MenuKey scans the
hierarchical menu list without checking whether or not the parent menu is enabled,
an item in a submenu may be triggered, resulting in flashing the name
of the parent menu in the menubar.
Workaround: Disable submenus
yourself when you open a dialog box.
- NowMenus is incompatible with custom MDEFs.
- NowMenus allows users to reassign key equivalents. This is done by
using the mouse to hilite a menu item, then (with your other hand) hitting
the key equivalent you want. This is a nice feature, and I'd like Mercutio
to be compatible with it. I have contacted Now about this but am having
a hard time getting enough mindshare from them to figure out where the
Note that this is a general problem with NowMenus. From their "Compatibility Notes" file:
- Microsoft Word, Microsoft Excel, and Aldus Freehand prevent Now Menus from
customizing menu fonts and adding custom Hot Keys directly in menus.
Now Menus doesn't conflict with these applications or others with
nonstandard menu definitions--you just can't customize their menus.
To complain about this, send the Now Utilities team e-mail at firstname.lastname@example.org.
- Apple Guide
- Apple Guide marks occasionally makes dynamic items visible. This is
because Apple Guide resets the item style to plain before making it
red and underlined. The fix is to add the correct styles to your
Apple Guide file instead of relying on the default (underline). See
Mercutio documentation for details.