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