+void CutModelMainPanel::addPolygonCutterTab(){
+ wxPanel *panel = new wxPanel(_notebook);
+ panel->SetAutoLayout(true);
+ wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
+ panel->SetSizer(sizer);
+ sizer->AddSpacer(20);
+
+ wxCheckBox *item = new wxCheckBox(panel,10,_T("Draw Polygon"),wxDefaultPosition,wxDefaultSize,0,wxDefaultValidator,_T("") );
+ item->SetValue(false);
+ Connect(item->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)(&PolygonCutterEventHandlerCutModel::onCheckChanged));
+ sizer->Add(item, 0, wxALIGN_LEFT);
+
+ lblMessagePolygon = new wxStaticText(panel,30,_T("No contour drawed"),wxDefaultPosition,wxDefaultSize,0,_T("") );
+ sizer->Add(lblMessagePolygon, 0, wxALIGN_LEFT);
+
+ wxString choices0[2];
+ choices0[0] = _T("inside");
+ choices0[1] = _T("outside");
+ _radioinsideout = new wxRadioBox(panel,-1,_T(""), wxDefaultPosition, wxDefaultSize,2,choices0);
+ sizer->Add(_radioinsideout, wxALIGN_LEFT);
+
+ btnExecutePolygonCut = new wxButton(panel,20,_T("Execute Cut"),wxDefaultPosition,wxDefaultSize,0,wxDefaultValidator,_T("") );
+ Connect(btnExecutePolygonCut->GetId(), wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)(&PolygonCutterEventHandlerCutModel::onExecuteCutPolygon));
+ sizer->Add(btnExecutePolygonCut, 0, wxALIGN_LEFT);
+
+ _notebook->AddPage(panel, _T("Polygon Cutter"), false);
+}
+
+void PolygonCutterEventHandlerCutModel::onCheckChanged(wxCommandEvent& event){
+ CutModelMainPanel::getInstance()->onCheckChanged();
+}
+
+void PolygonCutterEventHandlerCutModel::onExecuteCutPolygon(wxCommandEvent& event){
+ CutModelMainPanel::getInstance()->onExecuteCutPolygon();
+}
+