fltk question ... fire an event at a certain point on the screen?

evildre

[H]F Junkie
Joined
Oct 23, 2000
Messages
13,345
I'm writing a heightmap visualization app using fltk and vtk. It creates and deletes windows at will, as opposed to using SDI or MDI-style interactions. Think Photoshop (with all its palettes and stuff), only without the enclosing app. When the app is executed it brings up a "main toolbox" of sorts which gives the user the ability to open files (and shows the currently-opened file paths), switch visualization modes, and/or quit. There are two visualization modes, each with its own respective tool palette. Then, there is the third window, which is not an fltk window at all ... it's a vtkRenderWindow.

Now, here's my problem. The vtkRenderWindow doesn't update unless an event occurs within its vtkRenderWindowInteractor, and the vtkRenderWindow is in focus. This means that, whenever I hit a button or change a slider in a palette, I don't see the result of my changes until I bring the vtkRenderWindow into focus and click inside of it. How do I automatically bring the vtkRenderWindow into focus when a widget on the tool palette is manipulated, and how do I automatically fire an event within the vtkRenderWindowInteractor to get the visualization to update?

<edit> I'm using Microsoft Visual C++ .NET 2002, but it shouldn't matter because I'm not using any Windows-specific code.

<edit2> I switched from vtkRenderWindowInteractor to vtkFlRenderWindowInteractor. This wraps a vtkRenderWindowInteractor in a Fl_Gl_Window, so I can call window->hide() and window->show() when I want to update it. This forces the window into focus and re-renders its contents. Unfortunately, it also causes the window to disappear and reappear, as is expected ... is there a better way?
 
Back
Top