EVT_SIZE (wxVTKRenderWindowInteractor::OnSize)
END_EVENT_TABLE()
-vtkCxxRevisionMacro(wxVTKRenderWindowInteractor, "$Revision: 1.5 $")
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ vtkCxxRevisionMacro(wxVTKRenderWindowInteractor, "$Revision: 1.5 $")
+#else
+ //...
+#endif
+
vtkInstantiatorNewMacro(wxVTKRenderWindowInteractor)
//---------------------------------------------------------------------------
#ifdef VTK_DEBUG_LEAKS
vtkDebugLeaks::ConstructClass("wxVTKRenderWindowInteractor");
#endif
+
this->RenderWindow = NULL;
this->SetRenderWindow(vtkRenderWindow::New());
this->RenderWindow->Delete();
+ this->SetBackgroundStyle( wxBG_STYLE_COLOUR );
+ this->SetBackgroundColour( wxColor(0,0,0,0) );
}
//---------------------------------------------------------------------------
wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor(wxWindow *parent,
// so we update the size information of the interactor/renderwindow here
this->UpdateSize(size.x, size.y);
#endif
+ this->SetBackgroundStyle( wxBG_STYLE_COLOUR );
+ this->SetBackgroundColour( wxColor(0,0,0,0) );
}
//---------------------------------------------------------------------------
wxVTKRenderWindowInteractor::~wxVTKRenderWindowInteractor()
Size[1] = y;
// and our RenderWindow's size
RenderWindow->SetSize(x, y);
- }
- }
+ } // if x y
+ } // if RenderWindow
}
//---------------------------------------------------------------------------
int wxVTKRenderWindowInteractor::CreateTimer(int WXUNUSED(timertype))
{
// it's a one shot timer
if (!timer.Start(10, TRUE))
- assert(false);
+ {
+ assert(false);
+ }
return 1;
//---------------------------------------------------------------------------
void wxVTKRenderWindowInteractor::OnTimer(wxTimerEvent& WXUNUSED(event))
{
- if (!Enabled)
- return;
-
+ if (!Enabled)
+ {
+ return;
+ }
+
#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
InvokeEvent(vtkCommand::TimerEvent, NULL);
rwin->UpdateGLRegion();
}
#endif
+
}
//---------------------------------------------------------------------------
void wxVTKRenderWindowInteractor::OnEraseBackground(wxEraseEvent &event)
//---------------------------------------------------------------------------
void wxVTKRenderWindowInteractor::OnMotion(wxMouseEvent &event)
{
- if (!Enabled)
+ this->Render();
+
+ if (!Enabled)
{
- return;
+ return;
}
#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
- SetEventInformationFlipY(event.GetX(), event.GetY(),
- event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-
+ SetEventInformationFlipY(event.GetX(), event.GetY(), event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
InvokeEvent(vtkCommand::MouseMoveEvent, NULL);
#else
- InteractorStyle->OnMouseMove(event.ControlDown(), event.ShiftDown(),
- event.GetX(), Size[1] - event.GetY() - 1);
+ InteractorStyle->OnMouseMove(event.ControlDown(), event.ShiftDown(), event.GetX(), Size[1] - event.GetY() - 1);
#endif
}
//---------------------------------------------------------------------------
#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
- SetEventInformationFlipY(event.GetX(), event.GetY(),
- event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-
+ SetEventInformationFlipY(event.GetX(), event.GetY(), event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
InvokeEvent(vtkCommand::EnterEvent, NULL);
#else
// old style
- InteractorStyle->OnEnter(event.ControlDown(), event.ShiftDown(),
- event.GetX(), Size[1] - event.GetY() - 1);
+ InteractorStyle->OnEnter(event.ControlDown(), event.ShiftDown(), event.GetX(), Size[1] - event.GetY() - 1);
#endif
}
//---------------------------------------------------------------------------