MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / Event

Class Event

Project_Labirint_Game/sfml/include/SFML/Window/Event.hpp:44–236  ·  view source on GitHub ↗

/////////////////////////////////////////////////////// \brief Defines a system event and its parameters ///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

42///
43////////////////////////////////////////////////////////////
44class Event
45{
46public:
47
48 ////////////////////////////////////////////////////////////
49 /// \brief Size events parameters (Resized)
50 ///
51 ////////////////////////////////////////////////////////////
52 struct SizeEvent
53 {
54 unsigned int width; ///< New width, in pixels
55 unsigned int height; ///< New height, in pixels
56 };
57
58 ////////////////////////////////////////////////////////////
59 /// \brief Keyboard event parameters (KeyPressed, KeyReleased)
60 ///
61 ////////////////////////////////////////////////////////////
62 struct KeyEvent
63 {
64 Keyboard::Key code; ///< Code of the key that has been pressed
65 bool alt; ///< Is the Alt key pressed?
66 bool control; ///< Is the Control key pressed?
67 bool shift; ///< Is the Shift key pressed?
68 bool system; ///< Is the System key pressed?
69 };
70
71 ////////////////////////////////////////////////////////////
72 /// \brief Text event parameters (TextEntered)
73 ///
74 ////////////////////////////////////////////////////////////
75 struct TextEvent
76 {
77 Uint32 unicode; ///< UTF-32 Unicode value of the character
78 };
79
80 ////////////////////////////////////////////////////////////
81 /// \brief Mouse move event parameters (MouseMoved)
82 ///
83 ////////////////////////////////////////////////////////////
84 struct MouseMoveEvent
85 {
86 int x; ///< X position of the mouse pointer, relative to the left of the owner window
87 int y; ///< Y position of the mouse pointer, relative to the top of the owner window
88 };
89
90 ////////////////////////////////////////////////////////////
91 /// \brief Mouse buttons events parameters
92 /// (MouseButtonPressed, MouseButtonReleased)
93 ///
94 ////////////////////////////////////////////////////////////
95 struct MouseButtonEvent
96 {
97 Mouse::Button button; ///< Code of the button that has been pressed
98 int x; ///< X position of the mouse pointer, relative to the left of the owner window
99 int y; ///< Y position of the mouse pointer, relative to the top of the owner window
100 };
101

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected