]> git.lyx.org Git - lyx.git/blob - src/intl.h
small changes to ButtonController usage
[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         /// 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(string const &);
50
51         ///
52         int SetSecondary(string const &);
53
54         /// initialize key mapper
55         void InitKeyMapper(bool on);
56
57         /// Get the Translation Manager
58         TransManager * getTrans();
59         ///
60         bool keymapon;
61         ///
62         bool primarykeymap;
63         ///
64         char * chsetcode;
65         ///
66         static void DispatchCallback(FL_OBJECT *, long);
67 private:
68         ///
69         void update();
70         ///
71         static void LCombo(int i, void *); // callback
72         ///
73         static void LCombo2(int i, void *); // 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