]> Creatis software - creaMaracasVisu.git/commitdiff
RaCNov2012 Correct resize of internal panels according to the window
authorcorredor <Ricardo.Corredor@creatis.insa-lyon.fr>
Fri, 30 Nov 2012 10:50:11 +0000 (11:50 +0100)
committercorredor <Ricardo.Corredor@creatis.insa-lyon.fr>
Fri, 30 Nov 2012 10:50:11 +0000 (11:50 +0100)
resize event

lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasDialog_NViewers.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx

index e25d2c977938ce34759777acdf27fd25bb4de8b3..a11e073be9d68c5a42ebb8133576a21c84b8a30c 100644 (file)
@@ -168,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);      
@@ -206,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);      
@@ -405,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;
        }
@@ -449,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;
        }
 
@@ -574,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") );
index cd603320c5579d335d7f5b08d67c8c2df32d9c91..867b425cec953d61ef826b2a8d5c507c25a89ee0 100644 (file)
@@ -43,6 +43,8 @@ wxMaracasDialog_NViewers::wxMaracasDialog_NViewers(wxWindow* parent, vtkImageDat
 {
        wxSplitterWindow *splitpanel = new wxSplitterWindow(this, -1);
        splitpanel->SetMinimumPaneSize(5);
+       //RaC Nov2012 Correctly resize internal panels with the window resize event
+       splitpanel->SetSashGravity(0.5);
 
        viewer = new wxMaracas_N_ViewersWidget(splitpanel, img, type);
 //     std::string path = crea::System::GetDllAppPath("bbcreaMaracasVisu.dll"); // JPR
index dffd79522154124021ace3b0c8f3ddb95134e02d..ed4001b153edb3f1896b98ab3b283a5507ef475e 100644 (file)
                }else   if (nTypeView->size()==2)       {
                        wxSplitterWindow        *spliter        = new wxSplitterWindow( this , -1);
                        spliter->SetMinimumPaneSize(1);
+                       //RaC Nov2012 Correctly resize internal panels with the window resize event
+                       spliter->SetSashGravity(0.5);
                        wxwindow1 = new wxMaracas_ViewerWidget(spliter, imagedata, (*nTypeView)[0], mvtkmprbasedata);
                        wxwindow2 = new wxMaracas_ViewerWidget(spliter, imagedata, (*nTypeView)[1], mvtkmprbasedata);
                        spliter -> SplitHorizontally( wxwindow1 , wxwindow2  );
                        wxSplitterWindow        *spliterA       = new wxSplitterWindow( spliter , -1);
                        spliter->SetMinimumPaneSize(1);
                        spliterA->SetMinimumPaneSize(1);
+                       //RaC Nov2012 Correctly resize internal panels with the window resize event
+                       spliter->SetSashGravity(0.5);
+                       spliterA->SetSashGravity(0.5);
                        wxwindow1 = new wxMaracas_ViewerWidget(spliter , imagedata, (*nTypeView)[0], mvtkmprbasedata);
                        wxwindow2 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[1], mvtkmprbasedata);
                        wxwindow3 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[2], mvtkmprbasedata);
                        spliter->SetMinimumPaneSize(1);
                        spliterA->SetMinimumPaneSize(1);
                        spliterB->SetMinimumPaneSize(1);
+                       //RaC Nov2012 Correctly resize internal panels with the window resize event
+                       spliter->SetSashGravity(0.5);
+                       spliterA->SetSashGravity(0.5);
+                       spliterB->SetSashGravity(0.5);
 
                        spliter -> SplitVertically( spliterA , spliterB   );
                        
index 7527bf2d56d198865a1fc1625ca4f3f1dba4199f..b61bb0d52aa096cbbd79d95aa38340ed129b5529 100644 (file)
                        panelClipping3D->SplitHorizontally( notebook , window3D , 10  );
                        //panelClipping3D->SetMinimumPaneSize( 15 );
                        panelClipping3D->SetMinimumPaneSize( 70 ); // JPR
+                       //RaC Nov2012 Correctly resize internal panels with the window resize event
+                       panelClipping3D->SetSashGravity(0.5);
 
        /*              EED 04 / Febrary / 2010
                        panelControl                    = new wxPanel(panelClipping3D,-1);
                        panelClipping3D->SetMinimumPaneSize( 130 );  // FCY
                        panelClipping3D->SplitHorizontally( panelControl , window3D , 0  );
                        //panelClipping3D->SetSashSize(10);
+
+                       //RaC Nov2012 Correctly resize internal panels with the window resize event
+                       panelClipping3D->SetSashGravity(0.5);
                        panelClipping3D->UpdateSize(); //FCY
                        wxwindow=panelClipping3D;