]> git.lyx.org Git - lyx.git/blobdiff - src/KeySequence.h
prepare Qt 5.6 builds
[lyx.git] / src / KeySequence.h
index b59e86d2df131864bebb49d90cd58ada8ce8b931..a0eb74eb03b2c80e657c2588a622621b23c54093 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 Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
  * \author Jean-Marc Lasgouttes
  *
  * Full author contact details are available in file CREDITS.
@@ -61,13 +61,18 @@ public:
         */
        size_t parse(std::string const & s);
 
+       enum outputFormat {
+               Portable,       //< use a more portable format
+               ForGui,         //< use platform specific translations and special characters
+               BindFile        //< the format used in lyx bind files
+       };
+       
        /**
         * Return the current sequence as a string.
-        * @param forgui true if the string should use translations and
-        *   special characters.
+        * @param format output format
         * @see parse()
         */
-       docstring const print(bool forgui) const;
+       docstring const print(outputFormat format) const;
 
        /**
         * Return the current sequence and available options as
@@ -77,27 +82,27 @@ public:
         */
        docstring const printOptions(bool forgui) const;
 
-       /// Mark the sequence as deleted.
-       void mark_deleted();
-
        /// Reset sequence to become "deleted"
        void reset();
 
        /// clear in full
        void clear();
 
+       /// remove last key in sequence
+       void removeKey();
+
        bool deleted() const { return deleted_; }
 
        /// length of sequence
        size_t length() const { return sequence.size(); }
 
+private:
        /// Keymap to use if a new sequence is starting
        KeyMap * stdmap;
 
        /// Keymap to use for the next key
        KeyMap * curmap;
 
-private:
        /**
         * Array holding the current key sequence as KeySyms.
         * If sequence[length - 1] < 0xff it can be used as ISO8859 char