/
EmbeddedLayout.h
47 lines (36 loc) · 947 Bytes
/
EmbeddedLayout.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
#pragma once
#include <memory>
#include "wxutil/PanedPosition.h"
#include "imainframelayout.h"
#include "camera/CamWnd.h"
#include "wxutil/Splitter.h"
namespace ui
{
#define EMBEDDED_LAYOUT_NAME "Embedded"
class EmbeddedLayout;
typedef std::shared_ptr<EmbeddedLayout> EmbeddedLayoutPtr;
class EmbeddedLayout :
public IMainFrameLayout
{
private:
// The camera view
CamWndPtr _camWnd;
wxutil::Splitter* _horizPane;
wxutil::Splitter* _groupCamPane;
struct SavedPositions
{
int horizSashPosition;
int groupCamSashPosition;
};
std::unique_ptr<SavedPositions> _savedPositions;
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 EmbeddedLayoutPtr CreateInstance();
};
} // namespace ui