]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/LyXKeySym.h
Extracted from r14281
[lyx.git] / src / frontends / LyXKeySym.h
index 4a42e2649cd56174783861756214da0f9d304d53..11b0677c8e52386f8fa9dc5f62ba3908720b99a3 100644 (file)
@@ -4,7 +4,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Asger and Juergen
+ * \author Asger and JΓΌrgen
  *
  * Full author contact details are available in file CREDITS.
  */
 #ifndef LYXKEYSYM_H
 #define LYXKEYSYM_H
 
-#include "support/std_string.h"
+#include <string>
+
+#include "key_state.h"
+
+#include <boost/shared_ptr.hpp>
 
 /**
  * This is a base class for representing a keypress.
@@ -27,7 +31,7 @@ public:
        virtual ~LyXKeySym() {}
 
        /// Initialize with the name of a key. F. ex. "space" or "a"
-       virtual void init(string const & symbolname) = 0;
+       virtual void init(std::string const & symbolname) = 0;
 
        /// Is this a valid key?
        virtual bool isOK() const = 0;
@@ -39,14 +43,20 @@ public:
        virtual bool isText() const { return false; }
 
        /// What is the symbolic name of this key? F.ex. "Return" or "c"
-       virtual string getSymbolName() const = 0;
+       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.
         */
-       virtual char getISOEncoded(string const & encoding) const = 0;
+       virtual char getISOEncoded(std::string const & encoding) const = 0;
+
+       /**
+        * Return a string describing the KeySym with modifier mod.
+        * This should use the native UI format when applicable
+        */
+       virtual std::string const print(key_modifier::state mod) const = 0;
 };
 
 
@@ -56,4 +66,6 @@ public:
  */
 bool operator==(LyXKeySym const & k1, LyXKeySym const & k2);
 
+typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr;
+
 #endif