X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=packages%2Fwxvtk%2Fsrc%2FwxVTKRenderWindowInteractor.h;h=230ef5639d02302e93e6ef2ff0c22eca0655fb02;hb=d19c5512748aa8e2dd5c3d01d9ec680ded1f17ce;hp=7567a691f4a79b8dc4226489f42b35dc01ac79d3;hpb=0278e44db6547b325fe00f4ffc5a9cabac5a8534;p=bbtk.git diff --git a/packages/wxvtk/src/wxVTKRenderWindowInteractor.h b/packages/wxvtk/src/wxVTKRenderWindowInteractor.h index 7567a69..230ef56 100644 --- a/packages/wxvtk/src/wxVTKRenderWindowInteractor.h +++ b/packages/wxvtk/src/wxVTKRenderWindowInteractor.h @@ -1,19 +1,38 @@ +/* + # --------------------------------------------------------------------- + # + # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image + # pour la SantÈ) + # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton + # Previous Authors : Laurent Guigues, Jean-Pierre Roux + # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil + # + # This software is governed by the CeCILL-B license under French law and + # abiding by the rules of distribution of free software. You can use, + # modify and/ or redistribute the software under the terms of the CeCILL-B + # license as circulated by CEA, CNRS and INRIA at the following URL + # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html + # or in the file LICENSE.txt. + # + # As a counterpart to the access to the source code and rights to copy, + # modify and redistribute granted by the license, users are provided only + # with a limited warranty and the software's author, the holder of the + # economic rights, and the successive licensors have only limited + # liability. + # + # The fact that you are presently reading this means that you have had + # knowledge of the CeCILL-B license and that you accept its terms. + # ------------------------------------------------------------------------ */ + + /*========================================================================= Program: Visualization Toolkit Module: $RCSfile: wxVTKRenderWindowInteractor.h,v $ Language: C++ - Date: $Date: 2008/06/26 18:45:58 $ - Version: $Revision: 1.2 $ - - 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. - + Date: $Date: 2012/11/16 08:52:36 $ + Version: $Revision: 1.4 $ + =========================================================================*/ // .NAME wxVTKRenderWindowInteractor - class to enable VTK to render to @@ -57,17 +76,19 @@ // 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 -# 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 +96,6 @@ # error This GUI is not supported by wxVTKRenderWindowInteractor for now #endif - // wx forward declarations class wxPaintEvent; class wxMouseEvent; @@ -90,9 +110,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 +127,20 @@ 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() + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 + vtkTypeRevisionMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor); +#else + vtkTypeMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor); +#endif + 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 +164,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 +187,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;