TDME2 1.9.121
InputEventHandler.h
Go to the documentation of this file.
1#pragma once
2
3#include <tdme/tdme.h>
6
7/**
8 * Application input event handler interface
9 * @author Andreas Drewke
10 * @version $Id$
11 */
13{
14public:
15 /**
16 * Destructor
17 */
18 virtual ~InputEventHandler();
19
20 /**
21 * On char
22 * @param key key
23 * @param x x
24 * @param y y
25 */
26 virtual void onChar(unsigned int key, int x, int y) = 0;
27
28 /**
29 * On key down
30 * @param key key
31 * @param keyCode key code
32 * @param x x
33 * @param y y
34 */
35 virtual void onKeyDown (unsigned char key, int keyCode, int x, int y) = 0;
36
37 /**
38 * On key up
39 * @param key key
40 * @param keyCode key code
41 * @param x x
42 * @param y y
43 */
44 virtual void onKeyUp(unsigned char key, int keyCode, int x, int y) = 0;
45
46 /**
47 * On mouse dragged
48 * @param x x
49 * @param y y
50 */
51 virtual void onMouseDragged(int x, int y) = 0;
52
53 /**
54 * On mouse moved
55 * @param x x
56 * @param y y
57 */
58 virtual void onMouseMoved(int x, int y) = 0;
59
60 /**
61 * On mouse moved
62 * @param button button
63 * @param state state
64 * @param x x
65 * @param y y
66 */
67 virtual void onMouseButton(int button, int state, int x, int y) = 0;
68
69 /**
70 * On mouse wheen
71 * @param button button
72 * @param direction direction
73 * @param x x
74 * @param y y
75 */
76 virtual void onMouseWheel(int button, int direction, int x, int y) = 0;
77
78};
Application input event handler interface.
virtual void onMouseWheel(int button, int direction, int x, int y)=0
On mouse wheen.
virtual void onKeyUp(unsigned char key, int keyCode, int x, int y)=0
On key up.
virtual void onMouseButton(int button, int state, int x, int y)=0
On mouse moved.
virtual void onMouseMoved(int x, int y)=0
On mouse moved.
virtual void onKeyDown(unsigned char key, int keyCode, int x, int y)=0
On key down.
virtual void onChar(unsigned int key, int x, int y)=0
On char.
virtual void onMouseDragged(int x, int y)=0
On mouse dragged.