]> git.lyx.org Git - lyx.git/blob - src/intl.h
* GuiView.C (updateTab): do not update early if current tab has
[lyx.git] / src / intl.h
1 // -*- C++ -*-
2 /**
3  * \file intl.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author unknown
8  * \author Lars Gullik Bjønnes
9  * \author Angus Leeming
10  * \author John Levon
11  *
12  * Full author contact details are available in file CREDITS.
13  */
14
15 #ifndef INTL_H
16 #define INTL_H
17
18 #include "trans_mgr.h"
19
20
21 namespace lyx {
22
23
24 /**
25  * This class is used for managing keymaps
26  * for composing characters in LyX.
27  */
28 class Intl {
29 public:
30         /// which keymap is currently used ?
31         enum Keymap {
32                 PRIMARY,
33                 SECONDARY
34         };
35
36         Intl();
37
38         /// {en/dis}able the keymap
39         void keyMapOn(bool on);
40
41         /// set the primary language keymap
42         void keyMapPrim();
43
44         /// set the secondary language keymap
45         void keyMapSec();
46
47         /// turn on/off key mappings, status in keymapon
48         void toggleKeyMap();
49
50         /// initialize key mapper
51         void initKeyMapper(bool on);
52
53         // Get the Translation Manager
54         TransManager & getTransManager();
55
56         /// using primary or secondary keymap ?
57         Keymap keymap;
58
59 private:
60         /// is key mapping enabled ?
61         bool keymapon;
62         /// the primary language keymap
63         std::string & prim_lang;
64         /// the secondary language keymap
65         std::string & sec_lang;
66         /// the translation manager
67         TransManager trans;
68 };
69
70
71 inline
72 TransManager & Intl::getTransManager()
73 {
74         return trans;
75 }
76
77
78 } // namespace lyx
79
80 #endif /* INTL_H */