[vtkusers] vtkInteractorStyleUser

Jim Peterson jimcp at cox.net
Tue Sep 14 16:56:44 EDT 2010


Adding to this context,

It might be the value of this vtkInteractorStyleUser class is deprecated 
with the use of the Observer's, I am not really up to speed on the why's 
and what's of the Observer style of interaction specification to this 
point, only the how. and a  MiddleButtonPressMethod would be an observer 
event fired by the IneractionWindow callback to an observer function set 
of the MiddlePuttonPressEvent.

Jim

Jim Peterson wrote:
> David,
> " If you want to hook into just a single mouse button, but leave the 
> interaction modes for the others unchanged, you must use e.g. 
> SetMiddleButtonPressMethod() instead of the more general 
> SetButtonPressMethod()."
>
> The Set...Method are the old style (vtk versions 1, 2 and maybe 3) 
> callback format as I recall. One would expect they are replaced with 
> AddObserver functions if they are still implemented.
>
> I am guessing the doc should read something about the eventIDs
>
>  LeftButtonPressEvent,
>  LeftButtonReleaseEvent,
>  MiddleButtonPressEvent,
>  MiddleButtonReleaseEvent,
>  RightButtonPressEvent,
>  RightButtonReleaseEvent,
>
>  KeyPressEvent,
>  KeyReleaseEvent,
>  CharEvent,
>
> and
>
>  MouseMoveEvent,
>  MouseWheelForwardEvent,
>  MouseWheelBackwardEvent,
>
> Jim
>
>
> David Doria wrote:
>> The documentation says: "you must use e.g. 
>> SetMiddleButtonPressMethod() instead of the more general 
>> SetButtonPressMethod()". I don't see either of those functions? Has 
>> anyone used this class? I'm trying to figure it out in c++ before 
>> trying it in Python (I guess this is how you are supposed to handle 
>> interaction in Python. Again from the documentation: "This is 
>> particularly useful for setting up custom interaction modes in 
>> scripting languages such as Tcl and Python".
>>
>> I made a shell example here if anyone can demonstrate how to use it:
>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/InteractorStyleUser
>>
>> Thanks!
>>
>> David
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at 
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at: 
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>   
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: 
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list