]> Creatis software - creaMaracasVisu.git/commitdiff
#3128 creaMaracasVisu Feature New Normal - branch changeWx28to30 compilation with...
authorEduardo DAVILA <davila@localhost.localdomain>
Thu, 21 Sep 2017 11:24:27 +0000 (13:24 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Thu, 21 Sep 2017 11:24:27 +0000 (13:24 +0200)
15 files changed:
lib/GUI/Wx/SurfaceRenderer/wxMaracasSurfaceRendering.cxx
lib/GUI/Wx/VolumeRenderer/wxMaracasMultipleVolumeRendererView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyle3DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleMPRView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleSphere.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRendererView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPanelCuttingImageData.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx

index 90fc9182752ae94d9fa610f562f8204bfa488d5b..8f969e4dd679ed95e2a7ff4babb68960d7abd921 100644 (file)
@@ -294,12 +294,7 @@ ToolBar::ToolBar(wxWindow * parent,std::string iconsdir)
 #if wxMAJOR_VERSION <= 2
        this->AddTool(1, wxString(_T("test")),bitmap0, NULL, wxITEM_NORMAL, wxString(_T("Open File")));
 #else
-       this->AddTool(1, 
-       wxString("test"),
-       bitmap0, 
-       NULL, 
-       wxITEM_NORMAL, 
-       wxString("Open File") );
+       this->AddTool(1, wxString(_T("test")),bitmap0,  wxString(_T("Open File")),  wxITEM_NORMAL );
 #endif
 
        
index c70043ebd797040fa2d5a00368fad2dc44666228..4560348f8f9a405b25dd3677e7be15de2e6f7bb7 100644 (file)
@@ -230,7 +230,15 @@ ToolBarMultipleVolumeRenderer::ToolBarMultipleVolumeRenderer(wxWindow * parent,s
        //iconfil+= "/OpenImage.png";
        //wxBitmap* bitmap0 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
        wxBitmap bitmap0(OpenImage_xpm);
+
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        this->AddTool(1, wxString(_T("test")),bitmap0, NULL, wxITEM_NORMAL, wxString(_T("Open File")));
+#else
+       this->AddTool(1, wxString(_T("test")),bitmap0 , wxString(_T("Open File")), wxITEM_NORMAL );
+#endif
+
 
        /*iconfil+= "/Open.png";
        wxBitmap* bitmap2 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
index 7b98936953d3ebec070020bd7d7a05d98fc5273c..1f132b5b4d531179ec94316ad5710a8f64818578 100644 (file)
@@ -384,6 +384,9 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT
 //------------------------------------------------------------------------
        void WidgetShowNPoints::OnLoadPoints(wxCommandEvent& event)
        {
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                wxFileDialog* FD = new wxFileDialog( 0,
                                              _T("Load points .."),
                                              _T(""),
@@ -391,6 +394,15 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT
                                              _T("(*.xls)|*.xls"),
                                              wxOPEN | wxFILE_MUST_EXIST,
                                              wxDefaultPosition);
+#else
+               wxFileDialog* FD = new wxFileDialog( 0,
+                                             _T("Load points .."),
+                                             _T(""),
+                                             _T(""),
+                                             _T("(*.xls)|*.xls"),
+                                             wxFD_OPEN | wxFD_FILE_MUST_EXIST,
+                                             wxDefaultPosition);
+#endif
                int i;
                //EED
                int result_FD = FD->ShowModal();
index 044d49a521c56f72add8885f6ecacb1c5698c4ef..ef444aa2f969ea00d4f1cd4cd59ebe3c78780893 100644 (file)
@@ -109,7 +109,13 @@ bool vtkInteractorStyle3DView::SelectMarchibCubePoint()
                                this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY(xc(1)/spc[1]);
                                this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ(xc(2)/spc[2]);
                                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                                this->_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+                               this->_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
                                ok=true;
                        }
                }
index 7de94728684a266196798e1dec5366e55a94741b..d7c6b6843aca7ba420ab5742f9bce08f551f3ffb 100644 (file)
@@ -373,7 +373,13 @@ void vtkInteractorStyleBaseView::EvaluateToRefresh()
                        _parent_refresh_waiting = false;
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
 //CPR 13/01/2010
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        this->_wxvtkbaseview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+                       this->_wxvtkbaseview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
                        int i;
                        int size = _lstParentToReport.size();
                        for(i = 0; i<size; i++)
index af13f650e4cd9d33b252fec4ec467eedeeb131c0..3dacf1a2d5da1b07097a18be875aaab499c17c04 100644 (file)
@@ -51,9 +51,18 @@ bool  vtkInteractorStyleMPRView::OnLeftDClick () // virtual
        wxvtkmpr2Dview->MoveY(x,y,z);
        wxvtkmpr2Dview->MoveZ(x,y,z);
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
        wxCommandEvent newevent2(wxEVT_COMMAND_MENU_SELECTED,12122);  // Doble click
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
        wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent2);
+#else
+       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent2);
+#endif
+
+
 
        return true;
 }
index 54a7f734443491413e64d40eb3f7aab0e7f2aa67..177534ef86ba40be2ff8733c87feee97b1881007 100644 (file)
@@ -93,7 +93,13 @@ bool  vtkInteractorStyleSphere::OnLeftButtonUp()
                        _vtkInteractorStyleBaseView->TransformCoordinate(x,y,z);            
                        wxsphereview->SetXYZtoParent(x,y);
                        wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        wxsphereview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent);
+#else
+                       wxsphereview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent);
+#endif
+
                } else {
                        wxsphereview->RotationEnd();
                }
index 7e698c3abdbedcf552db2cec7162c28d28ba4946..a4d48213f71bc5927c1131904384588743f370f7 100644 (file)
@@ -42,5 +42,11 @@ wxMPRWidget2::~wxMPRWidget2()
 void wxMPRWidget2::OnRefreshView(wxCommandEvent & event) // Virtual
 {      
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     this->GetParent()->ProcessEvent(newevent1);
+#else
+    this->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
 }
index 267745798abceb7b19bdc6ef20c2811de909693c..1b562be52b2cde1ed4ddf424102ed8ff0e260a2e 100644 (file)
@@ -230,7 +230,12 @@ ToolBarMultipleVolumeRenderer::ToolBarMultipleVolumeRenderer(wxWindow * parent,s
        //iconfil+= "/OpenImage.png";
        //wxBitmap* bitmap0 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
        wxBitmap bitmap0(OpenImage_xpm);
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        this->AddTool(1, wxString(_T("test")),bitmap0, NULL, wxITEM_NORMAL, wxString(_T("Open File")));
+#else
+       this->AddTool(1, wxString(_T("test")),bitmap0, wxString(_T("Open File")), wxITEM_NORMAL );
+#endif
 
        /*iconfil+= "/Open.png";
        wxBitmap* bitmap2 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
index 108944d96e8e4bfddc5b56d4bfeb8a613c314bc7..1098be22fb20f2e379681de9d2a96791c92a1d6d 100644 (file)
@@ -209,7 +209,14 @@ ToolBarRenderer::ToolBarRenderer(wxWindow * parent,std::string iconsdir)
        //iconfil+= "/OpenImage.png";
        //wxBitmap* bitmap0 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
        wxBitmap bitmap0(OpenImage_xpm);
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        this->AddTool(1, wxString(_T("test")),bitmap0, NULL, wxITEM_NORMAL, wxString(_T("Open File")));
+#else
+       this->AddTool(1, wxString(_T("test")),bitmap0, wxString(_T("Open File")), wxITEM_NORMAL );
+#endif
+
+
 
        this->Realize();
 
index 110ba6d858b8ea4d8b81215433af05a93b7036a1..225204185181b37962493947f6b487c54961ace1 100644 (file)
 wxPanelCuttingImageData::wxPanelCuttingImageData (wxWindow *parent)
 : wxPanel( parent, -1)
 {
-       _imageData=NULL;
-       _histogrammeVector=NULL;
-       _wxvtk3Dbaseview=NULL;
-       _wxvtkbaseView=NULL;
-       CreateInterface();
+       _imageData                      = NULL;
+       _histogrammeVector      = NULL;
+       _wxvtk3Dbaseview        = NULL;
+       _wxvtkbaseView          = NULL;
+       CreateInterface() ;
        CreateModel();
        Create3DViewObjects();
 }
@@ -488,7 +488,12 @@ void wxPanelCuttingImageData::OnExtract(wxCommandEvent& event)
 
 //     _wxvtkbaseView->RefreshView();
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkbaseView->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkbaseView->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 
index 59c33cd49750734b47fa007f243f615744e2b21a..557bf671553c3b3cf98a6969ef172e41fcd12544 100644 (file)
@@ -1038,7 +1038,14 @@ void wxSTLWidget_03::OnBtnCreateFileSTL(wxCommandEvent& event)
 
        
 //     wxDirDialog dialog( this, "Choose a directory...", ( !dirSTL.IsEmpty( ) )?dirSTL: wxGetHomeDir( ) );
+
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxSAVE );
+#else
+       wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxFD_SAVE );
+#endif
 
 
        if( dialog.ShowModal( ) == wxID_OK ) 
index cd205a40428def0a7638f32cb9825deb89bcf72d..e7aa85e32a8fcf79c6917e8c3e7a08f8a4e6d830 100644 (file)
@@ -82,23 +82,37 @@ wxWindow* wxGetTopLevelParent(wxWindow *win)
 #endif //VTK_USE_COCOA
 #endif //__WXCOCOA__
 
-#ifdef __WXGTK__
-#    include <gdk/gdkx.h> // GDK_WINDOW_XWINDOW is found here in wxWidgets 2.8.0
-#    include "gdk/gdkprivate.h"
-#if wxCHECK_VERSION(2, 8, 0)
-#ifdef __WXGTK20__
-#include <wx/gtk/win_gtk.h>
-#else
-#include <wx/gtk1/win_gtk.h>
-#endif
+
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+       #ifdef __WXGTK__
+               #    include <gdk/gdkx.h> // GDK_WINDOW_XWINDOW is found here in wxWidgets 2.8.0
+               #    include "gdk/gdkprivate.h"
+               #if wxCHECK_VERSION(2, 8, 0)
+                       #ifdef __WXGTK20__
+                               #include <wx/gtk/win_gtk.h>
+                       #else
+                               #include <wx/gtk1/win_gtk.h>
+                       #endif
+               #else
+                       #include <wx/gtk/win_gtk.h>
+               #endif
+               #define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \
+                                         GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) : \
+                                         GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
+       #endif
 #else
-#include <wx/gtk/win_gtk.h>
-#endif
-#define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \
-                          GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) : \
-                          GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
+       #ifdef __WXGTK__
+           #include <gdk/gdkx.h>
+           #include <gtk/gtk.h>
+       #endif
 #endif
 
+
+
+
+
 #ifdef __WXX11__
 #include "wx/x11/privx.h"
 #define GetXWindow(wxwin)   ((Window)(wxwin)->GetHandle())
@@ -366,7 +380,15 @@ long wxVTKRenderWindowInteractor::GetHandleHack()
 
     // Find and return the actual X-Window.
 #if defined(__WXGTK__) || defined(__WXX11__)
-    return (long)GetXWindow(this);
+
+       //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+       #if wxMAJOR_VERSION <= 2
+               return (long)GetXWindow(this);
+       #else
+               GdkWindow* Win = gtk_widget_get_window( (GtkWidget *) GetHandle() );
+               return (long int)GDK_WINDOW_XDISPLAY(Win);
+       #endif
+
 #endif
 
 //#ifdef __WXMOTIF__
index da8764c2c9ff569dec6f1d5c16073b0b682015bd..b03dafd541ca65913d5dc6dd9a5e5144064d4e4b 100644 (file)
@@ -344,9 +344,14 @@ void wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame(wxCommandEv
                _wxvtkclipping3Dview->Refresh();
 
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 
-       }
+       } // if idTissue
 }
 
 //-------------------------------------------------------------------
@@ -356,7 +361,14 @@ void wxVtkClipping3DViewCntrlPanel::OnVisibleVolume(wxCommandEvent& event)
        _wxvtkclipping3Dview->Refresh();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
 }
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnVisibleBoxSurface(wxCommandEvent& event)
@@ -390,14 +402,18 @@ void wxVtkClipping3DViewCntrlPanel::OnColor(wxCommandEvent& event)
                        float b=dlgColour.GetColourData().GetColour().Blue()/255;
                        tmpActor->GetProperty()->SetColor( r , g , b );
                        _color->SetBackgroundColour(dlgColour.GetColourData().GetColour());
-
                        _wxvtkclipping3Dview->Refresh();
-
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-               }
-       }
+#else
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+               } // if ShowModal
+       } // if idTissue
 }
+
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnVisibleSurface(wxCommandEvent& event)
 {
@@ -405,12 +421,15 @@ void wxVtkClipping3DViewCntrlPanel::OnVisibleSurface(wxCommandEvent& event)
        if (idTissue!=-1)
        {
                _wxvtkclipping3Dview->VisibleActor(idTissue, _visible->GetValue());
-
                _wxvtkclipping3Dview->Refresh();
-
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
+#else
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+       } // if idTissue
 }
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnOpacity(wxScrollEvent& event)
@@ -422,12 +441,15 @@ void wxVtkClipping3DViewCntrlPanel::OnOpacity(wxScrollEvent& event)
                tmpActor = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
                float opacity=_opacity->GetValue();
                tmpActor->GetProperty()->SetOpacity( opacity/100 );
-
                _wxvtkclipping3Dview->Refresh();
-
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
+#else
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+       } // if idTissue
 }
 
 //----------------------------------------------------------------------------
@@ -462,8 +484,15 @@ void wxVtkClipping3DViewCntrlPanel::OnIsoValue(wxScrollEvent& event)
                _wxvtkclipping3Dview->Refresh();
 
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
+#else
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
+       } // if idTissue
 
 }
 //-------------------------------------------------------------------
@@ -478,7 +507,12 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL(wxCommandEvent& event)
 
 
        wxString dirSTL = wxGetHomeDir( ) ;
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxSAVE );
+#else
+       wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxFD_SAVE );
+#endif
 
        if( dialog.ShowModal( ) == wxID_OK )
        {
@@ -524,7 +558,12 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL(wxCommandEvent& event)
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnBtnSaveRawVolume(wxCommandEvent& event)
 {
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFileDialog dialog(this, _T("Choose a file"), _T(""), _T(""), _T("*.maracas"), wxSAVE );
+#else
+       wxFileDialog dialog(this, _T("Choose a file"), _T(""), _T(""), _T("*.maracas"), wxFD_SAVE );
+#endif
        if (dialog.ShowModal() == wxID_OK)
        {
                std::string directory = (const char*) (dialog.GetDirectory().mb_str() );
@@ -668,7 +707,15 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                        //_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
                        _wxvtkclipping3Dview->Refresh();
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
+
 
                        /*
                        volumeMapper->Update();
@@ -696,10 +743,10 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                        size=greyctf->size();
                        for(i=0;i<size;i++)
                        {
-                               double grey2=(*greyctf)[i];
-                               double red =(*rctf)[i];
-                               double green =(*gctf)[i];
-                               double blue = (*bctf)[i];
+                               double grey2    = (*greyctf)[i];
+                               double red      = (*rctf)[i];
+                               double green    = (*gctf)[i];
+                               double blue     = (*bctf)[i];
                                ctfun->AddRGBPoint(grey2,red,green,blue);
                        }
 
@@ -709,7 +756,12 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                        //_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
                        _wxvtkclipping3Dview->Refresh();
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 
                        /*
                        volumeMapper->Update();
@@ -726,13 +778,26 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad(wxCommandEvent& event)
 {
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFileDialog dialog(this, _T("Choose a file"), _T("c:/Maracas_configuration"),_T(""), _T("*.vtk"), wxOPEN);
+#else
+       wxFileDialog dialog(this, _T("Choose a file"), _T("c:/Maracas_configuration"),_T(""), _T("*.vtk"), wxFD_OPEN);
+#endif
+
        if (dialog.ShowModal() == wxID_OK)
        {
                _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadMeshVTK( (char *)dialog.GetPath().c_str() );
                _wxvtkclipping3Dview->Refresh();
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
+#else
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
+       } // if
 }
 
index 790d3bc01c7b708f97561878cd7e7e2157a18db2..d717de5778248cd156f911af081ce55380a77781 100644 (file)
@@ -715,7 +715,13 @@ void wxVtkMPR3DViewCntrlPanel::OnInterpolate(wxCommandEvent& event)
        _wxvtkmpr3Dview->Refresh();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
 
 }