]> git.lyx.org Git - lyx.git/blob - src/intl.h
b4ca4393a7b537ec9143127bbc3190606abfa5bd
[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 #include "support/std_string.h"
21
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         TransManager & getTransManager();
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         string & prim_lang;
63         /// the secondary language keymap
64         string & sec_lang;
65         /// the translation manager
66         TransManager trans;
67 };
68
69
70 inline
71 TransManager & Intl::getTransManager()
72 {
73         return trans;
74 }
75
76 #endif /* INTL_H */