forked from Satissis/CourseplayEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Courseplay_EditorMain.h
199 lines (173 loc) · 6.74 KB
/
Courseplay_EditorMain.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
/***************************************************************
* Name: Courseplay_EditorMain.h
* Purpose: Defines Application Frame
* Author: Claus G. Pedersen aka Satis ([email protected])
* Created: 2013-06-08
* Copyright: Claus G. Pedersen aka Satis (https://github.com/Satissis/CourseplayEditor)
* License:
**************************************************************/
#ifndef COURSEPLAY_EDITORMAIN_H
#define COURSEPLAY_EDITORMAIN_H
#include "wxPNGResource.h"
#include "Variables.h"
#include "DataHandler.h"
//(*Headers(Courseplay_EditorFrame)
#include <wx/scrolwin.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/menu.h>
#include <wx/textctrl.h>
#include <wx/checklst.h>
#include <wx/checkbox.h>
#include <wx/aui/aui.h>
#include <wx/panel.h>
#include <wx/button.h>
#include <wx/frame.h>
#include <wx/combobox.h>
#include <wx/statusbr.h>
//*)
struct CheckListItem
{
wxString text;
bool isChecked;
};
class Settings;
class Courseplay_EditorFrame: public wxFrame
{
public: // Functions
Courseplay_EditorFrame(wxWindow* parent,wxWindowID id = -1);
virtual ~Courseplay_EditorFrame();
void updateToolbar2();
void updateSavegameList();
void loadSavegame();
int askToSave();
public: // Event Functions
void OnBtnFillOutDropdown (wxAuiToolBarEvent& event);
void OnBtnGameSelectDropdown(wxAuiToolBarEvent& event);
void OnGameFS2011Select (wxCommandEvent& event);
void OnGameFS2013Select (wxCommandEvent& event);
void OnRCMAddSelect (wxCommandEvent& event);
void OnRCMInsertSelect (wxCommandEvent& event);
void OnRCMDeleteSelect (wxCommandEvent& event);
void OnRCMFillSelect (wxCommandEvent& event);
public: // Variables
private: // Functions
private: // Variables
Settings *setup;
DataHandler *data;
bool courseListSelectedAll;
bool rightClickMenuOpen;
int courseListSelectedIndex;
int mousePosX;
int mousePosY;
wxPNGResource res;
wxBitmap TbIcon_Add;
wxBitmap TbIcon_Insert;
wxBitmap TbIcon_Delete;
wxBitmap TbIcon_FillOut;
wxBitmap TbIcon_Games[NumOfFSGames];
static const long Game_FarmingSimulator2011;
static const long Game_FarmingSimulator2013;
static const long RightClickMenu_Add;
static const long RightClickMenu_Insert;
static const long RightClickMenu_Delete;
static const long RightClickMenu_FillOut;
private: // Code::Block handles this section.
//(*Handlers(Courseplay_EditorFrame)
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnClose(wxCloseEvent& event);
void OnCourseListToggled(wxCommandEvent& event);
void OnCourseListSelect(wxCommandEvent& event);
void OnSelectAllCourseClick(wxCommandEvent& event);
void OnCourseNameEnter(wxCommandEvent& event);
void OnMoveCourseUpClick(wxCommandEvent& event);
void OnMoveCourseDownClick(wxCommandEvent& event);
void OnWpPropReverseClick(wxCommandEvent& event);
void OnWpPropWaitPointClick(wxCommandEvent& event);
void OnWpPropCrossingClick(wxCommandEvent& event);
void OnMainWindowRightDown(wxMouseEvent& event);
void OnUndoSelected(wxCommandEvent& event);
void OnRedoSelected(wxCommandEvent& event);
void OnSettingsSelected(wxCommandEvent& event);
void OnManualSelected(wxCommandEvent& event);
void OnSavegameSelected(wxCommandEvent& event);
void OnBtnReloadSavegameClick(wxCommandEvent& event);
void OnBtnSaveSavegameClick(wxCommandEvent& event);
//*)
//(*Identifiers(Courseplay_EditorFrame)
static const long ID_TLB1_BTN_NEW;
static const long ID_TLB1_BTN_INSERT;
static const long ID_TLB1_BTN_DELETE;
static const long ID_TLB1_BTN_FILL;
static const long ID_TOOL_UNDO;
static const long ID_TOOL_REDO;
static const long TLB_1;
static const long ID_Main_Window;
static const long ID_COURSELISTBOX;
static const long BTN_SELECTALLCOURSE;
static const long BTN_MOVECOURSEUP;
static const long BTN_MOVECOURSEDOWN;
static const long ID_STATICTEXT1;
static const long TXT_COURSENAME;
static const long ID_PANEL1;
static const long ID_STATICTEXT2;
static const long ID_TEXTCTRL1;
static const long ID_STATICTEXT3;
static const long ID_TEXTCTRL2;
static const long ID_STATICTEXT5;
static const long ID_TEXTCTRL3;
static const long ID_STATICTEXT4;
static const long ID_TEXTCTRL4;
static const long ID_CHECKBOX1;
static const long ID_CHECKBOX2;
static const long ID_CHECKBOX3;
static const long ID_PANEL2;
static const long ID_TLB2_BTN_GAME_SELECT;
static const long ID_TLB2_COMBOX_SAVEGAMESELECT;
static const long ID_TLB2_BTN_RELOAD;
static const long ID_TLB2_BTN_SAVESAVEGAME;
static const long TLB_2;
static const long idMenuQuit;
static const long ID_EDIT_Undo;
static const long ID_EDIT_Redo;
static const long ID_EDIT_Settings;
static const long ID_HELP_Manual;
static const long idMenuAbout;
static const long ID_STATUSBAR1;
//*)
//(*Declarations(Courseplay_EditorFrame)
wxCheckListBox* courseList;
wxButton* moveCourseDown;
wxButton* moveCourseUp;
wxAuiManager* m_mgr;
wxTextCtrl* wpPropPosX;
wxStaticText* StaticText2;
wxTextCtrl* wpPropAngle;
wxMenu* Menu3;
wxPanel* panelCourseList;
wxTextCtrl* courseName;
wxCheckBox* wpPropWaitPoint;
wxButton* selectAllCourse;
wxPanel* panelWpProp;
wxStaticText* StaticText1;
wxStaticText* StaticText3;
wxScrolledWindow* mainWindow;
wxMenuItem* Manual;
wxMenuItem* Redo;
wxStaticText* StaticText5;
wxStatusBar* StatusBar1;
wxTextCtrl* wpPropSpeed;
wxAuiToolBar* AuiTools1;
wxMenuItem* CPE_Settings;
wxComboBox* SavegameSelect;
wxTextCtrl* wpPropPosY;
wxStaticText* StaticText4;
wxMenuItem* Undo;
wxCheckBox* wpPropCrossing;
wxAuiToolBar* AuiTools2;
wxCheckBox* wpPropReverse;
//*)
DECLARE_EVENT_TABLE()
};
#endif // COURSEPLAY_EDITORMAIN_H