[vtk-developers] vtkGenericRenderWindowInteractor

Miller, James V (Research) millerjv at crd.ge.com
Tue Apr 16 11:48:08 EDT 2002


I think Tk also supports "virtual" events. I believe these
allow a user to define a "new" event type and trigger that
event.  So instead of Button1-down you could define a 
BeginRotate event. 

I've never used these but thought they could be useful
for testing applications since you can programmatically
cause certain events to occur.





-----Original Message-----
From: Michael Halle [mailto:halazar at media.mit.edu]
Sent: Monday, April 15, 2002 7:00 PM
To: Prabhu Ramachandran
Cc: vtk-developers at public.kitware.com
Subject: Re: [vtk-developers] vtkGenericRenderWindowInteractor 



What if the interactor's events were named after what they do, not
what triggers them?  For instance, vtkBoxWidget has methods called
OnMiddleButtonDown() and OnLeftButtonUp().  That means that the
toolkit knows about mouse clicks, the interactor knows about mouse
clicks, and the widget knows about mouse clicks.  At some layer, it
seems we should not be talking about which button of which physical
device when down or up, but rather what we want to be happening in the
scene (either at a high or low level of abstraction).  

For analogy, xterm in the X window system doesn't hard-code
right-click to some action; instead, it provides a layer of
indirection (the X resources) that map device events to "actions" that
perform them.  This keeps device differences at a high level.  The
current toolkit/interactor/generic interactor/widget layering, there
are multiple levels, but no indirection: the event mapping is
one-to-one at each level.  Seems to me that at the very least by the
time you get to the widget level, you should be talking about actions
that could be bound to events names, not event names themselves.
Perhaps that transition should be happening even higher, at the
interactor level;  not sure.

The point raised that all the key events were getting sent to the
widget and therefore didn't flexibly allow for other user key bindings
is a warning that something's too rigidly tied together....

Does that make slightly more sense?

							--Mike
Michael Halle
mhalle at bwh.harvard.edu


_______________________________________________
vtk-developers mailing list
vtk-developers at public.kitware.com
http://public.kitware.com/mailman/listinfo/vtk-developers



More information about the vtk-developers mailing list