]> git.lyx.org Git - lyx.git/blob - src/intl.h
character2.diff.gz
[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 <sigc++/signal_system.h>
16 #include "LString.h"
17 #include "form1.h"
18 #include "trans_mgr.h"
19
20 class LyXText;
21 class Combox;
22
23 #ifdef SIGC_CXX_NAMESPACES
24 using SigC::Object;
25 using SigC::Connection;
26 #endif
27
28 /// default character set
29 #define DEFCHSET "iso8859-1"
30
31
32 /** The gui part and the non gui part should be split into two different
33   classes. Probably should the gui class just have a pointer to the non
34   gui class.
35   */
36 class Intl : public Object {
37 public:
38         ///
39         Intl();
40         ///
41         ~Intl();
42         
43         /// show key mapping dialog
44         void MenuKeymap(); 
45         ///
46         void KeyMapOn(bool on);
47         ///
48         void KeyMapPrim();
49         ///
50         void KeyMapSec();
51
52         /// turn on/off key mappings, status in keymapon
53         void ToggleKeyMap();
54
55         ///
56         int SetPrimary(string const &);
57
58         ///
59         int SetSecondary(string const &);
60
61         /// initialize key mapper
62         void InitKeyMapper(bool on);
63
64         // Get the Translation Manager
65         TransManager & getTrans();
66         ///
67         bool keymapon;
68         ///
69         bool primarykeymap;
70         ///
71         char * chsetcode;
72         ///
73         static void DispatchCallback(FL_OBJECT *, long);
74 private:
75         /** Redraw the form (on receipt of a Signal indicating, for example,
76             that the xform colors have been re-mapped).
77         */
78         void redraw();
79         ///
80         void update();
81         ///
82         static void LCombo(int i, void *, Combox *); // callback
83         ///
84         void Keymap(long code);
85         ///
86         int curkeymap;
87         ///
88         int otherkeymap;
89         
90         ///
91         FD_KeyMap * fd_form_keymap;
92         ///
93         Combox * Language;
94         ///
95         Combox * Language2;
96         ///
97         string & prim_lang;
98         ///
99         string & sec_lang;
100         ///
101         TransManager trans;
102         /// Redraw connection.
103         Connection r_;
104 };
105
106
107 inline
108 TransManager & Intl::getTrans()
109 {
110         return trans;
111 }
112
113 #endif