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