1 // SHE library
2 // Copyright (C) 2017  David Capello
3 //
4 // This file is released under the terms of the MIT license.
5 // Read LICENSE.txt for more information.
6 
7 #ifndef SHE_SHORTCUT_H_INCLUDED
8 #define SHE_SHORTCUT_H_INCLUDED
9 #pragma once
10 
11 #include "she/keys.h"
12 
13 namespace she {
14 
15   class Shortcut {
16   public:
17     Shortcut(int unicode = 0,
18              KeyModifiers modifiers = kKeyNoneModifier)
m_unicode(unicode)19       : m_unicode(unicode)
20       , m_modifiers(modifiers) {
21     }
22 
unicode()23     int unicode() const { return m_unicode; }
modifiers()24     KeyModifiers modifiers() const { return m_modifiers; }
25 
isEmpty()26     bool isEmpty() const { return m_unicode == 0; }
27 
28   private:
29     int m_unicode;
30     KeyModifiers m_modifiers;
31   };
32 
33 } // namespace she
34 
35 #endif
36