X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftrans_mgr.h;h=f0126244ccee91df45d8feeb5654e0d49ab3db32;hb=09e01879979643949f1f2c7216023f1f35d5ada2;hp=842c07ae2eac898a20aa3554b7f0c20baf2dc65b;hpb=3eea90dbbc24f9dafc6c0a42d5b14fe213dbcd6a;p=lyx.git diff --git a/src/trans_mgr.h b/src/trans_mgr.h index 842c07ae2e..f0126244cc 100644 --- a/src/trans_mgr.h +++ b/src/trans_mgr.h @@ -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" @@ -14,13 +10,13 @@ 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 +40,7 @@ protected: /// KmodInfo deadkey2_info_; /// - KmodException comb_info_; + Keyexc comb_info_; /// TransState * init_state_; /// @@ -61,12 +57,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 +76,7 @@ public: /// TransDeadkeyState(); /// - virtual string const normalkey(char, string const &); + virtual string const normalkey(char); /// virtual bool backspace() { currentState = init_state_; @@ -97,14 +93,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 +162,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