Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!olivea!samsung!crackers!m2c!umvlsi!umaecs!amh!djvelleman From: djvelleman@amherst.bitnet Newsgroups: comp.sys.mac.programmer Subject: Re: Resizable windows Message-ID: <10692.271c7ccb@amherst.bitnet> Date: 17 Oct 90 15:46:19 GMT References: <90287.182643CXT105@psuvm.psu.edu> <1990Oct15.020733.16435@engin.umich.edu> <1990Oct15.190508.8408@svc.portal.com> Lines: 44 In article <1990Oct15.190508.8408@svc.portal.com>, leonardr@svc.portal.com (Leonard Rosenthol) writes: > In article <1990Oct15.020733.16435@engin.umich.edu>, > mystone@mondo.engin.umich.edu (Dean Yu) writes: >> In article <90287.182643CXT105@psuvm.psu.edu> CXT105@psuvm.psu.edu (Christopher Tate) writes: >> >Problem: I want a resizable window, with the grow box in the lower right >> >and all that, but I do not want any scroll bars. I JUST want the box that >> >indicates the window is resizable. >> > >> If you're going to use the standard WDEF, you can set the clip region of >> your window to a 16 by 16 square that's in the bottom right of your window >> before calling _DrawGrowIcon. The grow icon will be drawn, but the lines >> for the scroll bars will be clipped out. >> > There is, however, one problem with this...What if Apple ever changes > the size of the 'GrowIcon', then you either end up with extra stuff, or not > enough? This will also effect utilities like Personality and ClickChange > which allow the user to change the WDEF in use. > The PROPER solution is to write a WDEF, and second, I think would > be to at least stub the standard WDEF and handle the wGrowMsg message > yourself. Admittedly, writing a WDEF is not entirely trivial, but Apple > supplies source to theirs, and you can just mod the appropriate parts. If Apple ever changes the size of the growicon, they might also change the width of the scrollbar region. What do you suggest we do about setting the size of our scrollbars? Should every program that has a scrollbar have its own window def, rather than relying on the width of the scrollbar region of the standard WDEF not to change? I agree that it's a good idea not to rely too much on specific features of the current standard window, control, and menu definition functions, to be compatible with future changes, but there are limits to how far one can reasonably take this. It seems to me it is much more likely that Apple will change the APPEARANCE, but not the size, of the standard growicon (adding color, or shading, or little animated green men who grab the corners of your window and move them for you :-) If you use your own WDEF then your program will look out of date when these improvements appear. I vote for the clipping solution to this problem. BTW, I think the proper size of the rectangle to clip to is 15 by 15, not 16 by 16. I have found clipping to be useful in other situations when the toolbox wants to draw something but I don't want it to be drawn. (For example, the control manager always likes to redraw controls immediately whenever you do anything to them.) Dan Velleman Math Dept. Amherst College