Take a look at Servers/Filters/vtkMemberFunctionCommand.h in the paraview source directory.<br><br>Pat<br><br><div class="gmail_quote">On Wed, Sep 22, 2010 at 8:36 AM, David Doria <span dir="ltr"><<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">As an example, say I have a vtkImageTracerWidget as a member variable<br>
of a subclass of vtkInteractorStyle. To catch the widgets events in a<br>
way that I still have access to the class instance data, I have<br>
declared a static callback function<br>
<br>
class MyClass : public vtkInteractoStyle<br>
{<br>
public:<br>
static void KeypressCallbackFunction ( vtkObject* caller, long<br>
unsigned int eventId, void* clientData, void* callData );<br>
<br>
When I set up the vtkCallbackCommand, I used SetClientData(this) to<br>
give the callback access to my interactor style. Unfortunately this is<br>
only public access. This seems like a horribly convoluted way to<br>
catching these events - is there a more OO-friendly way?<br>
<br>
Thanks,<br>
<br>
David<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</blockquote></div><br>