[vtkusers] vtkUserEvents from wxWidgetsCustomEvents

A. Minutolo nytroa at gmail.com
Tue Jul 17 11:07:29 EDT 2007


Hi,
till now I've successfully integrated wxWindows and VTK in my own
application by using the wxVTKRenderWindowInteractor class.

I have developed a driver for a new interaction device and a
wxWidgetsCustomEvent class that handles the events it generates, now I want
to invoke some vtkUserEvents by using the Callback functions associated to
my wxWidgetsCustomEvent.
I' ve added the observers and the callback functions of my vtkUserEvents
in vtkInteractorStyle and I've developed a subclass of vtkinteractorStyle
with the necessary functionalities.

If i invoke my vtkEvents from a function associated to a standard wxEvent it
works fine. The problem is that if I invoke the vtkEvents from a function
associated to a custom wxEvent, VTK seems to lose the focus and if I invoke
a grabfocus or a dolly, the application crashes by an error in
"vtkWin32OpenGLRenderWindow::MakeCurrent()".

 After my vtkEvent is invoked the first time, is invoked a
vtkCommand::LeaveEvent like the mouse pointer leaves the vtkwindow, how
could i avoid this invocation and such situation?

 Can i invoke vtkEvent from a wxCustomEvent without provoking render or
focus problems?
I hope someone can explain me the steps needed in order to create
vtkCustomEvents that can answer to my wxCustomEvents like to standard
wxEvents?

 Thanks to everybody.

Aniello
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070717/37bb4d79/attachment.htm>


More information about the vtkusers mailing list