[vtkusers] How to detect a mouse button with widgets?
Ricardo Villegas
ricvilleg at gmail.com
Sun Jan 20 23:44:41 EST 2008
Hello,
I want to know how to detect a mouse button which is pressed/released
during an interaction with a vtk widget.
Specifically, I'm using a vtkImagePlaneWidget, but it only have 5
events for interacting with (enable, disable, start_interaction,
interaction, end_interaction). This widget apparently doesn't work
with mouse events in a direct way. Therefore, I can't determine when
the left, middle or right buttons are pressed or released on the
widget.
I added observers to detect start_interaction, interaction and
end_interaction events, but don't know how to query the buttons'
states inside the callback methods.
Which is the way for doing it?
I also tried adding observers to the render window interactor, but it
only detect the mouse events outside the image plane widgets, because
they override the events detection of the interactor.
Can someone help me with this?
Thanks in advance...
Ricardo Villegas
More information about the vtkusers
mailing list