1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* International support for LyX
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
1999-10-02 16:21:10 +00:00
|
|
|
#ifndef INTL_H
|
|
|
|
#define INTL_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2000-04-04 00:19:15 +00:00
|
|
|
#include FORMS_H_LOCATION
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2001-03-06 19:29:58 +00:00
|
|
|
#include <boost/smart_ptr.hpp>
|
2000-12-29 12:48:02 +00:00
|
|
|
#include <sigc++/signal_system.h>
|
1999-10-02 16:21:10 +00:00
|
|
|
#include "LString.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
#include "form1.h"
|
2000-12-29 12:48:02 +00:00
|
|
|
#include "trans_mgr.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
class LyXText;
|
|
|
|
class Combox;
|
2000-12-29 12:48:02 +00:00
|
|
|
|
2000-11-28 06:46:06 +00:00
|
|
|
#ifdef SIGC_CXX_NAMESPACES
|
|
|
|
using SigC::Object;
|
2000-12-04 09:15:51 +00:00
|
|
|
using SigC::Connection;
|
2000-11-28 06:46:06 +00:00
|
|
|
#endif
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
/// 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.
|
|
|
|
*/
|
2000-11-28 06:46:06 +00:00
|
|
|
class Intl : public Object {
|
1999-09-27 18:44:28 +00:00
|
|
|
public:
|
|
|
|
///
|
|
|
|
Intl();
|
2000-09-26 13:10:34 +00:00
|
|
|
///
|
|
|
|
~Intl();
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
/// show key mapping dialog
|
|
|
|
void MenuKeymap();
|
|
|
|
///
|
|
|
|
void KeyMapOn(bool on);
|
|
|
|
///
|
|
|
|
void KeyMapPrim();
|
|
|
|
///
|
|
|
|
void KeyMapSec();
|
|
|
|
|
|
|
|
/// turn on/off key mappings, status in keymapon
|
|
|
|
void ToggleKeyMap();
|
|
|
|
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
int SetPrimary(string const &);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
int SetSecondary(string const &);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
/// initialize key mapper
|
|
|
|
void InitKeyMapper(bool on);
|
|
|
|
|
2000-12-29 12:48:02 +00:00
|
|
|
// Get the Translation Manager
|
|
|
|
TransManager & getTrans();
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
bool keymapon;
|
|
|
|
///
|
2000-02-03 19:51:27 +00:00
|
|
|
bool primarykeymap;
|
|
|
|
///
|
1999-12-10 00:07:59 +00:00
|
|
|
char * chsetcode;
|
1999-10-25 14:18:30 +00:00
|
|
|
///
|
1999-12-10 00:07:59 +00:00
|
|
|
static void DispatchCallback(FL_OBJECT *, long);
|
1999-09-27 18:44:28 +00:00
|
|
|
private:
|
2000-11-28 06:46:06 +00:00
|
|
|
/** Redraw the form (on receipt of a Signal indicating, for example,
|
|
|
|
that the xform colors have been re-mapped).
|
|
|
|
*/
|
|
|
|
void redraw();
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
void update();
|
|
|
|
///
|
2000-09-14 14:37:21 +00:00
|
|
|
static void LCombo(int i, void *, Combox *); // callback
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
void Keymap(long code);
|
|
|
|
///
|
|
|
|
int curkeymap;
|
|
|
|
///
|
|
|
|
int otherkeymap;
|
|
|
|
|
|
|
|
///
|
2001-03-07 16:18:05 +00:00
|
|
|
FD_KeyMap * fd_form_keymap;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2001-03-06 19:29:58 +00:00
|
|
|
boost::scoped_ptr<Combox> Language;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2001-03-06 19:29:58 +00:00
|
|
|
boost::scoped_ptr<Combox> Language2;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string & prim_lang;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string & sec_lang;
|
2000-12-29 12:48:02 +00:00
|
|
|
///
|
|
|
|
TransManager trans;
|
2000-11-28 06:46:06 +00:00
|
|
|
/// Redraw connection.
|
2000-12-04 09:15:51 +00:00
|
|
|
Connection r_;
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-12-29 12:48:02 +00:00
|
|
|
inline
|
|
|
|
TransManager & Intl::getTrans()
|
|
|
|
{
|
|
|
|
return trans;
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
#endif
|