LGI  1.0
Lliurex Graphic Interface
 All Classes Namespaces Files Functions Variables Macros
events.hpp
Go to the documentation of this file.
1 #ifndef _LGI_EVENTS_
2 #define _LGI_EVENTS_
3 
4 #include "message.hpp"
5 
6 #include <string>
7 
9 #define LGI_EVENT_NONE 0x00
10 #define LGI_EVENT_KEY_DOWN 0x01
11 #define LGI_EVENT_KEY_UP 0x02
12 #define LGI_EVENT_KEY_PRESS 0x03
13 #define LGI_EVENT_CHARACTER 0x04
14 #define LGI_EVENT_MOUSE_DOWN 0x05
15 #define LGI_EVENT_MOUSE_UP 0x06
16 #define LGI_EVENT_MOUSE_MOVE 0x07
17 #define LGI_EVENT_MOUSE_ENTER 0x08
18 #define LGI_EVENT_MOUSE_EXIT 0x09
19 #define LGI_EVENT_MOUSE_CLICK 0x0A
20 #define LGI_EVENT_MOUSE_DOUBLE_CLICK 0x0B
21 #define LGI_EVENT_DRAG 0x0C
22 #define LGI_EVENT_DROP 0x0D
23 #define LGI_EVENT_GOT_FOCUS 0x0E
24 #define LGI_EVENT_LOST_FOCUS 0x0F
25 
26 #define LGI_EVENT_EXPOSE 0xA0
27 #define LGI_EVENT_RESIZE 0xA1
28 #define LGI_EVENT_DESTROY 0xAF
29 
30 #define LGI_EVENT_MESSAGE 0xB0
31 
32 #define LGI_EVENT_LAYER_ADD 0xC0
33 #define LGI_EVENT_LAYER_REMOVE 0xC1
34 #define LGI_EVENT_LAYER_SHOW 0xC3
35 #define LGI_EVENT_LAYER_HIDE 0xC4
36 
37 #define LGI_EVENT_DND_ENTER 0xD0
38 #define LGI_EVENT_DND_LEAVE 0xD1
39 #define LGI_EVENT_DND_DROP 0xD2
40 #define LGI_EVENT_DND_MOVE 0xD3
41 
42 
43 namespace net
44 {
45  namespace lliurex
46  {
47  namespace lgi
48  {
49 
50 
51  class BaseEvent
52  {
53  public:
54  int type;
55 
56  virtual ~BaseEvent(){};
57  };
58 
62  class ExposeEvent: public BaseEvent
63  {
64  public:
65  ExposeEvent();
66 
67  };
68 
72  class ResizeEvent: public BaseEvent
73  {
74  public:
75  ResizeEvent();
76  int width;
77  int height;
78  };
79 
83  class DestroyEvent : public BaseEvent
84  {
85  public:
86  DestroyEvent();
87 
88  };
89 
93  class KeyPressEvent: public BaseEvent
94  {
95  public:
96  KeyPressEvent();
97  int key;
98 
99  };
100 
104  class KeyUpEvent: public BaseEvent
105  {
106  public:
107  KeyUpEvent();
108  int key;
109  };
110 
114  class KeyDownEvent: public BaseEvent
115  {
116  public:
117  KeyDownEvent();
118  int key;
119  };
120 
124  class CharacterEvent: public BaseEvent
125  {
126  public:
127  CharacterEvent();
128  unsigned char str[4];
129  };
130 
134  class MouseDownEvent: public BaseEvent
135  {
136  public:
137  MouseDownEvent();
138  int button;
139  int x;
140  int y;
141  };
142 
146  class MouseUpEvent: public BaseEvent
147  {
148  public:
149  MouseUpEvent();
150  int button;
151  int x;
152  int y;
153  };
154 
158  class MouseMoveEvent: public BaseEvent
159  {
160  public:
161  MouseMoveEvent();
162  int x;
163  int y;
164  };
165 
170  {
171  public:
172  MouseClickEvent();
173  int button;
174  int x;
175  int y;
176  };
177 
182  {
183  public:
185  int button;
186  int x;
187  int y;
188  };
189 
194  {
195  public:
196  MouseEnterEvent();
197  int x;
198  int y;
199  };
200 
204  class MouseExitEvent: public BaseEvent
205  {
206  public:
207  MouseExitEvent();
208  int x;
209  int y;
210  };
211 
215  class DragEvent: public BaseEvent
216  {
217  public:
218  DragEvent();
219  void * data;
220  };
221 
225  class DropEvent: public BaseEvent
226  {
227  public:
228  DropEvent();
229  void * data;
230  int x;
231  int y;
232 
233  };
234 
238  class MessageEvent: public BaseEvent
239  {
240  public:
241  MessageEvent();
243  ~MessageEvent();
244  };
245 
249  class LayerAddEvent: public BaseEvent
250  {
251  public:
252  LayerAddEvent();
253 
254  };
255 
260  {
261  public:
263 
264  };
265 
269  class LayerShowEvent: public BaseEvent
270  {
271  public:
272  LayerShowEvent();
273 
274  };
275 
279  class LayerHideEvent: public BaseEvent
280  {
281  public:
282  LayerHideEvent();
283 
284  };
285 
289  class DndEnterEvent: public BaseEvent
290  {
291  public:
292  std::string target;
293 
294  DndEnterEvent();
295 
296  };
297 
301  class DndLeaveEvent: public BaseEvent
302  {
303  public:
304  DndLeaveEvent();
305 
306  };
307 
311  class DndDropEvent: public BaseEvent
312  {
313  public:
314  std::string target;
315  int size;
316  unsigned char * data;
317 
318  DndDropEvent();
319  ~DndDropEvent();
320 
321  };
322 
326  class DndMoveEvent: public BaseEvent
327  {
328  public:
329  int x;
330  int y;
331 
332  DndMoveEvent();
333  };
334 
335 
339  class GotFocusEvent: public BaseEvent
340  {
341  public:
342  GotFocusEvent();
343 
344  };
345 
349  class LostFocusEvent: public BaseEvent
350  {
351  public:
352  LostFocusEvent();
353  };
354  }
355  }
356 }
357 
358 #endif
Definition: events.hpp:146
int x
Definition: events.hpp:151
Definition: events.hpp:104
int y
Definition: events.hpp:163
int x
Definition: events.hpp:197
Definition: events.hpp:169
int x
Definition: events.hpp:174
int y
Definition: events.hpp:140
Definition: events.hpp:289
Definition: events.hpp:83
Definition: events.hpp:326
Definition: events.hpp:279
Definition: events.hpp:62
void * data
Definition: events.hpp:219
Definition: events.hpp:349
int height
Definition: events.hpp:77
Definition: events.hpp:134
Definition: events.hpp:215
Definition: events.hpp:259
int button
Definition: events.hpp:150
int y
Definition: events.hpp:209
unsigned char str[4]
Definition: events.hpp:128
Definition: events.hpp:225
int size
Definition: events.hpp:315
int y
Definition: events.hpp:187
Definition: events.hpp:93
int button
Definition: events.hpp:173
int x
Definition: events.hpp:186
std::string target
Definition: events.hpp:292
int x
Definition: events.hpp:230
int x
Definition: events.hpp:329
Definition: events.hpp:124
virtual ~BaseEvent()
Definition: events.hpp:56
int key
Definition: events.hpp:97
int type
Definition: events.hpp:54
void * data
Definition: events.hpp:229
Definition: events.hpp:301
Definition: events.hpp:114
int key
Definition: events.hpp:118
int button
Definition: events.hpp:185
std::string target
Definition: events.hpp:314
Definition: events.hpp:204
int y
Definition: events.hpp:175
Definition: events.hpp:339
int y
Definition: events.hpp:231
Message * msg
Definition: events.hpp:242
Definition: events.hpp:311
Definition: events.hpp:238
int y
Definition: events.hpp:198
int x
Definition: events.hpp:208
unsigned char * data
Definition: events.hpp:316
int button
Definition: events.hpp:138
Definition: events.hpp:158
int width
Definition: events.hpp:76
int x
Definition: events.hpp:162
Definition: events.hpp:249
Definition: events.hpp:51
Definition: events.hpp:269
int key
Definition: events.hpp:108
Definition: events.hpp:72
int x
Definition: events.hpp:139
Definition: events.hpp:193
int y
Definition: events.hpp:330
int y
Definition: events.hpp:152
Definition: message.hpp:83