[vtkusers] callback set operations in C++

Gregory Bleiker gregory.bleiker at phonak.ch
Wed Feb 20 03:09:30 EST 2002


Hi 
I'm creating my own vtkInteractorStyle and am trying to set the callback functions, such as
SetLeftButtonPressMethod
Unfortunately, these functions are declared as
SetxyzMethod(void (*f)(void *), void *arg)
This means that the callback function has to be static member function as C++ class member functions can not be cast (except with quite some effort, see http://www.inquiry.com/techtips/cpp_pro/10min/10min0800.asp) 
Wouldn't it be more convenient to update the callback methods so class member functions can be easily set as callback even if they are not static?

Greetings
Gregi




More information about the vtkusers mailing list