CutModelView.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __CutModelViewPanelH__
00019 #define __CutModelViewPanelH__
00020
00021 #include <vector>
00022 #include <wx/wx.h>
00023 #include <wx/radiobut.h>
00024 #include "wx/aui/aui.h"
00025 #include <iostream>
00026 #include "marTypes.h"
00027
00028
00029 #include "CutModelManager.h"
00030 #include "CutModelException.h"
00031
00032 #include "vtkObject.h"
00033 #include "vtkCommand.h"
00034
00035
00036 class creaMaracasVisu_EXPORT CutModelView : public wxPanel, public vtkCommand
00037 {
00038
00039 public:
00040 CutModelView( wxWindow* parent,double* range);
00041 ~CutModelView( );
00042
00043 virtual void Execute(vtkObject *wdg, unsigned long eventId, void* calldata) ;
00044
00045 int getId(){
00046 return _id;
00047 }
00048 void setId(int id){
00049 _id = id;
00050 }
00051
00052 void ExecuteCut();
00053
00054 void SetCurrentColor(wxColour colour);
00055
00056 private:
00057
00058 int _id;
00059
00060 wxSlider* _sliderrange;
00061 wxRadioBox* _radioinsideout;
00062
00063 wxStaticText* _currentcolor;
00064
00065 double* getRange();
00066 bool isCut();
00067 bool isInside();
00068
00069
00070
00071 wxSizer* getBoxControls(wxWindow* parent, double* range);
00072
00073
00074 wxSizer* getActorProperties(wxWindow* parent);
00075 wxSizer* getColorChooseActor(wxWindow* parent);
00076 wxSizer* getOpacityActor(wxWindow* parent);
00077
00078 void checkInvariant() throw( CutModelException);
00079
00080 };
00081
00082 class CutModelViewEventHandler : public wxEvtHandler{
00083
00084 public:
00085 CutModelViewEventHandler(): wxEvtHandler(){};
00086 ~CutModelViewEventHandler(){};
00087
00088 void onColorChange(wxCommandEvent& event);
00089 void onOpacityChange(wxScrollEvent& event);
00090 void onViewBoxChecked(wxCommandEvent& event);
00091 void onShapeChange(wxCommandEvent& event);
00092 void onStatistics(wxCommandEvent& event);
00093 void onExecute(wxCommandEvent& event);
00094
00095
00096
00097 private:
00098
00099 };
00100
00101
00102 #endif
00103