}
-void interfDeleteMenu::onDeleteContour(wxCommandEvent& event){
- interfMainPanel::getInstance()->onDeleteContour();
-}
-void interfDeleteMenu::onDeleteContoursActSlice(wxCommandEvent& event){
+void interfDeleteMenu::onDeleteContoursActSlice(wxCommandEvent& event)
+{
interfMainPanel::getInstance()->onDeleteContoursActSlice();
}
-void interfDeleteMenu::onDeleteAllContours(wxCommandEvent& event){
+
+void interfDeleteMenu::onDeleteContour(wxCommandEvent& event)
+{
+ interfMainPanel::getInstance()->onDeleteContour();
+}
+
+void interfDeleteMenu::onDeleteAllContours(wxCommandEvent& event)
+{
interfMainPanel::getInstance()->onDeleteAllContours();
}
public:
interfDeleteMenu(wxWindow * parent, int sizex, int sizey,wxEvtHandler* evtHandler, std::string datdir = "data/Icons");
~interfDeleteMenu();
-
virtual void initButtons(wxEvtHandler* evtHandler) ;
-
private:
/**
** This methods are in charge of responding to the events of button click by the delete panel
** @params wxCommandEvent& the event that call the function
**/
- void onDeleteContour(wxCommandEvent& event);
void onDeleteContoursActSlice(wxCommandEvent& event);
+ void onDeleteContour(wxCommandEvent& event);
void onDeleteAllContours(wxCommandEvent& event);
-
};
#endif
# knowledge of the CeCILL-B license and that you accept its terms.
# ------------------------------------------------------------------------ */
-#include "interfMainPanel.h"
+#include <wx/msgdlg.h>
+#include "interfMainPanel.h"
interfMainPanel *interfMainPanel::interfmainpanel = NULL;
wxFrame *interfMainPanel::_newframe = NULL;
wxContourMainFrame::getInstance()->onCreateContourBullEye(panBull);
}
-void interfMainPanel::onDeleteContour()
+void interfMainPanel::onDeleteContoursActSlice()
{
wxContourMainFrame::getInstance()->showAxis(false);
- wxContourMainFrame::getInstance()->onDeleteContour();
+ wxContourMainFrame::getInstance()->onDeleteContoursActSlice();
}
-void interfMainPanel::onDeleteContoursActSlice()
+void interfMainPanel::onDeleteContour()
{
wxContourMainFrame::getInstance()->showAxis(false);
- wxContourMainFrame::getInstance()->onDeleteContoursActSlice();
+ wxContourMainFrame::getInstance()->onDeleteContour();
}
void interfMainPanel::onDeleteAllContours()
{
- wxContourMainFrame::getInstance()->showAxis(false);
- wxContourMainFrame::getInstance()->onDeleteAllContours();
+ wxMessageDialog *dial;
+ dial=new wxMessageDialog( NULL,
+ wxT("Delete all contours of the system?"),
+ wxT("Warnning!"),
+ wxOK | wxCANCEL | wxICON_QUESTION );
+ if (dial->ShowModal()==wxID_OK)
+ {
+ wxContourMainFrame::getInstance()->showAxis(false);
+ wxContourMainFrame::getInstance()->onDeleteAllContours();
+ } // if OK
}
void interfMainPanel::onCopy()
void onCreateContoursBullEye(wxPanel* panBull);
/////////////////////////////////
- void onDeleteContour();
void onDeleteContoursActSlice();
+ void onDeleteContour();
void onDeleteAllContours();
/////////////////////////
void onCopy();