ShishGL  1.0
A simple modular cross-platform graphics library
KeyboardEvent.hpp
Go to the documentation of this file.
1 /*============================================================================*/
2 #ifndef SHISHGL_KEYBOARD_EVENT_HPP
3 #define SHISHGL_KEYBOARD_EVENT_HPP
4 /*============================================================================*/
5 #include "Event.hpp"
6 #include "Keyboard.hpp"
7 #include "PlatformListener.hpp"
8 /*============================================================================*/
9 namespace Sh {
10 
11  class KeyboardEvent : public Event {
12  public:
13 
17 
18  ~KeyboardEvent() override = default;
19 
20  EventMask mask() override {
21  return KEYBOARD;
22  }
23 
24  [[nodiscard]]
25  Keyboard::Key key() const;
26 
27  [[nodiscard]]
28  Keyboard::KeyState state() const;
29 
30  [[nodiscard]]
32 
33  bool happen(Listener* listener) override;
34 
35  protected:
36 
40 
41  };
42 
43 }
44 /*============================================================================*/
45 #endif //SHISHGL_KEYBOARD_EVENT_HPP
46 /*============================================================================*/
Sh::KeyboardEvent::modifiers
Keyboard::ModifierMask modifiers() const
Definition: KeyboardEvent.cpp:36
Sh::KeyboardEvent::k_key
Keyboard::Key k_key
Definition: KeyboardEvent.hpp:37
Sh::KeyboardEvent::state
Keyboard::KeyState state() const
Definition: KeyboardEvent.cpp:30
Sh::Keyboard::Key
Key
Definition: Keyboard.hpp:28
Sh::KeyboardEvent::mask
EventMask mask() override
Definition: KeyboardEvent.hpp:20
Sh::KeyboardEvent::KeyboardEvent
KeyboardEvent(Keyboard::Key key, Keyboard::KeyState state, Keyboard::ModifierMask modifiers)
Definition: KeyboardEvent.cpp:8
Sh::Keyboard::ModifierMask
uint8_t ModifierMask
Definition: Keyboard.hpp:17
Event.hpp
Sh::Event
Definition: Event.hpp:26
Sh::KeyboardEvent::k_state
Keyboard::KeyState k_state
Definition: KeyboardEvent.hpp:38
PlatformListener.hpp
Sh::KeyboardEvent::k_modifiers
Keyboard::ModifierMask k_modifiers
Definition: KeyboardEvent.hpp:39
Sh::KeyboardEvent
Definition: KeyboardEvent.hpp:11
Sh
Definition: CoreApplication.hpp:10
Sh::KeyboardEvent::~KeyboardEvent
~KeyboardEvent() override=default
Sh::Listener
Definition: Listener.hpp:7
Sh::Keyboard::KeyState
KeyState
Definition: Keyboard.hpp:12
Sh::EventMask
uint64_t EventMask
Definition: Event.hpp:11
Sh::KeyboardEvent::happen
bool happen(Listener *listener) override
Definition: KeyboardEvent.cpp:18
Sh::KeyboardEvent::key
Keyboard::Key key() const
Definition: KeyboardEvent.cpp:24
Keyboard.hpp