X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fintl.h;h=fe7ae6a89dd1ec13a02f7f027783861bfa80dc68;hb=24bd12178de86d3265d9f82efca58e498e77bda2;hp=919966dcad652d5dead65814c84de6ba4050f29b;hpb=c779cef938fc3720f4a912ba7356f9ffd9ff3233;p=lyx.git diff --git a/src/intl.h b/src/intl.h index 919966dcad..fe7ae6a89d 100644 --- a/src/intl.h +++ b/src/intl.h @@ -1,100 +1,74 @@ // -*- C++ -*- -/* International support for LyX - - +/** + * \file intl.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author unknown + * \author Lars Gullik Bjønnes + * \author Angus Leeming + * \author John Levon + * + * Full author contact details are available in file CREDITS. */ + #ifndef INTL_H #define INTL_H -#ifdef __GNUG__ -#pragma interface -#endif - -#include "LString.h" -#include "form1.h" - -class LyXText; -class Combox; -class TransManager; +#include "trans_mgr.h" -/// default character set -#define DEFCHSET "iso8859-1" - - -/** 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 -{ +/** + * This class is used for managing keymaps + * for composing characters in LyX. + */ +class Intl { public: - /// + /// which keymap is currently used ? + enum Keymap { + PRIMARY, + SECONDARY + }; + 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 &); - /// initialize key mapper void InitKeyMapper(bool on); - /// Get the Translation Manager - inline TransManager * getTrans(); - /// - bool keymapon; - /// - bool primarykeymap; - /// - char * chsetcode; - /// - static void DispatchCallback(FL_OBJECT *, long); + // Get the Translation Manager + TransManager & getTransManager(); + + /// using primary or secondary keymap ? + Keymap keymap; + private: - /// - void update(); - /// - static void LCombo(int i, void *); // callback - /// - static void LCombo2(int i, void *); // callback - /// - void Keymap(long code); - /// - int curkeymap; - /// - int otherkeymap; - - /// - FD_KeyMap * fd_form_keymap; - /// - Combox * Language; - /// - Combox * Language2; - /// - string & prim_lang; - /// - string & sec_lang; - /// - TransManager * trans; + /// is key mapping enabled ? + bool keymapon; + /// the primary language keymap + std::string & prim_lang; + /// the secondary language keymap + std::string & sec_lang; + /// the translation manager + TransManager trans; }; -TransManager * Intl::getTrans() +inline +TransManager & Intl::getTransManager() { return trans; } -#endif +#endif /* INTL_H */