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