]> git.lyx.org Git - lyx.git/blobdiff - src/trans_mgr.h
Point fix, earlier forgotten
[lyx.git] / src / trans_mgr.h
index 842c07ae2eac898a20aa3554b7f0c20baf2dc65b..999ff3694a0cfcd9e7896843f43926e7478f737a 100644 (file)
@@ -1,10 +1,18 @@
 // -*- C++ -*-
-#ifndef Trans_Manager_h
-#define Trans_Manager_h
-
-#ifdef __GNUG__
-#pragma interface
-#endif
+/**
+ * \file trans_mgr.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Lars Gullik Bjønnes
+ * \author Matthias Ettrich
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#ifndef TRANS_MANAGER_H
+#define TRANS_MANAGER_H
 
 #include "tex-accent.h"
 #include "trans_decl.h"
 class LyXText;
 class Trans;
 
-/// Translation State
+/// Translation state
 class TransState {
 public:
        ///
        virtual ~TransState() {}
        ///
-       virtual string const normalkey(char, string const &) = 0;
+       virtual string const normalkey(char) = 0;
        ///
        virtual bool backspace() = 0;
        ///
@@ -44,7 +52,7 @@ protected:
        ///
        KmodInfo deadkey2_info_;
        ///
-       KmodException comb_info_;
+       Keyexc comb_info_;
        ///
        TransState * init_state_;
        ///
@@ -61,12 +69,12 @@ public:
 
 
 /// Init State
-class TransInitState :         virtual public TransFSMData, public TransState {
+class TransInitState :virtual public TransFSMData, public TransState {
 public:
        ///
        TransInitState();
        ///
-       virtual string const normalkey(char, string const &);
+       virtual string const normalkey(char);
        ///
        virtual bool backspace() { return true; }
        ///
@@ -80,7 +88,7 @@ public:
        ///
        TransDeadkeyState();
        ///
-       virtual string const normalkey(char, string const &);
+       virtual string const normalkey(char);
        ///
        virtual bool backspace() {
                currentState = init_state_;
@@ -97,14 +105,14 @@ public:
        ///
        TransCombinedState();
        ///
-       virtual string const normalkey(char, string const &);
+       virtual string const normalkey(char);
        ///
        virtual bool backspace() {
                // cancel the second deadkey
                deadkey2_ = 0;
                deadkey2_info_.accent = TEX_NOACCENT;
                currentState = deadkey_state_;
-               
+
                return false;
        }
        ///
@@ -166,23 +174,25 @@ public:
        ///
        void TranslateAndInsert(char, LyXText *);
        ///
-       inline string const deadkey(char, KmodInfo);
+       string const deadkey(char, KmodInfo);
        ///
-       inline string const normalkey(char, string const &);
+       string const normalkey(char);
        ///
        void deadkey(char, tex_accent, LyXText *);
 };
 
 
-string const TransManager::normalkey(char c, string const & t)
+inline
+string const TransManager::normalkey(char c)
 {
-       return trans_fsm_.currentState->normalkey(c, t);
+       return trans_fsm_.currentState->normalkey(c);
 }
 
 
+inline
 string const TransManager::deadkey(char c, KmodInfo t)
 {
        return trans_fsm_.currentState->deadkey(c, t);
 }
 
-#endif
+#endif // TRANS_MANAGER_H