]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx
2108 Bug Volume Rendering widget options are not stable
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxMPRWidget.cxx
index 61063ce9c6e61efef087362f5def7d229cf9d7f7..a11e073be9d68c5a42ebb8133576a21c84b8a30c 100644 (file)
@@ -1,10 +1,35 @@
+/*# ---------------------------------------------------------------------
+#
+# 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:   wxMaracas
   Module:    $RCSfile: wxMPRWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/11/30 20:52:50 $
-  Version:   $Revision: 1.15 $
+  Date:      $Date: 2012/11/15 14:14:35 $
+  Version:   $Revision: 1.17 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -143,6 +168,8 @@ wxMPRWidget::wxMPRWidget( wxWindow* parent,
 
                wxSplitterWindow        *pnlSplitter            = new wxSplitterWindow( this , -1);
                pnlSplitter     -> SetMinimumPaneSize( 2 );
+               //RaC Nov2012 Correctly resize internal panels with the window resize event
+               pnlSplitter->SetSashGravity(0.5);
 
                wxPanel                         *MPRPanel       = CreateMPRPanel(pnlSplitter,_vtkmprbasedata);
                wxPanel                         *controlPanel   = CreateControlPanel(pnlSplitter);      
@@ -181,6 +208,8 @@ void wxMPRWidget::setImageData(vtkImageData * img, double voxelsize){
 
                wxSplitterWindow        *pnlSplitter            = new wxSplitterWindow( this , -1);
                pnlSplitter     -> SetMinimumPaneSize( 2 );
+               //RaC Nov2012 Correctly resize internal panels with the window resize event
+                               pnlSplitter->SetSashGravity(0.5);
 
                wxPanel                         *MPRPanel       = CreateMPRPanel(pnlSplitter,_vtkmprbasedata);
                wxPanel                         *controlPanel   = CreateControlPanel(pnlSplitter);      
@@ -380,6 +409,8 @@ wxPanel* wxMPRWidget::CreateView(int type,wxWindow *parent, vtkMPRBaseData *vtkm
 //EEDxx2.4
                panelMPR3D      -> SetMinimumPaneSize( 5 );
                panelMPR3D      -> SplitHorizontally( controlPanel3D,window3D,600  );
+               //RaC Nov2012 Correctly resize internal panels with the window resize event
+               panelMPR3D->SetSashGravity(0.5);
 
                wxwindow=panelMPR3D;
        }
@@ -405,7 +436,7 @@ wxPanel* wxMPRWidget::CreateView(int type,wxWindow *parent, vtkMPRBaseData *vtkm
 
                wxPanel                 *panelControl                   = new wxPanel(panelClipping3D,-1);      
                wxPanel                 *controlPanelMPR3D              = _wxvtkmpr3Dview_BB->CreateControlPanel(panelControl, false);
-               wxPanel                 *controlPanelClipping3D = _wxvtkclipping3Dview_BB->CreateControlPanel(panelControl);
+               wxPanel                 *controlPanelClipping3D = _wxvtkclipping3Dview_BB->CreateSurfControlPanel(panelControl);
                                 _btnCutImageData               = new wxCheckBox(panelControl,-1,_T("Cut Module"));
                Connect(_btnCutImageData->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED  , (wxObjectEventFunction) &wxMPRWidget::OnCutImagaData );
 
@@ -424,6 +455,8 @@ wxPanel* wxMPRWidget::CreateView(int type,wxWindow *parent, vtkMPRBaseData *vtkm
 //EEDxx2.4
                panelClipping3D -> SetMinimumPaneSize( 5 );
                panelClipping3D -> SplitHorizontally( panelControl , window3D , 10  );
+               //RaC Nov2012 Correctly resize internal panels with the window resize event
+               panelClipping3D->SetSashGravity(0.5);
                wxwindow=panelClipping3D;
        }
 
@@ -531,7 +564,7 @@ wxPanel* wxMPRWidget::CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkm
 
        wxPanel         *panelControl                   = new wxPanel(panelMPR3D,-1);
        wxPanel         *controlPanelMPR3D              = _wxvtkmpr3Dview->CreateControlPanel(panelControl, false);
-       wxPanel         *controlPanelClipping3D = _wxvtkclipping3Dview->CreateControlPanel(panelControl);
+       wxPanel         *controlPanelClipping3D = _wxvtkclipping3Dview->CreateSurfControlPanel(panelControl);
 
 
 
@@ -549,7 +582,8 @@ wxPanel* wxMPRWidget::CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkm
 
 //EEDxx2.4
        panelMPR3D      -> SetMinimumPaneSize( 5 );
-
+       //RaC Nov2012 Correctly resize internal panels with the window resize event
+       panelMPR3D->SetSashGravity(0.5);
        panelMPR3D      -> SplitHorizontally( panelControl,window3D,200  );
 
        notebook->AddPage( panelMPR3D, _T("MPR 3D - Clipping") );