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
00015 if(this->isComplex())
00016 {
00017
00018
00019
00020
00021
00022
00023 }
00024
00025
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
00034 isovalue = new wxSlider(this, -1,maxisovalue,0,maxisovalue,wxDefaultPosition,wxDefaultSize,wxSL_HORIZONTAL|wxSL_LABELS);
00035 sizer->Add(isovalue, wxFIXED_MINSIZE);
00036
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
00062
00063
00064
00065 }
00066