]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/LyXKeySym.h
Rename .C => .cpp for files in src/frontends/controllers, step 1
[lyx.git] / src / frontends / LyXKeySym.h
index 4e1eb406d8e311884c46d66f2eec672e74c9e805..23ab01b2b227a0f79824968698e185061d1a18dd 100644 (file)
@@ -16,6 +16,8 @@
 
 #include "key_state.h"
 
+#include "support/docstring.h"
+
 #include <boost/shared_ptr.hpp>
 
 
@@ -33,6 +35,9 @@ public:
 
        virtual ~LyXKeySym() {}
 
+       ///
+       virtual bool operator==(LyXKeySym const& ks) const = 0;
+
        /// Initialize with the name of a key. F. ex. "space" or "a"
        virtual void init(std::string const & symbolname) = 0;
 
@@ -52,22 +57,16 @@ public:
         * Return the value of the keysym into the UCS-4 encoding.
         * This converts the LyXKeySym to a 32-bit encoded character.
         */
-       virtual size_t getUCSEncoded() const = 0;
+       virtual char_type getUCSEncoded() const = 0;
 
        /**
         * Return a string describing the KeySym with modifier mod.
-        * This should use the native UI format when applicable
+        * Use the native UI format when \c forgui is true.
         */
-       virtual std::string const print(key_modifier::state mod) const = 0;
+       virtual docstring const print(key_modifier::state mod, bool forgui) const = 0;
 };
 
 
-/**
- * We need to be able to equality compare these for the
- * sake of the keymap business.
- */
-bool operator==(LyXKeySym const & k1, LyXKeySym const & k2);
-
 typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr;