From: corredor Date: Fri, 30 Nov 2012 10:50:11 +0000 (+0100) Subject: RaCNov2012 Correct resize of internal panels according to the window X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=3d8f194f91b97f9fa8cc3b5a78a1d297f83fc107;p=creaMaracasVisu.git RaCNov2012 Correct resize of internal panels according to the window resize event --- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx index e25d2c9..a11e073 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx @@ -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") ); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasDialog_NViewers.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasDialog_NViewers.cpp index cd60332..867b425 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasDialog_NViewers.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasDialog_NViewers.cpp @@ -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 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx index dffd795..ed4001b 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx @@ -254,6 +254,8 @@ }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 ); @@ -264,6 +266,9 @@ 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); @@ -277,6 +282,10 @@ 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 ); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx index 7527bf2..b61bb0d 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx @@ -162,6 +162,8 @@ 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); @@ -206,6 +208,9 @@ 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;