[vtkusers] altering a widgets response to mouse clicks
totte at dunescientific.com
Mon Aug 10 18:51:02 EDT 2015
On 8/9/2015 7:05 PM, Cory Quammen wrote:
> The typical way to do this would be to subclass vtkInteractorStyle and
> override the member functions
> to swap the functionality of the two. My guess is that you are using
> the vtkInteractorStyleTrackballActor, so you could subclass it and
> swap the definitions of the above member functions. Then, set an
> instance of your new class as the interactor style in your
Thanks for the response,
I have now a subclassed a TrackballActor interactor which I am passing
to the widget.
However, the subclassed interactors On*Button() functions are NOT called
as the widget is visible and clicked on. Those overloaded functions are
only called if clicking outside the widget.
I have used the slider widget, and for that one, when clicked on, the
interactors onMouse events are indeed called. The box widget seem to
In addition, as the widget is activated, and an associated callback
Execute function is called, only one type of event is detected, even
though I have added observers for other events.
//These are not passed on to the widgets callback??
//Only this one seem to be relevant??
I am certainly getting something wrong?
> Hope that helps,
> On Sun, Aug 9, 2015 at 7:17 PM, Totte Karlsson
> <totte at dunescientific.com <mailto:totte at dunescientific.com>> wrote:
> When using a boxwidget, pressing the left button and moving the
> mouse allow the user to rotate the widget,
> while pressing the middle button and moving the mouse translates
> the widget.
> How can I switch the behavior of those two buttons?
> I.e. having the left button doing the translation and the middle
> button the rotation?
> Powered by www.kitware.com <http://www.kitware.com>
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the VTK FAQ at:
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> Follow this link to subscribe/unsubscribe:
> Cory Quammen
> R&D Engineer
> Kitware, Inc.
Totte Karlsson: totte at dunescientific.com
<mailto:totte at dunescientific.com> or (425) 780-9648
© 2015 Dune Scientific, LLC. All rights reserved.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers