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