]> git.lyx.org Git - features.git/blobdiff - src/Trans.h
* FORMAT
[features.git] / src / Trans.h
index a3eb93c2c1cfb4c135628f302cf42bb060816c13..c200bb9544b4c7714eaf7a04f3569ddbdbe75095 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
  *
@@ -14,7 +14,8 @@
 #ifndef TRANS_H
 #define TRANS_H
 
-#include "lfuns.h"
+#include "FuncCode.h"
+
 #include "support/docstring.h"
 
 #include <list>
@@ -41,6 +42,8 @@ enum tex_accent {
        ///
        TEX_TILDE,
        ///
+       TEX_PERISPOMENI,
+       ///
        TEX_UNDERBAR,
        ///
        TEX_CEDILLA,
@@ -70,7 +73,7 @@ enum tex_accent {
 };
 
 
-struct tex_accent_struct {
+struct TeXAccent {
        ///
        tex_accent accent;
        /// UCS4 code point of this accent
@@ -78,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
@@ -103,6 +108,8 @@ typedef std::list<Keyexc> KmodException;
 ///
 class KmodInfo {
 public:
+       ///
+       KmodInfo() : accent(TEX_NOACCENT) {}
        ///
        docstring data;
        ///
@@ -162,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()) {
@@ -232,11 +238,11 @@ public:
        ///
        TransInitState();
        ///
-       virtual docstring const normalkey(char_type);
+       docstring const normalkey(char_type) override;
        ///
-       virtual bool backspace() { return true; }
+       bool backspace() override { return true; }
        ///
-       virtual docstring const deadkey(char_type, KmodInfo);
+       docstring const deadkey(char_type, KmodInfo) override;
 };
 
 
@@ -246,14 +252,14 @@ public:
        ///
        TransDeadkeyState();
        ///
-       virtual docstring const normalkey(char_type);
+       docstring const normalkey(char_type) override;
        ///
-       virtual bool backspace() {
+       bool backspace() override {
                currentState = init_state_;
                return false;
        }
        ///
-       virtual docstring const deadkey(char_type, KmodInfo);
+       docstring const deadkey(char_type, KmodInfo) override;
 };
 
 
@@ -263,9 +269,9 @@ public:
        ///
        TransCombinedState();
        ///
-       virtual docstring const normalkey(char_type);
+       docstring const normalkey(char_type) override;
        ///
-       virtual bool backspace() {
+       bool backspace() override {
                // cancel the second deadkey
                deadkey2_ = 0;
                deadkey2_info_.accent = TEX_NOACCENT;
@@ -274,7 +280,7 @@ public:
                return false;
        }
        ///
-       virtual docstring const deadkey(char_type, KmodInfo);
+       docstring const deadkey(char_type, KmodInfo) override;
 };