]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasSurfaceRenderingProp3D.cxx
Insert a space before contour label at display time
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxMaracasSurfaceRenderingProp3D.cxx
index 1f296671935bf576cc43849ff735878ad3a04ff5..efcf931303e7ea0193ca5487668a941c8cf8ac34 100644 (file)
@@ -45,14 +45,23 @@ void wxMaracasSurfaceRenderingProp3D::createControls(){
        
        if(!isComplexBox) 
        {
-               wxString choices[2];
-               choices[0] = wxString(_T("On"));
-               choices[1] = wxString(_T("Off"));
+               //wxString choices[2];
+               //choices[0] = wxString(_T("On"));
+               //choices[1] = wxString(_T("Off"));
+               wxFlexGridSizer* checkboxsizer = new wxFlexGridSizer(2);
+
                checkbox = new  wxCheckBox(this,-1,wxString(_T("Show Actor")));
                Connect(checkbox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasSurfaceRenderingProp3D::onCheckBoxChange);  
                checkbox->SetValue(true);       
+               checkboxsizer->Add(checkbox,wxFIXED_MINSIZE);
+
+               checkboxsurface = new  wxCheckBox(this,-1,wxString(_T("Surface Box")));
+               Connect(checkboxsurface->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasSurfaceRenderingProp3D::onCheckBoxSurfaceChange);    
+               checkboxsurface->SetValue(true);
+               checkboxsizer->Add(checkboxsurface,wxFIXED_MINSIZE);
+               
 
-               sizersurfprop->Add(checkbox,wxFIXED_MINSIZE);
+               sizersurfprop->Add(checkboxsizer,wxFIXED_MINSIZE);
        }
 
        //this->addControl(checkbox);   
@@ -93,6 +102,10 @@ void wxMaracasSurfaceRenderingProp3D::onCheckBoxChange(wxCommandEvent& event){
        //if(!isComplexBox)
        wxMaracasSurfaceRendering::getInstance()->addRemoveActor(this->getPropId(), checkbox->GetValue());      
 }
+void wxMaracasSurfaceRenderingProp3D::onCheckBoxSurfaceChange(wxCommandEvent& event){  
+       //if(!isComplexBox)
+       wxMaracasSurfaceRendering::getInstance()->addRemoveSurfaceBox(this->getPropId(), checkboxsurface->GetValue());  
+}
 
 /**
 ** 
@@ -146,8 +159,8 @@ void wxMaracasSurfaceRenderingProp3D::onOpacityRelease(wxScrollEvent& event ){
 ** Loads the volume in a separate window
 **/
 void wxMaracasSurfaceRenderingProp3D::onViewImage(wxCommandEvent& event){      
-       printf("wxMaracasSurfaceRenderingProp3D->onViewImage: Test View Image");
-       vtkImageData* image = ((wxMaracasRendererView::getInstance())->getTabbedPanel(this->_propid))->getVolImage(this->_propid);
-       
-}
+       printf("wxMaracasSurfaceRenderingProp3D->onViewImage: Test View Image \n");
+       vtkImageData* image = ((wxMaracasRendererView::getInstance())->getTabbedPanel(this->_propid))->getVolImage();
 
+               
+}
\ No newline at end of file