Photon Editor Library
2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
KeyEvent.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
EditorCore/Event/Event.h
"
4
#include "
EditorCore/EKeyCode.h
"
5
6
#include <Utility/TBitFlags.h>
7
#include <Utility/utility.h>
8
9
namespace
ph::editor
10
{
11
12
class
KeyEvent
:
public
Event
13
{
14
// Hide special members as this class is not intended to be used polymorphically.
15
// It is derived class's choice to expose them (by defining them in public) or not.
16
protected
:
17
PH_DEFINE_INLINE_RULE_OF_5_MEMBERS
(
KeyEvent
);
18
19
public
:
20
explicit
KeyEvent
(
EKeyCode
key);
21
22
/*EEventType getDynamicType() const override = 0;
23
std::string toString() const override = 0;*/
24
25
//EEventSource getSourceType() const override;
26
27
EKeyCode
getKey
()
const
;
28
29
private
:
30
EKeyCode
m_key;
31
};
32
33
inline
KeyEvent::KeyEvent
(
const
EKeyCode
key)
34
:
Event
()
35
, m_key(key)
36
{}
37
38
//inline EEventSource KeyEvent::getSourceType() const
39
//{
40
// return TEnumFlags<EEventSource>(
41
// {EEventSource::App, EEventSource::Input, EEventSource::Keyboard}).getEnum();
42
//}
43
44
inline
EKeyCode
KeyEvent::getKey
()
const
45
{
46
return
m_key;
47
}
48
49
}
// end namespace ph::editor
EKeyCode.h
Event.h
ph::editor::Event
Base of all event types. Derived classes should strive to keep the size of the object small,...
Definition
Event.h:59
ph::editor::KeyEvent
Definition
KeyEvent.h:13
ph::editor::KeyEvent::KeyEvent
KeyEvent(EKeyCode key)
Definition
KeyEvent.h:33
ph::editor::KeyEvent::getKey
EKeyCode getKey() const
Definition
KeyEvent.h:44
ph::editor::KeyEvent::PH_DEFINE_INLINE_RULE_OF_5_MEMBERS
PH_DEFINE_INLINE_RULE_OF_5_MEMBERS(KeyEvent)
ph::editor
Definition
ph_editor.h:10
ph::editor::EKeyCode
EKeyCode
Definition
EKeyCode.h:9
Source
EditorCore
Event
KeyEvent.h
Generated by
1.11.0