Game Develop Core: EditExpressionDialog.h Source File

| Game Develop Core Core library for developing platforms and tools compatible with Game Develop.

- Main Page
- Modules
- Classes

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
EditExpressionDialog.h
Go to the documentation of this file.
1
5 #if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
6 #ifndef EditExpressionDialog_H
7 #define EditExpressionDialog_H
8
9 #include <string>
10 #include <vector>
11 //(*Headers(EditExpressionDialog)
12 #include <wx/treectrl.h>
13 #include <wx/sizer.h>
14 #include <wx/stattext.h>
15 #include <wx/aui/aui.h>
16 #include <wx/panel.h>
17 #include <wx/hyperlink.h>
18 #include <wx/bmpbuttn.h>
19 #include <wx/statbmp.h>
20 #include <wx/button.h>
21 #include <wx/dialog.h>
22 #include <wx/stc/stc.h>
23 //*)
24 #include <wx/imaglist.h>
25 #include "GDCore/Events/ExpressionMetadata.h"
26 namespace gd { class Project; }
27 namespace gd { class Layout; }
28 namespace gd { class ParameterMetadata; }
29
30 namespace gd
31 {
32
38 class GD_CORE_API EditExpressionDialog: public wxDialog
39 {
40 public:
41
49 EditExpressionDialog(wxWindow* parent, const std::string & expression, gd::Project & project_, gd::Layout & layout_);
50 virtual ~EditExpressionDialog();
51
55 const std::string & GetExpression() const {return expression;}
56
57 private:
58
59 //(*Declarations(EditExpressionDialog)
60 wxButton* SinBt;
61 wxPanel* mathPanel;
62 wxButton* OkBt;
63 wxButton* Button20;
64 wxStaticBitmap* StaticBitmap2;
65 wxButton* Button4;
66 wxButton* DivBt;
67 wxAuiManager* mgr;
68 wxPanel* objectsPanel;
69 wxStaticText* StaticText2;
70 wxButton* AddValBt;
71 wxPanel* centerPanel;
72 wxButton* Button1;
73 wxButton* ceilBt;
74 wxTreeCtrl* ValList;
75 wxHyperlinkCtrl* errorTxt;
76 wxButton* Button14;
77 wxBitmapButton* BitmapButton2;
78 wxStaticText* StaticText1;
79 wxHyperlinkCtrl* HyperlinkCtrl1;
80 wxBitmapButton* BitmapButton1;
81 wxPanel* freeFunctionsPanel;
82 wxTreeCtrl* ObjList;
83 wxButton* Button2;
84 wxButton* Button6;
85 wxButton* CosBt;
86 wxButton* POBt;
87 wxButton* Button10;
88 wxButton* Button11;
89 wxButton* Button5;
90 wxButton* Button3;
91 wxButton* Button7;
92 wxButton* Button19;
93 wxButton* Button9;
94 wxButton* AddPropBt;
95 wxButton* intBt;
96 wxButton* Button21;
97 wxButton* PlusBt;
98 wxStyledTextCtrl* ExpressionEdit;
99 wxButton* Button17;
100 wxButton* MinusBt;
101 wxButton* MultBt;
102 wxButton* Button18;
103 wxButton* Button15;
104 wxButton* Button16;
105 wxButton* PFBt;
106 wxButton* Button8;
107 wxButton* Button12;
108 //*)
109
110 //(*Identifiers(EditExpressionDialog)
111 static const long ID_CUSTOM1;
112 static const long ID_BUTTON1;
113 static const long ID_HYPERLINKCTRL1;
114 static const long ID_STATICBITMAP5;
115 static const long ID_HYPERLINKCTRL2;
116 static const long ID_PANEL1;
117 static const long ID_STATICTEXT1;
118 static const long ID_BUTTON2;
119 static const long ID_BUTTON3;
120 static const long ID_BUTTON4;
121 static const long ID_BUTTON5;
122 static const long ID_STATICTEXT2;
123 static const long ID_BUTTON6;
124 static const long ID_BUTTON7;
125 static const long ID_BUTTON13;
126 static const long ID_BUTTON14;
127 static const long ID_BITMAPBUTTON2;
128 static const long ID_BITMAPBUTTON1;
129 static const long ID_BUTTON15;
130 static const long ID_BUTTON12;
131 static const long ID_BUTTON8;
132 static const long ID_BUTTON9;
133 static const long ID_BUTTON16;
134 static const long ID_BUTTON33;
135 static const long ID_BUTTON29;
136 static const long ID_BUTTON28;
137 static const long ID_BUTTON27;
138 static const long ID_BUTTON26;
139 static const long ID_BUTTON18;
140 static const long ID_BUTTON19;
141 static const long ID_BUTTON20;
142 static const long ID_BUTTON21;
143 static const long ID_BUTTON22;
144 static const long ID_BUTTON23;
145 static const long ID_BUTTON24;
146 static const long ID_BUTTON25;
147 static const long ID_BUTTON30;
148 static const long ID_BUTTON31;
149 static const long ID_BUTTON32;
150 static const long ID_BUTTON17;
151 static const long ID_PANEL2;
152 static const long ID_TREECTRL1;
153 static const long ID_BUTTON10;
154 static const long ID_PANEL3;
155 static const long ID_TREECTRL2;
156 static const long ID_BUTTON11;
157 static const long ID_PANEL4;
158 //*)
159
160 //(*Handlers(EditExpressionDialog)
161 void OnOkBtClick(wxCommandEvent& event);
162 void OnPlusBtClick(wxCommandEvent& event);
163 void OnMinusBtClick(wxCommandEvent& event);
164 void OnMultBtClick(wxCommandEvent& event);
165 void OnDivBtClick(wxCommandEvent& event);
166 void OnPOBtClick(wxCommandEvent& event);
167 void OnPFBtClick(wxCommandEvent& event);
168 void OnCosBtClick(wxCommandEvent& event);
169 void OnSinBtClick(wxCommandEvent& event);
170 void OnAddPropBtClick(wxCommandEvent& event);
171 void OnAddValBtClick(wxCommandEvent& event);
172 void OnObjListItemActivated(wxTreeEvent& event);
173 void OnValListItemActivated(wxTreeEvent& event);
174 void OnButton2Click(wxCommandEvent& event);
175 void OnButton3Click(wxCommandEvent& event);
176 void OnBitmapButton2Click(wxCommandEvent& event);
177 void OnBitmapButton1Click(wxCommandEvent& event);
178 void OnButton4Click(wxCommandEvent& event);
179 void OnButton1Click(wxCommandEvent& event);
180 void OnButton5Click(wxCommandEvent& event);
181 void OnButton6Click(wxCommandEvent& event);
182 void OnButton7Click(wxCommandEvent& event);
183 void OnButton8Click(wxCommandEvent& event);
184 void OnButton9Click(wxCommandEvent& event);
185 void OnintBtClick(wxCommandEvent& event);
186 void OnObjListItemDoubleClicked(wxTreeEvent& event);
187 void OnValListItemDoubleClicked(wxTreeEvent& event);
188 void OnCustom1Paint(wxPaintEvent& event);
189 void OnHyperlinkCtrl1Click(wxCommandEvent& event);
190 void OnerrorTxtClick(wxCommandEvent& event);
191 void OnButton21Click(wxCommandEvent& event);
192 void OnButton14Click(wxCommandEvent& event);
193 void OnintBtClick1(wxCommandEvent& event);
194 void OnceilBtClick(wxCommandEvent& event);
195 void OnButton10Click(wxCommandEvent& event);
196 void OnButton11Click(wxCommandEvent& event);
197 void OnButton12Click(wxCommandEvent& event);
198 void OnButton18Click(wxCommandEvent& event);
199 void OnButton19Click(wxCommandEvent& event);
200 void OnButton20Click(wxCommandEvent& event);
201 void OnButton15Click(wxCommandEvent& event);
202 void OnButton16Click(wxCommandEvent& event);
203 void OnButton17Click(wxCommandEvent& event);
204 void OnButton21Click1(wxCommandEvent& event);
205 void OnhelpBtClick(wxCommandEvent& event);
206 //*)
207 void TextModified(wxStyledTextEvent& event);
208 void UpdateTextCtrl(wxStyledTextEvent& event);
209 std::string ShowParameterDialog(const gd::ParameterMetadata & parameter, bool & userCancelled, std::string associatedObject = "");
210 void RefreshLists();
211
212 std::string expression;
213
214 wxImageList * imageListObj;
215 wxImageList * imageListVal;
216
217 wxTreeItemId itemObj;
218 wxTreeItemId itemVal;
219
220 gd::Project & project;
221 gd::Layout & layout;
222
223 size_t lastErrorPos;
224
225 DECLARE_EVENT_TABLE()
226 };
227
235 class GD_CORE_API TreeItemExpressionInfoData : public wxTreeItemData
236 {
237 public:
238 TreeItemExpressionInfoData(const std::string & name_, const gd::ExpressionMetadata & info_) : name(name_), info(info_) { };
239 virtual ~TreeItemExpressionInfoData() {};
240
241 const std::string & GetName() const { return name; }
242 const gd::ExpressionMetadata & GetExpressionMetadata() const { return info; }
243
244 private:
245 std::string name;
246 gd::ExpressionMetadata info;
247 };
248 }
249 #endif
250 #endif