/*=========================================================================
Program: Visualization Toolkit
- Module: $RCSfile: wxVTKRenderWindowInteractor.h,v $
+ Module: $RCSfile$
Language: C++
- Date: $Date: 2012/11/16 08:52:36 $
- Version: $Revision: 1.4 $
-
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
+ All rights reserved.
+ See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notice for more information.
+
=========================================================================*/
// .NAME wxVTKRenderWindowInteractor - class to enable VTK to render to
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderWindow.h"
-// Apparently since wxGTK 2.8.0 one can finally use wxWindow (just as in any
-// other port):
-// MM: tested on 2008/04/08: experienced some heavy flickering with wx-widget 2.6.0
-// using a wxWindow instead of wxGLCanvas fixed the symptoms
-//#if (!wxCHECK_VERSION(2, 6, 0))
-#if (!wxCHECK_VERSION(2, 8, 0))
#define USE_WXGLCANVAS
-#endif
#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
# if wxUSE_GLCANVAS
class wxVTKRenderWindowInteractor : public wxWindow, public vtkRenderWindowInteractor
#endif //__WXGTK__
{
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
DECLARE_DYNAMIC_CLASS(wxVTKRenderWindowInteractor)
+#else
+ wxDECLARE_DYNAMIC_CLASS(wxVTKRenderWindowInteractor);
+#endif
public:
//constructors
#if !(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
void OnEnter(wxMouseEvent &event);
void OnLeave(wxMouseEvent &event);
+ void OnMouseWheel(wxMouseEvent& event);
+#if wxCHECK_VERSION(2, 8, 0)
+ void OnMouseCaptureLost(wxMouseCaptureLostEvent& event);
+#endif
void OnKeyDown(wxKeyEvent &event);
void OnKeyUp(wxKeyEvent &event);
void OnChar(wxKeyEvent &event);
#endif
void OnTimer(wxTimerEvent &event);
void OnSize(wxSizeEvent &event);
- void OnMouseWheel(wxMouseEvent& event);
void Render();
void SetRenderWhenDisabled(int newValue);
vtkSetMacro(UseCaptureMouse,int);
vtkBooleanMacro(UseCaptureMouse,int);
+#if VTK_MAJOR_VERSION > 5 || (VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION >= 2)
protected:
+ virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
+ virtual int InternalDestroyTimer(int platformTimerId);
+#endif
+
+ protected:
+#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
+ wxGLContext *context;
+#endif
wxTimer timer;
int ActiveButton;
- int RenderAllowed;
long GetHandleHack();
int Stereo;