/*=========================================================================
- Program: wxMaracas
- Module: $RCSfile: CutModelMainPanel.h,v $
- Language: C++
- Date: $Date: 2009/12/08 13:42:48 $
- Version: $Revision: 1.4 $
+Program: wxMaracas
+Module: $RCSfile: CutModelMainPanel.h,v $
+Language: C++
+Date: $Date: 2010/02/24 13:56:06 $
+Version: $Revision: 1.5 $
- Copyright: (c) 2002, 2003
- License:
+Copyright: (c) 2002, 2003
+License:
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- PURPOSE. See the above copyright notice for more information.
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include <wx/treebook.h>
#include "wx/aui/aui.h"
#include <wx/toolbar.h>
+
#include <iostream>
#include "marTypes.h"
#include "vtkImageData.h"
#include "vtkRenderWindowInteractor.h"
+//RaC 02-2010 Add tabs
+#include <wx/aui/auibook.h>
+#include <wx/panel.h>
+#include <wx/checkbox.h>
+#include <wx/button.h>
+#include <wx/sizer.h>
+#include <wx/stattext.h>
+#include <wx/radiobox.h>
+
+
class creaMaracasVisu_EXPORT CutModelMainPanel : public wxPanel
{
public:
-
- ~CutModelMainPanel( );
+
+ ~CutModelMainPanel( );
static CutModelMainPanel* getInstance(wxWindow* parent=NULL, std::string path ="");
void initialize(std::string path);
+ //RaC PolygonCutter changes
+ void onCheckChanged();
+ void onExecuteCutPolygon();
+ void UpdatePolygon(bool isChecked);
+ void UpdatePolygon();
+
void onAddCutModel();
void onUndo();
void ShowViewBox(int id,bool check);
void ChangeShape(int id,int selection);
-
+
void changeColor(int id,double r,double g,double b);
void updateActorDirection(int id);
int GetType();
-
+
private:
CutModelMainPanel( wxWindow* parent, std::string path);
wxAuiManager* _wxauimanager;
+ int addNewViewPanel()throw( CutModelException);
+
+ CutModelView* getModelView(int id)throw( CutModelException);
+
+ int _panelid;
+
+ int _type;
+
+ //RaC 02-2010 Add tabs
+ wxAuiNotebook* _notebook;
+
+ //RaC Adds Tab to cut a prism with the polygon as the base
+ void addPolygonCutterTab();
- int addNewViewPanel()throw( CutModelException);
+ bool _isCheck;
- CutModelView* getModelView(int id)throw( CutModelException);
+ bool _isFirstTime;
- int _panelid;
+ wxButton *btnExecutePolygonCut;
+ wxStaticText* lblMessagePolygon;
+ wxRadioBox* _radioinsideout;
- int _type;
};
class ToolBarEventHandlerCutModel : public wxEvtHandler{
- public:
- ToolBarEventHandlerCutModel();
- ~ToolBarEventHandlerCutModel();
+public:
+ ToolBarEventHandlerCutModel();
+ ~ToolBarEventHandlerCutModel();
+
+ void onAdd(wxCommandEvent& event);
+
+ void onUndo(wxCommandEvent& event);
- void onAdd(wxCommandEvent& event);
+ void onRedo(wxCommandEvent& event);
- void onUndo(wxCommandEvent& event);
+ void onExecuteAll(wxCommandEvent& event);
- void onRedo(wxCommandEvent& event);
+private:
- void onExecuteAll(wxCommandEvent& event);
+ DECLARE_EVENT_TABLE()
+};
- private:
+class PolygonCutterEventHandlerCutModel : public wxEvtHandler{
+public:
+
+ PolygonCutterEventHandlerCutModel(): wxEvtHandler(){};
+ ~PolygonCutterEventHandlerCutModel(){};
+
+ void onCheckChanged(wxCommandEvent& event);
+ void onExecuteCutPolygon(wxCommandEvent& event);
+
+};
- DECLARE_EVENT_TABLE()
- };
class ToolBarCutModel : public wxToolBar{
-
+
public:
ToolBarCutModel(wxWindow * parent);
~ToolBarCutModel(void);