X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTrans.h;h=c200bb9544b4c7714eaf7a04f3569ddbdbe75095;hb=5366666c831b6ad726e848a60d738b57ec8b0501;hp=92cad9b0dcde38272effea467e4f1a80f4d4aafd;hpb=897436efbb9bd641b61467d185a2dfae9839e575;p=lyx.git diff --git a/src/Trans.h b/src/Trans.h index 92cad9b0dc..c200bb9544 100644 --- a/src/Trans.h +++ b/src/Trans.h @@ -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,10 +14,9 @@ #ifndef TRANS_H #define TRANS_H -#include "lfuns.h" -#include "support/docstring.h" +#include "FuncCode.h" -#include +#include "support/docstring.h" #include #include @@ -43,6 +42,8 @@ enum tex_accent { /// TEX_TILDE, /// + TEX_PERISPOMENI, + /// TEX_UNDERBAR, /// TEX_CEDILLA, @@ -72,7 +73,7 @@ enum tex_accent { }; -struct tex_accent_struct { +struct TeXAccent { /// tex_accent accent; /// UCS4 code point of this accent @@ -80,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 @@ -105,6 +108,8 @@ typedef std::list KmodException; /// class KmodInfo { public: + /// + KmodInfo() : accent(TEX_NOACCENT) {} /// docstring data; /// @@ -164,8 +169,7 @@ private: /// -inline -docstring const & Trans::match(char_type c) +inline docstring const & Trans::match(char_type c) { std::map::iterator it = keymap_.find(c); if (it != keymap_.end()) { @@ -234,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; }; @@ -248,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; }; @@ -265,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; @@ -276,7 +280,7 @@ public: return false; } /// - virtual docstring const deadkey(char_type, KmodInfo); + docstring const deadkey(char_type, KmodInfo) override; }; @@ -305,9 +309,9 @@ private: /// Trans * active_; /// - boost::scoped_ptr t1_; + Trans t1_; /// - boost::scoped_ptr t2_; + Trans t2_; /// static Trans default_; /// @@ -316,8 +320,6 @@ public: /// TransManager(); /// - ~TransManager(); - /// int setPrimary(std::string const &); /// int setSecondary(std::string const &);