Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: How does one save/restore clipping? Message-ID: <47697@apple.Apple.COM> Date: 3 Jan 91 06:24:24 GMT References: <1CE00001.csbntk@tbomb.ice.com> Organization: Apple Computer Inc., Cupertino, CA Lines: 27 In article <1CE00001.csbntk@tbomb.ice.com> time@tbomb.ice.com writes: > >I have long been satisfied with simple routines called "focus" and >"unfocus" that would let me move from port to port in my applications >without much interference. > >Now, however, I have run into a case where I wish I could save the >clipping of a port, and restore it later. I see no standard mathod >mentioned in IM concerning this function. I presume that saving the >ClipRgn handle in the port and replacing it afterwards is the approach, >but hadn't thought through what other needs I must address. > >Has anyone solved this problem? Suggestions? Tim, Two other people have suggested that you look into SetClip and GetClip. However, your use of the term "focus" suggests that you are using MacApp. If that's the case, then you can use GetFocus and SetFocus (be sure to allocate the clipRgn in the FocusRec first!). -- ------------------------------------------------------------------------------ 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