All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MouseInputEvent.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include <vector>
6 
7 namespace Eegeo
8 {
9  namespace Windows
10  {
11  namespace Input
12  {
13  enum MouseInputAction
14  {
15  MousePrimaryDown,
16  MousePrimaryUp,
17  MouseSecondaryDown,
18  MouseSecondaryUp,
19  MouseMiddleDown,
20  MouseMiddleUp,
21  MouseMove,
22  MouseWheel
23  };
24 
25  enum KeyboardModifiers
26  {
27  KeyboardModifierNone = 0,
28  KeyboardModifierAlt = 1,
29  KeyboardModifierControl = 2,
30  KeyboardModifierShift = 4
31  };
32 
34  {
35  MouseInputAction action;
36  u32 keyboardModifiers;
37  float x;
38  float y;
39  float z;
40 
42  MouseInputAction mouseInputAction,
43  u32 keyboardModifiers,
44  float x,
45  float y,
46  float z)
47  : action(mouseInputAction)
48  , keyboardModifiers(keyboardModifiers)
49  , x(x)
50  , y(y)
51  , z(z)
52  {
53 
54  }
55 
56  bool IsAltDown() const { return (keyboardModifiers & KeyboardModifierAlt) != 0; }
57  bool IsShiftDown() const { return (keyboardModifiers & KeyboardModifierShift) != 0; }
58  bool IsControlDown() const { return (keyboardModifiers & KeyboardModifierControl) != 0; }
59  };
60 
62  {
63  char keyCode;
64  bool keyDownEvent;
65  };
66  }
67  }
68 }