1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3  * http://www.gnu.org/licenses/gpl-3.0.html
4  */
5 
6 #ifndef COMPILERMESSAGES_H
7 #define COMPILERMESSAGES_H
8 
9 #include "loggers.h"
10 
11 class CompilerErrors;
12 class wxArrayString;
13 class wxCommandEvent;
14 
15 class CompilerMessages : public wxEvtHandler, public ListCtrlLogger
16 {
17     public:
18         CompilerMessages(const wxArrayString& titles, const wxArrayInt& widths);
19         virtual ~CompilerMessages();
SetCompilerErrors(CompilerErrors * errors)20         virtual void SetCompilerErrors(CompilerErrors* errors){ m_pErrors = errors; }
21         virtual void FocusError(int nr);
22 
23         void AutoFitColumns(int column);
24 
25         virtual wxWindow* CreateControl(wxWindow* parent);
26         void DestroyControls();
27 
28         virtual bool HasFeature(Feature::Enum feature) const;
29         virtual void AppendAdditionalMenuItems(wxMenu &menu);
30     private:
31         void OnClick(wxCommandEvent& event);
32         void OnDoubleClick(wxCommandEvent& event);
33         void OnFit(wxCommandEvent& event);
34         void OnAutoFit(wxCommandEvent& event);
35 
36         void FitColumns();
37 
38         CompilerErrors* m_pErrors;
39         bool m_autoFit;
40 
41         DECLARE_EVENT_TABLE()
42 };
43 
44 #endif // COMPILERMESSAGES_H
45 
46