Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: MacApp: Extending the zoom box User Interface Message-ID: <40683@apple.Apple.COM> Date: 2 May 90 16:33:38 GMT References: <24079@mimsy.umd.edu> Distribution: usa Organization: Apple Computer Inc, Cupertino, CA Lines: 68 In article <24079@mimsy.umd.edu> sla@brillig.umd.edu (Steve Armentrout) writes: > >I have a window in my application for which I would like to extend the >User Interface of the zoom box. This window has five user-states that >are simply different sized windows/views on the same data. I would like >to allow the user to "zoom" in and out through these user-states without >having to expend the real estate required for a grow box. Currently, my >favorite idea is to use the two regions of the standard zoom box to >differentiate between zoom-in and zoom-out. For example: > > xxxxxxxxx > x x x > x IN x x > xxxxxx x > x OUT x > xxxxxxxxx > >If the user clicks on the zoom box, the region receiving the click >(IN or OUT) would hilite. If the user drags from one region to the >other, the hiliting will toggle to the newly occupied region. If >the mouseUp occurs in region IN then the window will zoom-in (ie get >smaller) and similarly, a mouseUp in region OUT will zoom-out. > >User Interface question: Is this a plausible extention to the User >Interface of the zoom box? The only objection I can forsee is that the >regions may be a bit small (note: my application is not targeting the >senior citizen market). > >Technical question: How do I implement this behavior most simply using >MacApp? > >The best try I have at the moment is to override ZoomByUser to create >and post a ZoomBoxTracker command which will provide the aforementioned >hiliting and call Zoom as appropriate. Can I simply set the fView of >the ZoomBoxTracker to be my window to allow drawing in the title bar >(more specifically the zoom box) of the window? I realize that the drawing >performed by my ZoomBoxTracker would not be under the auspice of MacApp, >so what do I need to do in order to draw? > >The other technique I have in mind is to stuff the global var DragHook >with my own procedure, but the documentation is unclear as to whether >this will work. IM I roughly states that "the highlighting will depend >upon the window function defined for the window". If I use DragHook, will >my procedure be called by TrackBox INSTEAD of the window function or in >ADDITION to the window function? > >Some insightful comments could save me some time. Steve, Probably the best way to do the tracking would be to take the standard WDEF and modify it so that it does the right kind of tracking on the zoom box (you can get the source to the WDEF from our ftp site). You can't really have MacApp do the tracking, as MacApp (as in all other applications) only tracks the mouse in the content region of the window, not the frame. If you do change the standard action of the zoom box, then you may also wish to changes its appearance. Either make the box a different shape, or replace it with two other boxes that can't get confused with the standard zoom box. -- ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. --- Developer Technical Support INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "Argue for your Apple, and sure enough, it's yours" - Keith Rollin, Contusions