X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fintl.h;h=e83ad9d7a5130668d6692f40ea538f6fad6428dd;hb=98c966c64594611e469313314abd1e59524adb4a;hp=97605c11e85c839afa0d79a17efff903865c42f6;hpb=a8a90bf854958562ddf588e3eddbc2b7cfa7f976;p=lyx.git diff --git a/src/intl.h b/src/intl.h index 97605c11e8..e83ad9d7a5 100644 --- a/src/intl.h +++ b/src/intl.h @@ -1,8 +1,5 @@ // -*- C++ -*- -/* International support for LyX - - - */ +/* International support for LyX */ #ifndef INTL_H #define INTL_H @@ -11,97 +8,56 @@ #endif #include "LString.h" -#include "form1.h" - -class LyXText; -class Combox; -class TransManager; - - -/// default character set -#define DEFCHSET "iso8859-1" +#include "trans_mgr.h" -/** The gui part and the non gui part should be split into two different - classes. Probably should the gui class just have a pointer to the non - gui class. - */ -class Intl -{ +class Intl { public: - /// + /// which keymap is currently used ? + enum Keymap { + PRIMARY, + SECONDARY + }; + Intl(); - /// - ~Intl(); - - /// show key mapping dialog - void MenuKeymap(); - /// + + /// {en/dis}able the keymap void KeyMapOn(bool on); - /// + + /// set the primary language keymap void KeyMapPrim(); - /// + + /// set the secondary language keymap void KeyMapSec(); /// turn on/off key mappings, status in keymapon void ToggleKeyMap(); - /// - int SetPrimary(string const &); - - /// - int SetSecondary(string const &); - - // insert correct stuff into paragraph - //void TranslateAndInsert(char c, LyXText *text); - /// initialize key mapper void InitKeyMapper(bool on); - /// Get the Translation Manager - inline TransManager *getTrans(); - /// - bool keymapon; - /// - char *chsetcode; - /// - static void DispatchCallback(FL_OBJECT*,long); + // Get the Translation Manager + TransManager & getTrans(); + + /// using primary or secondary keymap ? + Keymap keymap; + private: - /// - //int SelectCharset(char const *code); - /// - void update(); - /// - static void LCombo(int i, void *); // callback - /// - static void LCombo2(int i, void *); // callback - /// - void Keymap(long code); - /// - bool primarykeymap; - /// - int curkeymap; - /// - int otherkeymap; - - /// - FD_KeyMap *fd_form_keymap; - /// - Combox *Language; - /// - Combox *Language2; - /// + /// is key mapping enabled ? + bool keymapon; + /// the primary language keymap string & prim_lang; - /// + /// the secondary language keymap string & sec_lang; - /// - TransManager *trans; + /// the translation manager + TransManager trans; }; -TransManager* Intl::getTrans() +inline +TransManager & Intl::getTrans() { return trans; } -#endif +#endif /* INTL_H */