4 #include "wxContourEventHandler.h"
6 #include "interfNewContourMenu.h"
7 #include "interfIOMenu.h"
8 #include "interfEditMenu.h"
9 #include "interfDeleteMenu.h"
10 #include "interfToolsMenu.h"
11 #include "interfToolsSpreadPanel.h"
12 #include "interfMenuBar.h"
14 #include <wx/treebook.h>
16 #include <wx/button.h>
17 #include <wx/stattext.h>
18 #include <wx/splitter.h>
19 #include <wx/statline.h>
21 class interfMainPanel : public wxPanel {
25 interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtHandler * evtHandler, std::string datadir = "data/Icons");
26 ~interfMainPanel(void);
28 /** This method should be called the first time by the parent class
29 ** in creates all the panels the first time
31 static interfMainPanel* getInstance(wxWindow* parent, wxEvtHandler * evtHandler, std::string datadir);
32 /** This method should be called the first time by the parent class
33 ** in creates all the panels the first time
35 static interfMainPanel* getInstance(wxWindow* parent, wxEvtHandler * evtHandler);
37 ** Gets the instance of the class
39 static interfMainPanel* getInstance();
43 ** Adds a new checkbox to the scrolledwindow using the checkboxsizer
44 ** @Params id of contour
47 void addContourCheckBox(std::string id);
50 ** Removes a checkbox from the list of checkboxes in the flexsizer (checkboxsizer)
51 ** @Params id of contour
54 void removeContourCheckBox(std::string id);
58 ** Responds to the events of the buttons, when the same panel is responsible for it. It gets the name
59 ** of the button corresponding to the method that has to be executed,
60 ** it uses attribute eventHandler to call the methods define by the application.
61 ** see setEventHandler(wxEventHandler*)
63 void onActionButtonPressed1( wxCommandEvent& event );
66 ** Shows the panel in the
68 void showPanel(wxWindow* panel);
70 ** Gets the Information panel
72 wxPanel* getInfoPanel();
78 static interfMainPanel* interfmainpanel;
88 wxWindow* currentWindow;
89 wxSplitterWindow* splitterwindow;
93 wxStaticText* statictext;
94 wxStaticText* statictext1;
95 wxStaticText* statictext2;
96 wxStaticText* statictext3;
97 wxStaticText* statictext4;
98 wxStaticText* statictext5;
108 //This attribute contains the panel in charge of adding and removing the corresponding checkboxes in
110 interfToolsSpreadPanel* toolspread;
113 ** This method initializes the tools panel, with the bar and the panel where the contours can be added
115 ** @params size of the buttons panel
116 ** @params sizey of the buttons panel
117 ** @params evtHandler this is the class in charge of responding to the events of the buttons
119 wxPanel* initializeToolsPanel(wxWindow* parent, int sizex, int sizey, wxEvtHandler * evtHandler);
122 ** initialize a statictext component of the interface
124 wxStaticText* getText(wxWindow* parent, std::string nom);
126 ** initializes a button with data
128 wxButton* getButton(wxWindow* parent);
130 ** Puts the panel button and the text int the sizer
132 wxPanel* setMenuTextSizer(wxWindow* parent, wxPanel* panel, wxStaticText* text);