-
Notifications
You must be signed in to change notification settings - Fork 47
/
RegularLayout.h
60 lines (45 loc) · 1.38 KB
/
RegularLayout.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
52
53
54
55
56
57
58
59
60
#pragma once
#include "wxutil/PanedPosition.h"
#include "imainframelayout.h"
namespace ui
{
class CamWnd;
typedef std::shared_ptr<CamWnd> CamWndPtr;
#define REGULAR_LAYOUT_NAME "Regular"
#define REGULAR_LEFT_LAYOUT_NAME "RegularLeft"
class RegularLayout;
typedef std::shared_ptr<RegularLayout> RegularLayoutPtr;
class RegularLayout :
public IMainFrameLayout
{
// The camera view
CamWndPtr _camWnd;
struct RegularView
{
wxSplitterWindow* horizPane;
wxSplitterWindow* texCamPane;
wxutil::PanedPosition posHPane;
wxutil::PanedPosition posTexCamPane;
} _regular;
// Whether the cam is left or right
bool _regularLeft;
// Pass the exact type (left/right) to the constructor
RegularLayout(bool regularLeft);
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 RegularLayoutPtr CreateRegularLeftInstance();
static RegularLayoutPtr CreateRegularInstance();
private:
void maximiseCameraSize();
void restorePanePositions();
// Saves the state of this window layout to the given XMLRegistry path (without trailing slash)
void restoreStateFromPath(const std::string& path);
void saveStateToPath(const std::string& path);
};
} // namespace ui