]> git.lyx.org Git - lyx.git/blob - src/intl.h
Finish to add wrappers for xforms callbacks. Now dec C++ 6.1 compiles lyx
[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         ~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         // insert correct stuff into paragraph
56         //void TranslateAndInsert(char c, LyXText *text);
57
58         /// initialize key mapper
59         void InitKeyMapper(bool on);
60
61         /// Get the Translation Manager
62         inline TransManager *getTrans();
63         ///
64         bool keymapon;
65         ///
66         char *chsetcode;
67         ///
68         static void DispatchCallback(FL_OBJECT*,long);
69 private:
70         ///
71         //int SelectCharset(char const *code);
72         ///
73         void update();
74         ///
75         static void LCombo(int i, void *); // callback
76         ///
77         static void LCombo2(int i, void *); // callback
78         ///
79         void Keymap(long code);
80         ///
81         bool primarykeymap;
82         ///
83         int curkeymap;
84         ///
85         int otherkeymap;
86         
87         ///
88         FD_KeyMap *fd_form_keymap;
89         ///
90         Combox *Language;
91         ///
92         Combox *Language2;
93         ///
94         string & prim_lang;
95         ///
96         string & sec_lang;
97         ///
98         TransManager *trans;
99 };
100
101
102 TransManager* Intl::getTrans()
103 {
104         return trans;
105 }
106
107 #endif