]> git.lyx.org Git - lyx.git/blob - src/intl.h
8cf5bf36d5976c5340fb2687168fa010c926e407
[lyx.git] / src / intl.h
1 // -*- C++ -*-
2 /* International support for LyX
3
4
5  */
6 #ifndef INTL_H
7 #define INTL_H
8
9 #ifdef __GNUG__
10 #pragma interface
11 #endif
12
13 #include "LString.h"
14 #include "form1.h"
15
16 class LyXText;
17 class Combox;
18 class TransManager;
19
20
21 /// default character set
22 #define DEFCHSET "iso8859-1"
23
24
25 /** The gui part and the non gui part should be split into two different
26   classes. Probably should the gui class just have a pointer to the non
27   gui class.
28   */
29 class Intl
30 {
31 public:
32         ///
33         Intl();
34         
35         /// show key mapping dialog
36         void MenuKeymap(); 
37         ///
38         void KeyMapOn(bool on);
39         ///
40         void KeyMapPrim();
41         ///
42         void KeyMapSec();
43
44         /// turn on/off key mappings, status in keymapon
45         void ToggleKeyMap();
46
47         ///
48         int SetPrimary(string const &);
49
50         ///
51         int SetSecondary(string const &);
52
53         /// initialize key mapper
54         void InitKeyMapper(bool on);
55
56         /// Get the Translation Manager
57         inline TransManager * getTrans();
58         ///
59         bool keymapon;
60         ///
61         char * chsetcode;
62         ///
63         static void DispatchCallback(FL_OBJECT *, long);
64 private:
65         ///
66         void update();
67         ///
68         static void LCombo(int i, void *); // callback
69         ///
70         static void LCombo2(int i, void *); // callback
71         ///
72         void Keymap(long code);
73         ///
74         bool primarykeymap;
75         ///
76         int curkeymap;
77         ///
78         int otherkeymap;
79         
80         ///
81         FD_KeyMap * fd_form_keymap;
82         ///
83         Combox * Language;
84         ///
85         Combox * Language2;
86         ///
87         string & prim_lang;
88         ///
89         string & sec_lang;
90         ///
91         TransManager * trans;
92 };
93
94
95 TransManager * Intl::getTrans()
96 {
97         return trans;
98 }
99
100 #endif