/
AuiLayout.h
51 lines (37 loc) · 1.09 KB
/
AuiLayout.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include <memory>
#include "wxutil/PanedPosition.h"
#include "imainframelayout.h"
#include "camera/CamWnd.h"
#include "wxutil/Splitter.h"
#include <wx/aui/aui.h>
namespace ui
{
#define AUI_LAYOUT_NAME "Dockable"
class AuiLayout;
typedef std::shared_ptr<AuiLayout> AuiLayoutPtr;
/// Layout based on wxWidgets AUI (dock widget interface)
class AuiLayout: public IMainFrameLayout
{
// The camera view
CamWndPtr _camWnd;
// Main AUI manager
wxAuiManager _auiMgr;
// List of panes managed by the AUI manager
using Panes = std::list<wxWindow*>;
Panes _panes;
// Main constructor
AuiLayout();
// Add a pane to the wxAuiManager and store it in the list
void addPane(wxWindow* window, const wxAuiPaneInfo& info);
public:
// IMainFrameLayout implementation
std::string getName() override;
void activate() override;
void deactivate() override;
void toggleFullscreenCameraView() override;
void restoreStateFromRegistry() override;
// The creation function, needed by the mainframe layout manager
static AuiLayoutPtr CreateInstance();
};
} // namespace ui