]> git.lyx.org Git - lyx.git/blobdiff - src/Trans.h
Account for old versions of Pygments
[lyx.git] / src / Trans.h
index ceb6536c0f260cdc21b031c040a97a1bab573956..4befc657402071db3f2755ba1f150efd5f0c835a 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 Matthias Ettrich
  * \author John Levon
  *
 #ifndef TRANS_H
 #define TRANS_H
 
-#include "lfuns.h"
-#include "support/docstring.h"
+#include "FuncCode.h"
 
-#include <boost/scoped_ptr.hpp>
+#include "support/docstring.h"
 
 #include <list>
 #include <map>
@@ -43,6 +42,8 @@ enum tex_accent {
        ///
        TEX_TILDE,
        ///
+       TEX_PERISPOMENI,
+       ///
        TEX_UNDERBAR,
        ///
        TEX_CEDILLA,
@@ -72,7 +73,7 @@ enum tex_accent {
 };
 
 
-struct tex_accent_struct {
+struct TeXAccent {
        ///
        tex_accent accent;
        /// UCS4 code point of this accent
@@ -80,15 +81,17 @@ struct tex_accent_struct {
        ///
        char const * name;
        ///
-       kb_action action;
+       FuncCode action;
 };
 
 ///
-extern tex_accent_struct get_accent(kb_action action);
+extern TeXAccent get_accent(FuncCode action);
 
 
 ///
 struct Keyexc {
+       ///
+       Keyexc() : c('\0'), combined(false), accent(TEX_NOACCENT) {}
        /// character to make exception
        char_type c;
        /// exception data
@@ -105,6 +108,8 @@ typedef std::list<Keyexc> KmodException;
 ///
 class KmodInfo {
 public:
+       ///
+       KmodInfo() : accent(TEX_NOACCENT) {}
        ///
        docstring data;
        ///
@@ -149,7 +154,7 @@ private:
        docstring const & match(char_type c);
        ///
        void insertException(KmodException & exclist, char_type c,
-                            docstring const & data, bool = false,
+                            docstring const & data, bool = false,
                             tex_accent = TEX_NOACCENT);
        ///
        void freeException(KmodException & exclist);
@@ -164,8 +169,7 @@ private:
 
 
 ///
-inline
-docstring const & Trans::match(char_type c)
+inline docstring const & Trans::match(char_type c)
 {
        std::map<char_type, docstring>::iterator it = keymap_.find(c);
        if (it != keymap_.end()) {
@@ -305,9 +309,9 @@ private:
        ///
        Trans * active_;
        ///
-       boost::scoped_ptr<Trans> t1_;
+       Trans t1_;
        ///
-       boost::scoped_ptr<Trans> t2_;
+       Trans t2_;
        ///
        static Trans default_;
        ///
@@ -316,8 +320,6 @@ public:
        ///
        TransManager();
        ///
-       ~TransManager();
-       ///
        int setPrimary(std::string const &);
        ///
        int setSecondary(std::string const &);