[vtkusers] Adding a callback function to a mouse button
Thomas Deschamps
tdeschamps at lbl.gov
Wed Jul 24 19:30:44 EDT 2002
Dear vtkUsers,
I would like to attach to one of the mouse button a particular callback.
When I click on an image I want to execute this function which has
several arguments.
I know how to do it in Tcl with AddObserver, but I don't know how to do
it in C++
Here is a sample of ny tcl code.
vtkRenderWindowInteractor iren
interactor AddObserver StartPickEvent {UpdateImage}
proc UpdateImage {} {...}
But in C++, things look more complicated. I don't know if I should use
interactor -> AddObserver(whatever...
OR
interactor -> SetEndPickMethod(UpdateImage,(void*)(&updateImageArgs));
or any other solution.
Thank you for your help
Thomas
TDeschamps at lbl.gov
More information about the vtkusers
mailing list