]> Creatis software - crea.git/blobdiff - src/creawxVTKRenderWindowInteractor.h
Clean up useless warnings
[crea.git] / src / creawxVTKRenderWindowInteractor.h
index e1378d6f647c21c24c9bfafebaa7a19a4c512f79..bb61401d9ceabe1b61d5686a3e186b2480f146ed 100644 (file)
@@ -3,8 +3,8 @@
   Program:   Visualization Toolkit
   Module:    $RCSfile: creawxVTKRenderWindowInteractor.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/11 14:27:00 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2011/02/22 08:26:24 $
+  Version:   $Revision: 1.7 $
 
   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
   All rights reserved.
@@ -32,7 +32,7 @@
 //  - This class might not be easily readable as it tried to work with VTK 3.2
 //  and 4.x. This class doesn't support reparenting with VTK 4.2 and earlier.
 // .SECTION see also
-// creawxVTKRenderWindowInteractor.py creawxVTKRenderWindow.py
+// creawxVTKRenderWindowInteractor.py wxVTKRenderWindow.py
 
 #ifndef _creawxVTKRenderWindowInteractor_h_
 #define _creawxVTKRenderWindowInteractor_h_
@@ -43,7 +43,6 @@
 #include <creaSystem.h>
 #include <creaWx.h>
 
-/*
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -54,7 +53,7 @@
 #ifndef WX_PRECOMP
 #include <wx/wx.h>
 #endif
-*/
+
 #include <wx/timer.h>
 #include <wx/dcclient.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
+#  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)
@@ -82,7 +83,6 @@
 # error This GUI is not supported by creawxVTKRenderWindowInteractor for now
 #endif
 
-
 // wx forward declarations
 class wxPaintEvent;
 class wxMouseEvent;
@@ -99,7 +99,7 @@ namespace crea
 #if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
 class CREA_EXPORT creawxVTKRenderWindowInteractor : public wxGLCanvas, virtual public vtkRenderWindowInteractor
 #else
-class CREA_EXPORT creawxVTKRenderWindowInteractor : public wxWindow, virtual public vtkRenderWindowInteractor
+class CREA_EXPORT creawxVTKRenderWindowInteractor : virtual public vtkRenderWindowInteractor, public wxWindow
 #endif //__WXGTK__
 {
   DECLARE_DYNAMIC_CLASS(creawxVTKRenderWindowInteractor)
@@ -114,18 +114,13 @@ class CREA_EXPORT creawxVTKRenderWindowInteractor : public wxWindow, virtual pub
                                 const wxSize &size = wxDefaultSize,
                                 long style = wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE,
                                 const wxString &name = wxPanelNameStr);
-       //vtk ::New()
+  //EED win Compilation why ??:  vtkTypeRevisionMacro(creawxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
     static creawxVTKRenderWindowInteractor * New();
     void PrintSelf(ostream& os, vtkIndent indent);
 
          //destructor
     ~creawxVTKRenderWindowInteractor();
 
-#if defined(_WIN32)
-    const char * creawxVTKRenderWindowInteractor::GetClassName() const;
-#endif //_WIN32
-
-
     // vtkRenderWindowInteractor overrides
     void Initialize();
     void Enable();
@@ -149,6 +144,7 @@ class CREA_EXPORT creawxVTKRenderWindowInteractor : public wxWindow, virtual pub
     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);
@@ -187,10 +183,13 @@ class CREA_EXPORT creawxVTKRenderWindowInteractor : public wxWindow, virtual pub
     DECLARE_EVENT_TABLE()
 };
 
+
 } 
 // LG : EO namespace crea
 //======================================================================
 
 #endif // USE_WX
 #endif // USE_VTK
+
+
 #endif //_creawxVTKRenderWindowInteractor_h_