1 /*=========================================================================
4 Module: $RCSfile: wxMaracasIRMView.h,v $
6 Date: $Date: 2009/04/01 16:16:59 $
7 Version: $Revision: 1.1 $
9 Copyright: (c) 2002, 2003
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notice for more information.
16 =========================================================================*/
19 #ifndef __wxMaracasIRMViewH__
20 #define __wxMaracasIRMViewH__
24 #include "wx/aui/aui.h"
30 #include "vtkProp3D.h"
32 #include "wxMaracasIRMViewManager.h"
34 class creaMaracasVisu_EXPORT wxMaracasIRMView : public wxPanel
38 wxMaracasIRMView( wxWindow* parent);
41 static wxMaracasIRMView* getInstance(wxWindow* parent);
43 static wxMaracasIRMView* getInstance();
45 void setRenderer(vtkRenderer* renderer);
47 void changeOpacity(int _propid, int value);
49 void changeIsoValue(int _propid, int value);
53 void addProp3D(vtkProp3D* prop3D);
59 static wxMaracasIRMView* instance;
61 wxMaracasIRMViewManager* irmmanager;
63 wxAuiManager* wxauimanager;
65 void createFileChooser();
68 #endif // __wxMaracasIRMViewH__
70 // EOF - wxMaracasIRMView.h
72 #ifndef __wxMaracasIRMViewPanelH__
73 #define __wxMaracasIRMViewPanelH__
75 class wxMaracasIRMViewPanel : public wxPanel{
77 wxMaracasIRMViewPanel(wxWindow* parent)
78 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize){
81 //virtual ~wxMaracasIRMViewPanel();
82 virtual void createPanel(){
84 wxBoxSizer* sizerButtons = new wxBoxSizer(wxVERTICAL);
86 wxButton* b = new wxButton(this, -1, wxString(_T("-")), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT,
87 wxDefaultValidator, wxString(_T("-")));
88 Connect(b->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewPanel::onActionButtonPressedHide);
89 wxButton* b1 = new wxButton(this, -1, wxString(_T("-")), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT,
90 wxDefaultValidator, wxString(_T("x")));
91 Connect(b1->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewPanel::onActionButtonPressedEliminate);
93 sizerButtons->Add(b, wxFIXED_MINSIZE);
94 sizerButtons->Add(b1, wxFIXED_MINSIZE);
96 sizercontrols = new wxBoxSizer(wxVERTICAL);
98 wxBoxSizer* sizerpanel = new wxBoxSizer(wxHORIZONTAL);
100 sizerpanel->Add(sizerButtons,wxGROW);
101 sizerpanel->Add(sizercontrols,wxGROW);
103 this->SetSizer(sizerpanel, true);
104 this->SetAutoLayout( true );
108 ** Adds a new control to the panel (sizer, radiob, etc)
110 virtual void addControl(wxWindow* win){
111 if(sizercontrols!=NULL){
112 sizercontrols->Add(win, wxGROW);
117 ** Hides or show the controls in the panel
119 virtual void onActionButtonPressedHide( wxCommandEvent& event ){
120 wxList list = sizercontrols->GetChildren();
122 for(i=0; i<list.size();i++){
123 sizercontrols->Show(i,show);
126 sizercontrols->Layout();
131 ** The user must implement this function to remove the panel from the
133 virtual void onActionButtonPressedEliminate( wxCommandEvent& event )=0;
136 ** The user must implement this function to add the necessary controls to the panel
138 virtual void createControls( )=0;
141 wxBoxSizer* sizercontrols;
148 #ifndef __wxMaracasIRMViewPanelProp3DH__
149 #define __wxMaracasIRMViewPanelProp3DH__
151 class wxMaracasIRMViewProp3D : public wxMaracasIRMViewPanel{
153 wxMaracasIRMViewProp3D(wxWindow* parent, int propid);
154 ~wxMaracasIRMViewProp3D();
155 void createControls();
156 void onActionButtonPressedEliminate( wxCommandEvent& event );
157 void onOpacityRelease(wxScrollEvent& event );
158 void onIsoValueRelease(wxScrollEvent& event );
159 void onRadioBoxChange(wxCommandEvent& event);
183 class ToolBar : public wxToolBar{
187 ToolBar(wxWindow * parent,std::string iconsdir="C:/Creatis/creaAppli/Development/creaPipeline/Data/Icons/");
191 void onExecPipeline(wxCommandEvent& event);
193 void onLoadConfig(wxCommandEvent& event);
200 DECLARE_EVENT_TABLE()