]> git.lyx.org Git - lyx.git/blob - src/Intl.h
Avoid full metrics computation with Update:FitCursor
[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.h"
19
20
21 namespace lyx {
22
23 /**
24  * This class is used for managing keymaps
25  * for composing characters in LyX.
26  */
27 class Intl {
28 public:
29         /// which keymap is currently used ?
30         enum Keymap {
31                 PRIMARY,
32                 SECONDARY
33         };
34
35         Intl();
36
37         /// {en/dis}able the keymap
38         void keyMapOn(bool on);
39
40         /// set the primary language keymap
41         void keyMapPrim();
42
43         /// set the secondary language keymap
44         void keyMapSec();
45
46         /// turn on/off key mappings, status in keymapon
47         void toggleKeyMap();
48
49         /// initialize key mapper
50         void initKeyMapper(bool on);
51
52         // Get the Translation Manager
53         inline TransManager & getTransManager() { return trans; }
54
55         /// using primary or secondary keymap ?
56         Keymap keymap;
57
58 private:
59         /// is key mapping enabled ?
60         bool keymapon;
61         /// the primary language keymap
62         std::string & prim_lang;
63         /// the secondary language keymap
64         std::string & sec_lang;
65         /// the translation manager
66         TransManager trans;
67 };
68
69 } // namespace lyx
70
71 #endif /* INTL_H */