]> git.lyx.org Git - lyx.git/blobdiff - src/intl.h
More fixes to insettabular/text (and some missing features added).
[lyx.git] / src / intl.h
index 8cf5bf36d5976c5340fb2687168fa010c926e407..90317e85d32ccb265b9492648b1d144044da0890 100644 (file)
@@ -6,17 +6,31 @@
 #ifndef INTL_H
 #define INTL_H
 
+#include FORMS_H_LOCATION
+
 #ifdef __GNUG__
 #pragma interface
 #endif
 
+#include <sigc++/signal_system.h>
 #include "LString.h"
 #include "form1.h"
 
+#if 1
+#include "trans_mgr.h"
+#endif
+
 class LyXText;
 class Combox;
+
+#if 0
 class TransManager;
+#endif
 
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::Object;
+using SigC::Connection;
+#endif
 
 /// default character set
 #define DEFCHSET "iso8859-1"
@@ -26,11 +40,12 @@ class TransManager;
   classes. Probably should the gui class just have a pointer to the non
   gui class.
   */
-class Intl
-{
+class Intl : public Object {
 public:
        ///
        Intl();
+       ///
+       ~Intl();
        
        /// show key mapping dialog
        void MenuKeymap(); 
@@ -53,26 +68,33 @@ public:
        /// initialize key mapper
        void InitKeyMapper(bool on);
 
+#if 0
        /// Get the Translation Manager
-       inline TransManager * getTrans();
+       TransManager * getTrans();
+#else
+       // Get the Translation Manager
+       TransManager & getTrans();
+#endif
        ///
        bool keymapon;
        ///
+       bool primarykeymap;
+       ///
        char * chsetcode;
        ///
        static void DispatchCallback(FL_OBJECT *, long);
 private:
+       /** Redraw the form (on receipt of a Signal indicating, for example,
+           that the xform colors have been re-mapped).
+       */
+       void redraw();
        ///
        void update();
        ///
-       static void LCombo(int i, void *); // callback
-       ///
-       static void LCombo2(int i, void *); // callback
+       static void LCombo(int i, void *, Combox *); // callback
        ///
        void Keymap(long code);
        ///
-       bool primarykeymap;
-       ///
        int curkeymap;
        ///
        int otherkeymap;
@@ -87,14 +109,30 @@ private:
        string & prim_lang;
        ///
        string & sec_lang;
+#if 0
        ///
        TransManager * trans;
+#else
+       ///
+       TransManager trans;
+#endif
+       /// Redraw connection.
+       Connection r_;
 };
 
 
+#if 0
+inline
 TransManager * Intl::getTrans()
 {
        return trans;
 }
+#else
+inline
+TransManager & Intl::getTrans()
+{
+       return trans;
+}
+#endif
 
 #endif