Debian Codegraph @

source/tools/atlas/AtlasUI/ScenarioEditor/SectionLayout.h

raw
1 /* Copyright (C) 2025 Wildfire Games.
2 * This file is part of 0 A.D.
3 *
4 * 0 A.D. is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * 0 A.D. is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #ifndef INCLUDED_SECTIONLAYOUT
19 #define INCLUDED_SECTIONLAYOUT
20
21 #include <map>
22 #include <string>
23
24 class ScenarioEditor;
25 class SidebarBook;
26 class SnapSplitterWindow;
27 class wxString;
28 class wxWindow;
29
30 // Some platform dependent sizes
31 #if defined(__WXGTK__)
32 #define SIDEBAR_SIZE 285
33 #define BOTTOMBAR_SIZE 200
34 #elif defined(__WXOSX__) || defined(__WXMAC__)
35 #define SIDEBAR_SIZE 285
36 #define BOTTOMBAR_SIZE 210
37 #else // __MSW__
38 #define SIDEBAR_SIZE 235
39 #define BOTTOMBAR_SIZE 180
40 #endif
41
42 class SectionLayout
43 {
44 public:
45 SectionLayout();
46 ~SectionLayout();
47
48 void SetWindow(wxWindow* window);
49 wxWindow* GetCanvasParent();
50 void SetCanvas(wxWindow*);
51 void Build(ScenarioEditor&);
52
53 void SelectPage(const wxString& classname);
54
55 void OnMapReload();
56 void OnShutdown();
57
58 private:
59 SidebarBook* m_SidebarBook;
60 wxWindow* m_Canvas;
61 SnapSplitterWindow* m_HorizSplitter;
62 SnapSplitterWindow* m_VertSplitter;
63 std::map<std::wstring, int> m_PageMappings;
64 };
65
66 #endif // INCLUDED_SECTIONLAYOUT