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