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