]> git.lyx.org Git - lyx.git/blobdiff - src/intl.h
go through horrendous contortions to work around font breakage in every
[lyx.git] / src / intl.h
index 2e173f5cb89e01fdcfc3948ac5ddc250542363f8..bc639dea0fd1680d243a63970fb7778c45babed4 100644 (file)
 // -*- C++ -*-
-/* International support for LyX
+/**
+ * \file intl.h
+ * Copyright 1995-2002 the LyX Team
+ * Read the file COPYING
+ *
+ * \author unknown
+ * \author John Levon <moz@compsoc.man.ac.uk>
+ */
 
 
- */
 #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"
 #include "trans_mgr.h"
 
-class LyXText;
-class Combox;
-
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Object;
-using SigC::Connection;
-#endif
 
-/// default character set
-#define DEFCHSET "iso8859-1"
-
-
-/** The gui part and the non gui part should be split into two different
-  classes. Probably should the gui class just have a pointer to the non
-  gui class.
-  */
-class Intl : public Object {
+/**
+ * This class is used for managing keymaps
+ * for composing characters in LyX.
+ */
+class Intl {
 public:
-       ///
+       /// which keymap is currently used ?
+       enum Keymap {
+               PRIMARY,
+               SECONDARY
+       };
+
        Intl();
-       ///
-       ~Intl();
-       
-       /// show key mapping dialog
-       void MenuKeymap(); 
-       ///
+
+       /// {en/dis}able the keymap
        void KeyMapOn(bool on);
-       ///
+
+       /// set the primary language keymap
        void KeyMapPrim();
-       ///
+
+       /// set the secondary language keymap
        void KeyMapSec();
 
        /// turn on/off key mappings, status in keymapon
        void ToggleKeyMap();
 
-       ///
-       int SetPrimary(string const &);
-
-       ///
-       int SetSecondary(string const &);
-
        /// initialize key mapper
        void InitKeyMapper(bool on);
 
        // Get the Translation Manager
-       TransManager & getTrans();
-       ///
-       bool keymapon;
-       ///
-       bool primarykeymap;
-       ///
-       char * chsetcode;
-       ///
-       static void DispatchCallback(FL_OBJECT *, long);
+       TransManager & getTransManager();
+
+       /// using primary or secondary keymap ?
+       Keymap keymap;
+
 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 *, Combox *); // callback
-       ///
-       void Keymap(long code);
-       ///
-       int curkeymap;
-       ///
-       int otherkeymap;
-       
-       ///
-       FD_KeyMap * fd_form_keymap;
-       ///
-       Combox * Language;
-       ///
-       Combox * Language2;
-       ///
+       /// is key mapping enabled ?
+       bool keymapon;
+       /// the primary language keymap
        string & prim_lang;
-       ///
+       /// the secondary language keymap
        string & sec_lang;
-       ///
+       /// the translation manager
        TransManager trans;
-       /// Redraw connection.
-       Connection r_;
 };
 
 
 inline
-TransManager & Intl::getTrans()
+TransManager & Intl::getTransManager()
 {
        return trans;
 }
 
-#endif
+#endif /* INTL_H */