Article View: comp.windows.news
Article #21Re: Buttonless mouse tracking in TNT 3.0
From: Don Woods
Date: Mon, 03 Aug 1992 08:53
Date: Mon, 03 Aug 1992 08:53
42 lines
2054 bytes
2054 bytes
patl@bodacia.eng.sun.com writes: | In article 965@modular.UUCP, earley@modular.com (Joe Earley) writes: | >I can't figure | >out how to track the mouse movement in a TNT 3.0 canvas without making | >the user press the select or adjust button. | | How are you supposed to tell whether you are drawing or not if you | don't have a button down? | | Assuming that you have a good answer for that... | | What you want is the MotionService. It was implemented in 3.0, but | too late to get into the documentation. [details of MotionService mostly omitted] | Legal values for /setwatchmotion: | | /None Ignore mouse motion | (Except with button down - via TrackService) | /Local Call /HandleMotion for each mouse motion event | within this canvas. | /All Call /HandleMotion for each mouse motion event | anywhere on the screen. A few minor corrections: - Motion tracking was indeed implemented late in 3.0; I believe it is mentioned somewhere in the Release Notes even though it got it too late to be in the mainline documentation. - Instead of calling /setwatchmotion, you can override the class variable /WatchMotion. (Usual class-vs-instance tradeoffs apply.) - The /Local mode calls /HandleMotion for mouse motion events within the canvas, and also for enter/exit events to/from the canvas. - There is another possible value for /WatchMotion: /Crossing. This calls /HandleMotion *only* for enter/exit events. -- -- -- Don Woods. [*** Generic Disclaimer ***] -- ...!sun!woods.eng -or- Woods@Eng.Sun.com
Technical Details
Message-ID:
<l7pt0uINN4ds@exodus.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!sun-barr!news2me.ebay.sun.com!exodus.Eng.Sun.COM!colossal.Eng.Sun.COM!woodsReferences:
<965@modular.UUCP> <l7jpoeINNt53@exodus.Eng.Sun.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!news2me.ebay.sun.com!exodus.Eng.Sun.COM!colossal.Eng.Sun.COM!woods From: woods@colossal.Eng.Sun.COM (Don Woods) Newsgroups: comp.windows.news Subject: Re: Buttonless mouse tracking in TNT 3.0 Date: 3 Aug 1992 08:53:50 GMT Organization: Sun Microsystems Lines: 42 Distribution: world Message-ID: <l7pt0uINN4ds@exodus.Eng.Sun.COM> References: <965@modular.UUCP> <l7jpoeINNt53@exodus.Eng.Sun.COM> NNTP-Posting-Host: colossal