home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20436 < prev    next >
Encoding:
Text File  |  1992-12-30  |  1.6 KB  |  32 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. 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
  3. From: urban@yoda.fsl.noaa.gov (Art Urban)
  4. Subject: TCL: Did I Cheat, or What?
  5. Message-ID: <1992Dec30.171952.16320@fsl.noaa.gov>
  6. Sender: urban@fsl.noaa.gov 
  7. Organization: Forecast Systems Lab, NOAA, Boulder CO, USA
  8. Date: Wed, 30 Dec 1992 17:19:52 GMT
  9. Lines: 21
  10.  
  11. Last night I thought it would be great if I could write a CMouseTask
  12. subclass which drags visual entities around in a window. Fine. I created a
  13. subclass of CPane and in it invoked my CDragOutlineTask in a TrackMouse()
  14. call. Much to my surprize this "nearly" worked. The problem I had was that
  15. the click in CMyPane was invoking the Prepare() method which sets up a
  16. clipRgn equal to CMyPane's aperture. Ergo, my DragGrayRgn() call was
  17. getting clipped to CMyPane's bounding rectangle...not exactly what I was
  18. hoping for.
  19.  
  20. So, I began to look for a method (inherited or otherwise) which would allow
  21. me to redefine the clipRgn. I found none, so I passed a Prepare() message
  22. to CMyPane's enclosure which conveniantly was theMainPane. This did the
  23. trick. My gray region now is visible and clipped within the window. The
  24. question is however, did I cheat? Was there a better way to achieve my
  25. desired result?
  26.  
  27. -- 
  28. Art Urban                             urban@yoda.fsl.noaa.gov
  29. ===============================================================================
  30.  "Look, he's being attacked by creamy nugget centers."              -Joel
  31. ===============================================================================
  32.