-
Notifications
You must be signed in to change notification settings - Fork 0
/
cMain.h
112 lines (81 loc) · 2.87 KB
/
cMain.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#pragma once
struct GridPos { int x, z; wxToggleButton* button; };
struct BlockPos { int x, y, z; };
class cMain : public wxFrame
{
public:
cMain();
private:
wxMenuBar* menuBar = nullptr;
wxScrolledWindow* mainScrollWindow = nullptr;
wxPanel* mainPanel = nullptr;
wxSplitterWindow* splitter = nullptr;
wxPanel* controlPanel = nullptr;
wxButton* upButton = nullptr;
wxStaticText* layerText = nullptr;
wxButton* downButton = nullptr;
wxStaticText* blocksText = nullptr;
wxStaticText* sizeSliderText = nullptr;
wxSlider* buttonSizeSlider = nullptr;
wxPanel* widthPanel = nullptr;
wxStaticText* modifyWidthText = nullptr;
wxButton* widthPlusButton = nullptr;
wxButton* widthMinusButton = nullptr;
wxPanel* heightPanel = nullptr;
wxStaticText* modifyHeightText = nullptr;
wxButton* HeightPlusButton = nullptr;
wxButton* HeightMinusButton = nullptr;
wxPanel* copyPastePanel = nullptr;
wxStaticText* copyPasteText = nullptr;
wxButton* copyButton = nullptr;
wxButton* pasteButton = nullptr;
wxStaticText* currentCopyPasteText = nullptr;
wxBoxSizer* mainPanelSizer = nullptr;
wxBoxSizer* controlPanelSizer = nullptr;
wxBoxSizer* widthSizer = nullptr;
wxBoxSizer* heightSizer = nullptr;
wxBoxSizer* copyPasteSizer = nullptr;
wxDialog* dimensionDialog = nullptr;
wxPanel* dialogBasePanel = nullptr;
int size[2] = { 7, 7 };
int blocks = 0;
wxStaticText* fromHeading = nullptr;
wxButton* dialogOkBtn = nullptr;
wxButton* dialogCancelBtn = nullptr;
wxMessageDialog* clearBlocks = nullptr;
int posFrom[2] = { -2, -3 };
wxTextCtrl* textCtrlSize_X = nullptr;
int posTo[2] = { 3, 3 };
wxTextCtrl* textCtrlSize_Z = nullptr;
void OnNew(wxCommandEvent& WXUNUSED(event));
void OnOpen(wxCommandEvent& WXUNUSED(event));
void OnSave(wxCommandEvent& WXUNUSED(event));
void OnSaveAs(wxCommandEvent& WXUNUSED(event));
void OnHelp(wxCommandEvent& WXUNUSED(event));
void OnAbout(wxCommandEvent& WXUNUSED(event));
void OnLayerUp(wxCommandEvent& WXUNUSED(event));
void OnLayerDown(wxCommandEvent& WXUNUSED(event));
void OnButtonSlider(wxCommandEvent& WXUNUSED(event));
void OnHeightPlus(wxCommandEvent& WXUNUSED(event));
void OnHeightMinus(wxCommandEvent& WXUNUSED(event));
void OnWidthPlus(wxCommandEvent& WXUNUSED(event));
void OnWidthMinus(wxCommandEvent& WXUNUSED(event));
void OnSetLayer(wxCommandEvent& WXUNUSED(event));
void OnPasteLayer(wxCommandEvent& WXUNUSED(event));
wxSize buttonSize = {100, 100};
int spacer = 5;
void OnButtonHover(wxToggleButton* button, GridPos* pos);
int layer = 0;
int layerToDuplicate = 0;
std::string filename = "";
std::string filepath = "";
std::vector< std::shared_ptr<BlockPos> > selectedBlocks;
std::vector< std::shared_ptr<GridPos> > allocatedGridPos;
void updateButtonGrid();
void createButtonGrid();
void resetLabels();
void toggleBlockState(GridPos* block);
void OnMouse(wxMouseEvent& e);
public:
wxDECLARE_EVENT_TABLE();
};