]> git.lyx.org Git - lyx.git/blobdiff - src/intl.h
Dekels tabular/textinset patches
[lyx.git] / src / intl.h
index afb1ce44db29d63216476d02c8590361dc615378..90317e85d32ccb265b9492648b1d144044da0890 100644 (file)
@@ -3,19 +3,34 @@
 
 
  */
-#ifndef _INTL_H
-#define _INTL_H
+#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;
-class LString;
+#endif
+
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::Object;
+using SigC::Connection;
+#endif
 
 /// default character set
 #define DEFCHSET "iso8859-1"
@@ -25,8 +40,7 @@ class LString;
   classes. Probably should the gui class just have a pointer to the non
   gui class.
   */
-class Intl
-{
+class Intl : public Object {
 public:
        ///
        Intl();
@@ -46,61 +60,79 @@ public:
        void ToggleKeyMap();
 
        ///
-       int SetPrimary(LString const &);
+       int SetPrimary(string const &);
 
        ///
-       int SetSecondary(LString const &);
-
-       // insert correct stuff into paragraph
-       //void TranslateAndInsert(char c, LyXText *text);
+       int SetSecondary(string const &);
 
        /// 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;
        ///
-       char *chsetcode;
-private:
+       bool primarykeymap;
        ///
-       //int SelectCharset(char const *code);
+       char * chsetcode;
        ///
-       void update();
+       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();
        ///
-       static void LCombo(int i, void *); // callback
+       void update();
        ///
-       static void LCombo2(int i, void *); // callback
+       static void LCombo(int i, void *, Combox *); // callback
        ///
        void Keymap(long code);
        ///
-       static void DispatchCallback(FL_OBJECT*,long);
-       ///
-       bool primarykeymap;
-       ///
        int curkeymap;
        ///
        int otherkeymap;
        
        ///
-       FD_KeyMap *fd_form_keymap;
+       FD_KeyMap * fd_form_keymap;
        ///
-       Combox *Language;
+       Combox * Language;
        ///
-       Combox *Language2;
+       Combox * Language2;
        ///
-       LString& prim_lang;
+       string & prim_lang;
        ///
-       LString& sec_lang;
+       string & sec_lang;
+#if 0
        ///
-       TransManager *trans;
+       TransManager * trans;
+#else
+       ///
+       TransManager trans;
+#endif
+       /// Redraw connection.
+       Connection r_;
 };
 
 
-TransManager* Intl::getTrans()
+#if 0
+inline
+TransManager * Intl::getTrans()
+{
+       return trans;
+}
+#else
+inline
+TransManager & Intl::getTrans()
 {
        return trans;
 }
+#endif
 
 #endif