1 /*
2  Copyright (C) 2010-2014 Kristian Duske
3 
4  This file is part of TrenchBroom.
5 
6  TrenchBroom is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  TrenchBroom is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with TrenchBroom. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #include "InfoPanel.h"
21 
22 #include "IO/Path.h"
23 #include "IO/ResourceUtils.h"
24 #include "View/Console.h"
25 #include "View/ContainerBar.h"
26 #include "View/IssueBrowser.h"
27 #include "View/TabBar.h"
28 #include "View/TabBook.h"
29 
30 #include <wx/sizer.h>
31 
32 #include <cassert>
33 
34 namespace TrenchBroom {
35     namespace View {
InfoPanel(wxWindow * parent,MapDocumentWPtr document)36         InfoPanel::InfoPanel(wxWindow* parent, MapDocumentWPtr document) :
37         wxPanel(parent),
38         m_tabBook(NULL),
39         m_console(NULL),
40         m_issueBrowser(NULL) {
41             m_tabBook = new TabBook(this);
42 
43             m_console = new Console(m_tabBook);
44             m_issueBrowser = new IssueBrowser(m_tabBook, document);
45 
46             m_tabBook->addPage(m_console, "Console");
47             m_tabBook->addPage(m_issueBrowser, "Issues");
48 
49             wxSizer* sizer = new wxBoxSizer(wxVERTICAL);
50             sizer->Add(m_tabBook, 1, wxEXPAND);
51             SetSizer(sizer);
52         }
53 
console() const54         Console* InfoPanel::console() const {
55             return m_console;
56         }
57     }
58 }
59