home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!boulder!csn!qwerty-gw.fsl.noaa.gov!yoda.fsl.noaa.gov!urban
- From: urban@yoda.fsl.noaa.gov (Art Urban)
- Subject: TCL: Did I Cheat, or What?
- Message-ID: <1992Dec30.171952.16320@fsl.noaa.gov>
- Sender: urban@fsl.noaa.gov
- Organization: Forecast Systems Lab, NOAA, Boulder CO, USA
- Date: Wed, 30 Dec 1992 17:19:52 GMT
- Lines: 21
-
- Last night I thought it would be great if I could write a CMouseTask
- subclass which drags visual entities around in a window. Fine. I created a
- subclass of CPane and in it invoked my CDragOutlineTask in a TrackMouse()
- call. Much to my surprize this "nearly" worked. The problem I had was that
- the click in CMyPane was invoking the Prepare() method which sets up a
- clipRgn equal to CMyPane's aperture. Ergo, my DragGrayRgn() call was
- getting clipped to CMyPane's bounding rectangle...not exactly what I was
- hoping for.
-
- So, I began to look for a method (inherited or otherwise) which would allow
- me to redefine the clipRgn. I found none, so I passed a Prepare() message
- to CMyPane's enclosure which conveniantly was theMainPane. This did the
- trick. My gray region now is visible and clipped within the window. The
- question is however, did I cheat? Was there a better way to achieve my
- desired result?
-
- --
- Art Urban urban@yoda.fsl.noaa.gov
- ===============================================================================
- "Look, he's being attacked by creamy nugget centers." -Joel
- ===============================================================================
-