]> git.lyx.org Git - lyx.git/blob - src/intl.h
split LyXText::rowlist_ into individual Paragraph::rows_ chunks
[lyx.git] / src / intl.h
1 // -*- C++ -*-
2 /**
3  * \file intl.h
4  * Copyright 1995-2002 the LyX Team
5  * Read the file COPYING
6  *
7  * \author unknown
8  * \author John Levon <moz@compsoc.man.ac.uk>
9  */
10
11
12 #ifndef INTL_H
13 #define INTL_H
14
15 #include "LString.h"
16 #include "trans_mgr.h"
17
18
19 /**
20  * This class is used for managing keymaps
21  * for composing characters in LyX.
22  */
23 class Intl {
24 public:
25         /// which keymap is currently used ?
26         enum Keymap {
27                 PRIMARY,
28                 SECONDARY
29         };
30
31         Intl();
32
33         /// {en/dis}able the keymap
34         void KeyMapOn(bool on);
35
36         /// set the primary language keymap
37         void KeyMapPrim();
38
39         /// set the secondary language keymap
40         void KeyMapSec();
41
42         /// turn on/off key mappings, status in keymapon
43         void ToggleKeyMap();
44
45         /// initialize key mapper
46         void InitKeyMapper(bool on);
47
48         // Get the Translation Manager
49         TransManager & getTransManager();
50
51         /// using primary or secondary keymap ?
52         Keymap keymap;
53
54 private:
55         /// is key mapping enabled ?
56         bool keymapon;
57         /// the primary language keymap
58         string & prim_lang;
59         /// the secondary language keymap
60         string & sec_lang;
61         /// the translation manager
62         TransManager trans;
63 };
64
65
66 inline
67 TransManager & Intl::getTransManager()
68 {
69         return trans;
70 }
71
72 #endif /* INTL_H */