]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/key_state.h
Fix bug 1749. CAUTION: lyx2lyx not fully working yet (see FIXMEs).
[lyx.git] / src / frontends / key_state.h
index 0f9cd19e93a7aaa3dcef2198df510dd60dca6ab7..94736ecdc8d02909da73ee3fea1669469354f24e 100644 (file)
 #ifndef KEY_STATE_H
 #define KEY_STATE_H
 
+namespace lyx {
+
 /// modifier key states
 namespace key_modifier {
-       enum state {
-               none    = 0, //< no modifiers held
-               ctrl    = 1, //< control button held
-               alt     = 2, //< alt/meta key held
-               shift   = 4  //< shift key held
-       };
+
+enum state {
+       none  = 0, //< no modifiers held
+       ctrl  = 1, //< control button held
+       alt   = 2, //< alt/meta key held
+       shift = 4  //< shift key held
+};
 
 
 inline state operator|(state const & s1, state const & s2)
 {
-       int const i1(static_cast<int>(s1));
-       int const i2(static_cast<int>(s2));
+       int const i1 = static_cast<int>(s1);
+       int const i2 = static_cast<int>(s2);
        return static_cast<state>(i1 | i2);
 }
 
@@ -39,4 +42,7 @@ inline void operator|=(state & s1, state s2)
 
 } // namespace key_modifier
 
+
+} // namespace lyx
+
 #endif // KEY_STATE_H