Phoxonics  1.0
Object Oriented FDTD Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Event.hpp
Go to the documentation of this file.
1 /*
2  * Event.h
3  *
4  * Created on: Feb 18, 2013
5  * Author: nano
6  */
7 
8 #ifndef EVENT_HPP_
9 #define EVENT_HPP_
10 
11 #include <SDL2/SDL.h>
12 #include <cmath>
13 #include <math.h>
14 #include <vector>
15 
16 using namespace std;
17 
18 class Event {
19 private:
20  long count_;
21 
22 public:
23  Event();
24  virtual ~Event();
25 
26  virtual void on_event(SDL_Event* event);
27  virtual void on_input_focus();
28  virtual void on_input_blur();
29  virtual void on_key_down(SDL_Scancode key);
30  virtual void on_key_up(SDL_Scancode key);
31  virtual void on_mouse_focus();
32  virtual void on_mouse_blur();
33  virtual void on_mouse_move(int m_x, int m_y, int rel_x, int rel_y, bool left, bool right,
34  bool middle);
35  virtual void on_mouse_wheel(bool up, bool down); //Not implemented
36  virtual void on_lbutton_down(int m_x, int m_y);
37  virtual void on_lbutton_up(int m_x, int m_y);
38  virtual void on_rbutton_down(int m_x, int m_y);
39  virtual void on_rbutton_up(int m_x, int m_y);
40  virtual void on_mbutton_down(int m_x, int m_y);
41  virtual void on_mbutton_up(int m_x, int m_y);
42  virtual void on_joy_axis(Uint8 which, Uint8 axis, Sint16 value);
43  virtual void on_joy_button_down(Uint8 which, Uint8 button);
44  virtual void on_joy_button_up(Uint8 which, Uint8 button);
45  virtual void on_joy_hat(Uint8 which, Uint8 hat, Uint8 value);
46  virtual void on_joy_ball(Uint8 which, Uint8 ball, Sint16 xrel, Sint16 yrel);
47  virtual void on_minimize();
48  virtual void on_restore();
49  virtual void on_resize(int w, int h);
50  virtual void on_expose();
51  virtual void on_exit();
52  virtual void on_user(Uint8 type, int code, void* data1, void* data2);
53 
54  double mouse_x;
55  double mouse_y;
56 };
57 
58 //==============================================================================
59 
60 #endif /* EVENT_HPP_ */
double mouse_y
Definition: Event.hpp:55
STL namespace.
Definition: Event.hpp:18
double mouse_x
Definition: Event.hpp:54