X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fintl.h;h=2e173f5cb89e01fdcfc3948ac5ddc250542363f8;hb=f65b7ff4ab2fe8ad0d9196c231064240e3fde81f;hp=beba4d595a60b70134141f120e634bde0e3cc3ce;hpb=0eccdd1c3613e5170deb77b22174dd0afde833e9;p=lyx.git diff --git a/src/intl.h b/src/intl.h index beba4d595a..2e173f5cb8 100644 --- a/src/intl.h +++ b/src/intl.h @@ -6,17 +6,24 @@ #ifndef INTL_H #define INTL_H +#include FORMS_H_LOCATION + #ifdef __GNUG__ #pragma interface #endif +#include #include "LString.h" #include "form1.h" +#include "trans_mgr.h" class LyXText; class Combox; -class TransManager; +#ifdef SIGC_CXX_NAMESPACES +using SigC::Object; +using SigC::Connection; +#endif /// default character set #define DEFCHSET "iso8859-1" @@ -26,8 +33,7 @@ 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(); @@ -52,54 +58,54 @@ public: /// int SetSecondary(string const &); - // insert correct stuff into paragraph - //void TranslateAndInsert(char c, LyXText *text); - /// initialize key mapper void InitKeyMapper(bool on); - /// Get the Translation Manager - inline TransManager *getTrans(); + // Get the Translation Manager + TransManager & getTrans(); /// 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; /// string & prim_lang; /// string & sec_lang; /// - TransManager *trans; + TransManager trans; + /// Redraw connection. + Connection r_; }; -TransManager* Intl::getTrans() +inline +TransManager & Intl::getTrans() { return trans; }