[comp.sys.mac.programmer] A Modest Proposal Concerning Pop-Up Menus

d88-bli@nada.kth.se (Bo Lindbergh) (09/05/89)

From IM-V, page 242:
   "Your application is responsible for drawing the pop-up box.  A pop-up
   box is a rectangle that is the same height as the menu item, is wide
   enough to show the currently selected item, and has a one-pixel-wide
   drop shadow."

This means that the application has to second-guess the menu defproc
and calculate the height and width of the menu item on its own.
Bad.  Incomplete isolation of information.  Insufficient abstraction.
Etc.  Etc.

What I would like to see is two new standard messages to the menu defproc
and two corresponding Menu Manager routines to use them.
The first message asks the defproc to calculate the height and width
of a single item.
The second message asks the defproc to draw a single item
in the supplied rectangle.

The application can then handle all pop-up menus in the same way,
regardless of what defproc (standard or custom) each menu uses.
This is, IMHO, A Good Thing.

Comments, anyone?