]> git.lyx.org Git - lyx.git/blob - src/intl.h
Angus insetindex patch + protect patch from Dekel
[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 {
33 public:
34         ///
35         Intl();
36         
37         /// show key mapping dialog
38         void MenuKeymap(); 
39         ///
40         void KeyMapOn(bool on);
41         ///
42         void KeyMapPrim();
43         ///
44         void KeyMapSec();
45
46         /// turn on/off key mappings, status in keymapon
47         void ToggleKeyMap();
48
49         ///
50         int SetPrimary(string const &);
51
52         ///
53         int SetSecondary(string const &);
54
55         /// initialize key mapper
56         void InitKeyMapper(bool on);
57
58         /// Get the Translation Manager
59         TransManager * getTrans();
60         ///
61         bool keymapon;
62         ///
63         bool primarykeymap;
64         ///
65         char * chsetcode;
66         ///
67         static void DispatchCallback(FL_OBJECT *, long);
68 private:
69         ///
70         void update();
71         ///
72         static void LCombo(int i, void *); // callback
73         ///
74         static void LCombo2(int i, void *); // callback
75         ///
76         void Keymap(long code);
77         ///
78         int curkeymap;
79         ///
80         int otherkeymap;
81         
82         ///
83         FD_KeyMap * fd_form_keymap;
84         ///
85         Combox * Language;
86         ///
87         Combox * Language2;
88         ///
89         string & prim_lang;
90         ///
91         string & sec_lang;
92         ///
93         TransManager * trans;
94 };
95
96
97 inline
98 TransManager * Intl::getTrans()
99 {
100         return trans;
101 }
102
103 #endif