1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
2001-03-16 12:08:14 +00:00
|
|
|
/* 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
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
1999-10-02 16:21:10 +00:00
|
|
|
#include "LString.h"
|
2000-12-29 12:48:02 +00:00
|
|
|
#include "trans_mgr.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
2001-03-16 12:08:14 +00:00
|
|
|
class Intl {
|
1999-09-27 18:44:28 +00:00
|
|
|
public:
|
2001-03-16 12:08:14 +00:00
|
|
|
/// which keymap is currently used ?
|
|
|
|
enum Keymap {
|
|
|
|
PRIMARY,
|
|
|
|
SECONDARY
|
|
|
|
};
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
Intl();
|
|
|
|
|
2001-03-16 12:08:14 +00:00
|
|
|
/// {en/dis}able the keymap
|
1999-09-27 18:44:28 +00:00
|
|
|
void KeyMapOn(bool on);
|
2001-03-16 12:08:14 +00:00
|
|
|
|
|
|
|
/// set the primary language keymap
|
1999-09-27 18:44:28 +00:00
|
|
|
void KeyMapPrim();
|
2001-03-16 12:08:14 +00:00
|
|
|
|
|
|
|
/// set the secondary language keymap
|
1999-09-27 18:44:28 +00:00
|
|
|
void KeyMapSec();
|
|
|
|
|
|
|
|
/// turn on/off key mappings, status in keymapon
|
|
|
|
void ToggleKeyMap();
|
|
|
|
|
|
|
|
/// initialize key mapper
|
|
|
|
void InitKeyMapper(bool on);
|
|
|
|
|
2000-12-29 12:48:02 +00:00
|
|
|
// Get the Translation Manager
|
|
|
|
TransManager & getTrans();
|
2001-03-16 12:08:14 +00:00
|
|
|
|
|
|
|
/// using primary or secondary keymap ?
|
|
|
|
Keymap keymap;
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
private:
|
2001-03-16 12:08:14 +00:00
|
|
|
/// is key mapping enabled ?
|
|
|
|
bool keymapon;
|
|
|
|
/// the primary language keymap
|
1999-10-02 16:21:10 +00:00
|
|
|
string & prim_lang;
|
2001-03-16 12:08:14 +00:00
|
|
|
/// the secondary language keymap
|
1999-10-02 16:21:10 +00:00
|
|
|
string & sec_lang;
|
2001-03-16 12:08:14 +00:00
|
|
|
/// the translation manager
|
2000-12-29 12:48:02 +00:00
|
|
|
TransManager trans;
|
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
|
|
|
|
2001-03-16 12:08:14 +00:00
|
|
|
#endif /* INTL_H */
|