TDME2  1.9.200
GUIMouseEvent.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <tdme/tdme.h>
6 
7 /**
8  * GUI mouse event
9  * @author Andreas Drewke
10  */
12 {
13 public:
21  };
22 
28  };
29 
30 private:
31  int64_t time { -1LL };
33  int xUnscaled { -1 };
34  int yUnscaled { -1 };
35  int x { -1 };
36  int y { -1 };
37  int button { -1 };
38  float wheelX { 0.0f };
39  float wheelY { 0.0f };
40  float wheelZ { 0.0f };
41  bool metaDown { false };
42  bool controlDown { false };
43  bool altDown { false };
44  bool shiftDown { false };
45  bool processed { false };
46 
47 public:
48  /**
49  * Constructor
50  */
51  inline GUIMouseEvent() {
52  }
53 
54  /**
55  * Destructor
56  */
57  inline ~GUIMouseEvent() {
58  }
59 
60  /**
61  * @return time in milliseconds
62  */
63  inline int64_t getTime() const {
64  return time;
65  }
66 
67  /**
68  * Set time
69  * @param time time
70  */
71  inline void setTime(int64_t time) {
72  this->time = time;
73  }
74 
75  /**
76  * @return type
77  */
78  inline GUIMouseEventType getType() const {
79  return type;
80  }
81 
82  /**
83  * Set type
84  * @param type type
85  */
87  this->type = type;
88  }
89 
90  /**
91  * @return x unscaled
92  */
93  inline int getXUnscaled() const {
94  return xUnscaled;
95  }
96 
97  /**
98  * Set x unscaled
99  * @param x x unscaled
100  */
101  inline void setXUnscaled(int xUnscaled) {
102  this->xUnscaled = xUnscaled;
103  }
104 
105  /**
106  * @return y unscaled
107  */
108  inline int getYUnscaled() const {
109  return yUnscaled;
110  }
111 
112  /**
113  * Set y unscaled
114  * @param y y unscaled
115  */
116  inline void setYUnscaled(int yUnscaled) {
117  this->yUnscaled = yUnscaled;
118  }
119 
120  /**
121  * @return x
122  */
123  inline int getX() const {
124  return x;
125  }
126 
127  /**
128  * Set x
129  * @param x x
130  */
131  inline void setX(int x) {
132  this->x = x;
133  }
134 
135  /**
136  * @return y
137  */
138  inline int getY() const {
139  return y;
140  }
141 
142  /**
143  * Set y
144  * @param y y
145  */
146  inline void setY(int y) {
147  this->y = y;
148  }
149 
150  /**
151  * @return button
152  */
153  inline int getButton() const {
154  return button;
155  }
156 
157  /**
158  * Set button
159  * @param button button
160  */
161  inline void setButton(int button) {
162  this->button = button;
163  }
164 
165  /**
166  * @return wheel x
167  */
168  inline float getWheelX() const {
169  return wheelX;
170  }
171 
172  /**
173  * Set up wheel x
174  * @param wheelX wheel x
175  */
176  inline void setWheelX(float wheelX) {
177  this->wheelX = wheelX;
178  }
179 
180  /**
181  * @return wheel y
182  */
183  inline float getWheelY() const {
184  return wheelY;
185  }
186 
187  /**
188  * Set up wheel y
189  * @param wheelY wheel y
190  */
191  inline void setWheelY(float wheelY) {
192  this->wheelY = wheelY;
193  }
194 
195  /**
196  * @return wheel z
197  */
198  inline float getWheelZ() const {
199  return wheelZ;
200  }
201 
202  /**
203  * Set up wheel z
204  * @param wheelZ wheel z
205  */
206  inline void setWheelZ(float wheelZ) {
207  this->wheelZ = wheelZ;
208  }
209 
210  /**
211  * @return is meta down
212  */
213  inline bool isMetaDown() const {
214  return metaDown;
215  }
216 
217  /**
218  * Set meta down
219  * @param metaDown meta down
220  */
221  inline void setMetaDown(bool metaDown) {
222  this->metaDown = metaDown;
223  }
224 
225  /**
226  * @return control down
227  */
228  inline bool isControlDown() const {
229  return controlDown;
230  }
231 
232  /**
233  * Set control down
234  * @param controlDown control down
235  */
236  inline void setControlDown(bool controlDown) {
237  this->controlDown = controlDown;
238  }
239 
240  /**
241  * @return is alt down
242  */
243  inline bool isAltDown() const {
244  return altDown;
245  }
246 
247  /**
248  * Set alt down
249  * @param altDown alt down
250  */
251  inline void setAltDown(bool altDown) {
252  this->altDown = altDown;
253  }
254 
255  /**
256  * @return is shift down
257  */
258  inline bool isShiftDown() const {
259  return shiftDown;
260  }
261 
262  /**
263  * Set shift down
264  * @param shiftDown shiftDown
265  */
266  inline void setShiftDown(bool shiftDown) {
267  this->shiftDown = shiftDown;
268  }
269 
270  /**
271  * @return processed
272  */
273  inline bool isProcessed() const {
274  return processed;
275  }
276 
277  /**
278  * Set processed
279  * @param processed processed
280  */
281  inline void setProcessed(bool processed) {
282  this->processed = processed;
283  }
284 
285 };
#define MOUSE_BUTTON_LEFT
#define MOUSE_BUTTON_NONE
#define MOUSE_BUTTON_MIDDLE
#define MOUSE_BUTTON_RIGHT
GUIMouseEventType getType() const
Definition: GUIMouseEvent.h:78
void setYUnscaled(int yUnscaled)
Set y unscaled.
void setAltDown(bool altDown)
Set alt down.
void setWheelX(float wheelX)
Set up wheel x.
void setProcessed(bool processed)
Set processed.
void setControlDown(bool controlDown)
Set control down.
void setWheelZ(float wheelZ)
Set up wheel z.
void setXUnscaled(int xUnscaled)
Set x unscaled.
void setTime(int64_t time)
Set time.
Definition: GUIMouseEvent.h:71
void setMetaDown(bool metaDown)
Set meta down.
void setButton(int button)
Set button.
void setShiftDown(bool shiftDown)
Set shift down.
void setType(GUIMouseEventType type)
Set type.
Definition: GUIMouseEvent.h:86
void setWheelY(float wheelY)
Set up wheel y.