Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site k.cs.cmu.edu Path: utzoo!linus!philabs!cmcl2!seismo!rochester!pt.cs.cmu.edu!k.cs.cmu.edu!tim From: tim@k.cs.cmu.edu (Tim Maroney) Newsgroups: net.micro.mac Subject: Re: Time for SubMenus Message-ID: <626@k.cs.cmu.edu> Date: Thu, 31-Oct-85 07:42:27 EST Article-I.D.: k.626 Posted: Thu Oct 31 07:42:27 1985 Date-Received: Sun, 3-Nov-85 12:17:32 EST References: <3@gumby.UUCP> <610@k.cs.cmu.edu.ARPA>, <1166@sdcsvax.UUCP> Organization: Carnegie-Mellon University, Networking Lines: 28 Victor Romano: > Wouldn't it be easy just to rewrite the menu definition procedure? No. There are three messages to menus, one to draw the whole menu, one to handle mouse-ups, and one to figure out the menu size. There's no message to handle hiliting of a particular item during dragging. That's why, as I said, you'd have to use a back door, such as installing a vertical retrace task that checks the mouse, or patching MenuSelect. There are no hooks in the existing Menu Manager (none documented, anyway) that would allow sub-menus to pop up as you dragged through the menu, the proposed behavior. > There is one problem though: how do you create > a "window" (which overlays the other windows on the screen) > and put the previous stuff back on the screen immediately > after the "window" is closed (rather than after an update > event). This is what happens when you pull down a menu > in the menu bar - a "window" (or a grafport, or whatever) > appears to show the items. That part's easy! Get a block from the Memory Manager, use CopyBits to copy from the screen rectangle about to be overdrawn into the heap block, draw the menu, and when the menu goes away, reverse CopyBits and dispose of the heap block. Don't use a new window or grafPort, just the Window Manager port (saving and restoring the current grafPort, of course). -=- Tim Maroney, CMU Center for Art and Technology Tim.Maroney@k.cs.cmu.edu uucp: {seismo,decwrl,etc.}!k.cs.cmu.edu!tim CompuServe: 74176,1360 Religion is a branch of psychology.