Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1.chuqui 4/7/84; site apple.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!nsc!voder!apple!lsr From: lsr@apple.UUCP (Larry Rosenstein) Newsgroups: net.micro.mac Subject: Re: Palettes: suggestions on how to do them Message-ID: <2106@apple.UUCP> Date: Wed, 16-Oct-85 21:02:50 EDT Article-I.D.: apple.2106 Posted: Wed Oct 16 21:02:50 1985 Date-Received: Fri, 18-Oct-85 01:15:42 EDT References: <194@mmm.UUCP> <3128@ut-sally.UUCP> Reply-To: lsr@apple.UUCP (Larry Rosenstein) Distribution: net Organization: Advanced Development Group, Apple Computer Lines: 52 There are a number of ways to do palettes according to what you like best; there is no "right" way. There are 2 issues to think about. How to implement the palette and where to implement it. I agree that using the Dialog Manager is overkill. Palettes are generally very regular in structure, so it is only a matter of divising coordinates to get the palette item a user clicks in. In addition, you would have to go to a fair amount of work to get the Dialog Manager to display all the little symbols you wanted. As far as showing your palettes, there are several possibilities: in the window (as in MacDraw) globally (as in MacPaint) in graphical menus (used in MacDraw) Each has advantages and disadvantages. One advantage of menus is that they are available regardless of the position of the document windows on the screen. (If MacPaint had resizable windows, then you might want to make the window the full screen size sometimes, which would cover the palettes.) In PageMaker, the Toolbox window is a regular window with title bar, that is in front of the document window. The document window's title bar is also highlighted. It appears that the program makes the Toolbox window the "ghost window", because clicks in the document window are processed as it that window was frontmost. If you store a windowPtr in the ghost window low memory location, then the FrontWindow call will never report that window as the frontmost, even if it is. The idea of modifying the grayRgn variable to affect each window's visRgn, as described by robdye@sally.UUCP (Rob Dye), is very clever. There is not good answer to the problem he described (his palette shows up on top of DAs and Dialogs!). One way would be to change the visRgn of just the windows belonging to his application. This would have to be done when the palette or a document window is opened/closed/moved. Making the palette a real window and setting it up as the ghost window might help in this respect. -- Larry Rosenstein Apple Computer UUCP: {voder, nsc, ios, mtxinu, dual}!apple!lsr CSNET: lsr@Apple.CSNET