// -*- C++ -*-
-#ifndef Trans_Manager_h
-#define Trans_Manager_h
+#ifndef TRANS_MANAGER_H
+#define TRANS_MANAGER_H
#ifdef __GNUG__
#pragma interface
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;
///
///
KmodInfo deadkey2_info_;
///
- KmodException comb_info_;
+ Keyexc comb_info_;
///
TransState * init_state_;
///
/// 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; }
///
///
TransDeadkeyState();
///
- virtual string const normalkey(char, string const &);
+ virtual string const normalkey(char);
///
virtual bool backspace() {
currentState = init_state_;
///
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;
}
///
///
Trans * t2_;
///
- static Trans * default_;
+ static Trans default_;
///
CharacterSet chset_;
///
///
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