wxMaracasSurfaceRenderingProp3DMHD.cxx

Go to the documentation of this file.
00001 #include "wxMaracasSurfaceRenderingProp3DMHD.h"
00002 
00003 #include "wxMaracasSurfaceRendering.h"
00004 #include "wxMaracasRendererView.h"
00005 #include <OpenImage.xpm>
00009 wxMaracasSurfaceRenderingProp3DMHD::wxMaracasSurfaceRenderingProp3DMHD(wxWindow* parent, int propid, bool _isComplexBox, int _panID)
00010 : wxMaracasSurfaceRenderingProp3D(parent, propid, _isComplexBox, _panID){
00011         
00012 }
00013 wxMaracasSurfaceRenderingProp3DMHD::~wxMaracasSurfaceRenderingProp3DMHD(){
00014         //this->Show(false);
00015         if(this->isComplex())
00016         {
00017                 //if(this->getPanId() == 1)
00018                 //      ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->addRemoveActorSA(_propid, false);
00019                 //if(this->getPanId() == 2)
00020                 //      ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->addRemoveActorSB(_propid, false);
00021                 //if(this->getPanId() == 3)
00022                 //      ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->addRemoveActorSC(_propid, false);
00023         }
00024         //else
00025                 //wxMaracasSurfaceRendering::getInstance()->addRemoveActor(_propid, false);
00026 }
00027 void wxMaracasSurfaceRenderingProp3DMHD::createControls(int maxisovalue){
00028         
00029         wxFlexGridSizer* sizer = new wxFlexGridSizer(1,1,1);
00030 
00031         wxStaticText* label = new wxStaticText(this, -1, wxString(_T("IsoValue")));
00032         sizer->Add(label, wxFIXED_MINSIZE);
00033         //this->addControl(label);
00034         isovalue = new wxSlider(this, -1,maxisovalue,0,maxisovalue,wxDefaultPosition,wxDefaultSize,wxSL_HORIZONTAL|wxSL_LABELS);
00035         sizer->Add(isovalue, wxFIXED_MINSIZE);
00036         //this->addControl(isovalue);
00037 
00038         this->addControl(sizer);        
00039         Connect(isovalue->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction)&wxMaracasSurfaceRenderingProp3DMHD::onIsoValueRelease);        
00040 
00041 }
00042 
00043 void wxMaracasSurfaceRenderingProp3DMHD::onIsoValueRelease(wxScrollEvent& event )
00044 {
00045         if(this->isComplex())
00046         {
00047                 if(this->getPanId() == 1)
00048                         ( (wxMaracasRendererView::getInstance())->getTabbedPanel(getPropId()) )->changeIsoValueA(this->getPropId(),isovalue->GetValue()/1.0);
00049                 if(this->getPanId() == 2)
00050                         ( (wxMaracasRendererView::getInstance())->getTabbedPanel(getPropId()) )->changeIsoValueB(this->getPropId(),isovalue->GetValue()/1.0);
00051                 if(this->getPanId() == 3)
00052                         ( (wxMaracasRendererView::getInstance())->getTabbedPanel(getPropId()) )->changeIsoValueC(this->getPropId(),isovalue->GetValue()/1.0);
00053         }
00054         else
00055                 wxMaracasSurfaceRendering::getInstance()->changeIsoValue(this->getPropId(), isovalue->GetValue()/1.0);
00056         
00057 }
00058 
00059 void wxMaracasSurfaceRenderingProp3DMHD::onViewImage(wxCommandEvent& event){    
00060 
00061         //if(mwxwidget->ShowModal()==wxID_OK){
00062     
00063         //      mwxwidget->Show(false);
00064         //}     
00065 }
00066 

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1