]> Creatis software - bbtk.git/blobdiff - packages/wxvtk/src/wxVTKRenderWindowInteractor.h
*** empty log message ***
[bbtk.git] / packages / wxvtk / src / wxVTKRenderWindowInteractor.h
index 7567a691f4a79b8dc4226489f42b35dc01ac79d3..ccf9b6d8280d017c717c6647514d14eea54aa075 100644 (file)
@@ -3,8 +3,8 @@
   Program:   Visualization Toolkit
   Module:    $RCSfile: wxVTKRenderWindowInteractor.h,v $
   Language:  C++
-  Date:      $Date: 2008/06/26 18:45:58 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2011/02/17 11:01:27 $
+  Version:   $Revision: 1.3 $
 
   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
   All rights reserved.
 
 // 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
+#  if wxUSE_GLCANVAS
 #    include <wx/glcanvas.h>
-# else
+#  else
 #    error "problem of wxGLCanvas, you need to build wxWidgets with opengl"
-# endif //wxUSE_GLCANVAS
+#  endif //wxUSE_GLCANVAS
 #endif //__WXGTK__
 
 // Motif version (renamed into wxX11 for wxWindow 2.4 and newer)
@@ -75,7 +77,6 @@
 # error This GUI is not supported by wxVTKRenderWindowInteractor for now
 #endif
 
-
 // wx forward declarations
 class wxPaintEvent;
 class wxMouseEvent;
@@ -90,9 +91,9 @@ namespace bbwxvtk
 
 
 #if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-class VTK_RENDERING_EXPORT wxVTKRenderWindowInteractor : public wxGLCanvas, virtual public vtkRenderWindowInteractor
+class wxVTKRenderWindowInteractor : public wxGLCanvas, public vtkRenderWindowInteractor
 #else
-class /*VTK_RENDERING_EXPORT*/ wxVTKRenderWindowInteractor : public wxWindow, virtual public vtkRenderWindowInteractor
+class wxVTKRenderWindowInteractor : public wxWindow, public vtkRenderWindowInteractor
 #endif //__WXGTK__
 {
   DECLARE_DYNAMIC_CLASS(wxVTKRenderWindowInteractor)
@@ -107,18 +108,13 @@ class /*VTK_RENDERING_EXPORT*/ wxVTKRenderWindowInteractor : public wxWindow, vi
                                 const wxSize &size = wxDefaultSize,
                                 long style = wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE,
                                 const wxString &name = wxPanelNameStr);
-       //vtk ::New()
+    vtkTypeRevisionMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
     static wxVTKRenderWindowInteractor * New();
     void PrintSelf(ostream& os, vtkIndent indent);
 
          //destructor
     ~wxVTKRenderWindowInteractor();
 
-#if defined(_WIN32)
-    const char * wxVTKRenderWindowInteractor::GetClassName() const;
-#endif //_WIN32
-
-
     // vtkRenderWindowInteractor overrides
     void Initialize();
     void Enable();
@@ -142,6 +138,7 @@ class /*VTK_RENDERING_EXPORT*/ wxVTKRenderWindowInteractor : public wxWindow, vi
     void OnLeave(wxMouseEvent &event);
     void OnKeyDown(wxKeyEvent &event);
     void OnKeyUp(wxKeyEvent &event);
+    void OnChar(wxKeyEvent &event);
 #endif
     void OnTimer(wxTimerEvent &event);
     void OnSize(wxSizeEvent &event);
@@ -164,8 +161,6 @@ class /*VTK_RENDERING_EXPORT*/ wxVTKRenderWindowInteractor : public wxWindow, vi
     vtkSetMacro(UseCaptureMouse,int);
     vtkBooleanMacro(UseCaptureMouse,int);
 
-    virtual void Refresh(bool eraseBackground = true, const wxRect* rect = NULL);
-
   protected:
     wxTimer timer;
     int ActiveButton;