]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/LyXKeySym.h
hopefully fix tex2lyx linking.
[lyx.git] / src / frontends / LyXKeySym.h
index 12373c156e26befb4d2c02f963ccaaf46eddddf1..4e1eb406d8e311884c46d66f2eec672e74c9e805 100644 (file)
 
 #include "key_state.h"
 
+#include <boost/shared_ptr.hpp>
+
+
+namespace lyx {
+
 /**
  * This is a base class for representing a keypress.
  * Each frontend has to implement this to provide
@@ -38,17 +43,16 @@ public:
        virtual bool isModifier() const = 0;
 
        /// Is this normal insertable text ? (last ditch attempt only)
-       virtual bool isText() const { return false; }
+       virtual bool isText() const = 0;
 
        /// What is the symbolic name of this key? F.ex. "Return" or "c"
        virtual std::string getSymbolName() const = 0;
 
        /**
-        * Return the value of the keysym into the local ISO encoding.
-        * This converts the LyXKeySym to a 8-bit encoded character.
-        * This relies on user to use the right encoding.
+        * Return the value of the keysym into the UCS-4 encoding.
+        * This converts the LyXKeySym to a 32-bit encoded character.
         */
-       virtual char getISOEncoded(std::string const & encoding) const = 0;
+       virtual size_t getUCSEncoded() const = 0;
 
        /**
         * Return a string describing the KeySym with modifier mod.
@@ -64,4 +68,9 @@ public:
  */
 bool operator==(LyXKeySym const & k1, LyXKeySym const & k2);
 
+typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr;
+
+
+} // namespace lyx
+
 #endif