]> git.lyx.org Git - lyx.git/blobdiff - src/trans_mgr.h
split LyXText::rowlist_ into individual Paragraph::rows_ chunks
[lyx.git] / src / trans_mgr.h
index 7b7e812c328baf60eabdbacafacd89ed0fcd40fb..f0126244ccee91df45d8feeb5654e0d49ab3db32 100644 (file)
@@ -1,10 +1,6 @@
 // -*- C++ -*-
-#ifndef Trans_Manager_h
-#define Trans_Manager_h
-
-#ifdef __GNUG__
-#pragma interface
-#endif
+#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() {}
-#if 0
-       ///
-       virtual string const normalkey(char, string const &) = 0;
-#else
        ///
        virtual string const normalkey(char) = 0;
-#endif
        ///
        virtual bool backspace() = 0;
        ///
@@ -48,13 +39,8 @@ protected:
        char deadkey2_;
        ///
        KmodInfo deadkey2_info_;
-#if 0
-       ///
-       KmodException comb_info_;
-#else
        ///
        Keyexc comb_info_;
-#endif
        ///
        TransState * init_state_;
        ///
@@ -71,17 +57,12 @@ public:
 
 
 /// Init State
-class TransInitState :         virtual public TransFSMData, public TransState {
+class TransInitState :virtual public TransFSMData, public TransState {
 public:
        ///
        TransInitState();
-#if 0
-       ///
-       virtual string const normalkey(char, string const &);
-#else
        ///
        virtual string const normalkey(char);
-#endif
        ///
        virtual bool backspace() { return true; }
        ///
@@ -94,13 +75,8 @@ class TransDeadkeyState : virtual public TransFSMData, public TransState {
 public:
        ///
        TransDeadkeyState();
-#if 0
-       ///
-       virtual string const normalkey(char, string const &);
-#else
        ///
        virtual string const normalkey(char);
-#endif
        ///
        virtual bool backspace() {
                currentState = init_state_;
@@ -116,20 +92,15 @@ class TransCombinedState : virtual public TransFSMData, public TransState {
 public:
        ///
        TransCombinedState();
-#if 0
-       ///
-       virtual string const normalkey(char, string const &);
-#else
        ///
        virtual string const normalkey(char);
-#endif
        ///
        virtual bool backspace() {
                // cancel the second deadkey
                deadkey2_ = 0;
                deadkey2_info_.accent = TEX_NOACCENT;
                currentState = deadkey_state_;
-               
+
                return false;
        }
        ///
@@ -192,31 +163,18 @@ public:
        void TranslateAndInsert(char, LyXText *);
        ///
        string const deadkey(char, KmodInfo);
-#if 0
-       ///
-       string const normalkey(char, string const &);
-#else
        ///
        string const normalkey(char);
-#endif
        ///
        void deadkey(char, tex_accent, LyXText *);
 };
 
 
-#if 0
-inline
-string const TransManager::normalkey(char c, string const & t)
-{
-       return trans_fsm_.currentState->normalkey(c, t);
-}
-#else
 inline
 string const TransManager::normalkey(char c)
 {
        return trans_fsm_.currentState->normalkey(c);
 }
-#endif
 
 
 inline
@@ -225,4 +183,4 @@ string const TransManager::deadkey(char c, KmodInfo t)
        return trans_fsm_.currentState->deadkey(c, t);
 }
 
-#endif
+#endif // TRANS_MANAGER_H