]> Creatis software - creaContours.git/blob - lib/Interface_Icons_NDimensions/interfMainPanel.h
*** empty log message ***
[creaContours.git] / lib / Interface_Icons_NDimensions / interfMainPanel.h
1 #pragma once
2
3 #include <wx/wx.h>
4 #include "wxContourEventHandler.h"
5
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"
13
14 #include <wx/treebook.h>
15 #include <wx/sizer.h>
16 #include <wx/button.h>
17 #include <wx/stattext.h>
18 #include <wx/splitter.h>
19 #include <wx/statline.h>
20
21 class interfMainPanel : public wxPanel {
22
23 public:
24         
25         interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtHandler * evtHandler, std::string datadir = "data/Icons");
26         ~interfMainPanel(void);
27
28         /**     This method should be called the first time by the parent class
29         **      in creates all the panels the first time
30         **/
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
34         **/
35         static interfMainPanel* getInstance(wxWindow* parent, wxEvtHandler * evtHandler);
36         /**
37         **      Gets the instance of the class
38         **/
39         static interfMainPanel* getInstance();
40
41
42         /**
43         **      Adds a new checkbox to the scrolledwindow using the checkboxsizer
44         **      @Params id of contour
45         **      
46         **/
47         void addContourCheckBox(std::string id);
48
49         /**
50         **      Removes a checkbox from the list of checkboxes in the flexsizer (checkboxsizer)
51         **      @Params id of contour
52         **      
53         **/
54         void removeContourCheckBox(std::string id);
55
56
57         /**
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*)
62         **/
63         void onActionButtonPressed1( wxCommandEvent& event );
64
65         /**
66         **      Shows the panel in the 
67         **/
68         void showPanel(wxWindow* panel);
69         /**
70         **      Gets the Information panel
71         **/
72         wxPanel* getInfoPanel();
73         
74
75 private:
76         
77
78         static interfMainPanel* interfmainpanel;
79
80
81         wxPanel* menubar;
82         wxPanel* menubar1;
83         wxPanel* menubar2;
84         wxPanel* menubar3;
85         wxPanel* menubar4;
86         wxPanel* menubar5;
87
88         wxWindow* currentWindow;
89         wxSplitterWindow* splitterwindow;
90
91         wxPanel* infoPanel;
92
93         wxStaticText* statictext;
94         wxStaticText* statictext1;
95         wxStaticText* statictext2;
96         wxStaticText* statictext3;
97         wxStaticText* statictext4;
98         wxStaticText* statictext5;
99
100         std::string PANEL;
101         std::string PANEL1;
102         std::string PANEL2;
103         std::string PANEL3;
104         std::string PANEL4;
105         std::string PANEL5;
106
107         
108         //This attribute contains the panel in charge of adding and removing the corresponding checkboxes in
109         //list of contours
110         interfToolsSpreadPanel* toolspread;
111
112         /**
113         **      This method initializes the tools panel, with the bar and the panel where the contours can be added
114         **      and removed.
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
118         **/
119         wxPanel* initializeToolsPanel(wxWindow* parent, int sizex, int sizey, wxEvtHandler * evtHandler);
120
121         /**
122         **      initialize a statictext component of the interface
123         **/
124         wxStaticText* getText(wxWindow* parent, std::string nom);
125         /**
126         ** initializes a button with data
127         **/
128         wxButton* getButton(wxWindow* parent);
129         /**
130         ** Puts the panel button and the text int the sizer
131         **/
132         wxPanel* setMenuTextSizer(wxWindow* parent, wxPanel* panel, wxStaticText* text);
133
134         
135         
136 };