comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: draw window mouse events
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: draw window mouse events [message #19914 is a reply to message #19910] Thu, 27 April 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Rick Towler (rtowler@u.washington.edu) writes:

> I have been trying to implement middle and third button events in my
> draw widget in much the same way as in the IDL demo d_objworld2.pro. I
> have not found it easy to understand how everything happens in this demo
> program.
>
> I am interested in getting one of these buttons to utilize the TRANSLATE
> feature of the trackball object so I can translate my models. I did
> have the left button transforming the model but I have broken that in my
> quest to understand this whole process which obviously I don't since I
> can't get it working again.
>
> I have the events getting into the correct handling loops. That is,
> clicks and motion trigger print statements in my loops, but I cant seem
> to get the updates from the trackball object. Every call to
> oTrack->update returns EQ 0.
>
> Hints and/or pointers to examples that are a wee bit simpler than
> d_objworld2 are much appreciated.

The problem here is this:

> 'MOTION': BEGIN
> print,'Motion with btndown='+string(state.btndown)
> IF (state.btndown) AND (bHaveTransform) THEN $
> state.oDWindow->Draw,state.oView
> END

You are not *doing* anything with motion events except
displaying the same view over and over again. Pretty
dull.

What you need here is a CASE statement that allows
you to rotate with the LEFT button, translate with
the RIGHT, etc.

I'm not feeling well enough to write an example today,
and looking at RSI code even when I feel well is almost
too much, but I'm guessing if you go look at that
d_objworld2 example you will find a LOT more code
in the MOTION section. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Previous Topic: Re: VB and IDL
Next Topic: HOW TO TURN SIX DOLLARS INTO SIX THOUSAND DOLLARS!!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 18 18:28:43 PDT 2025

Total time taken to generate the page: 2.19914 seconds