1999-09-27 18:44:28 +00:00
|
|
|
|
// -*- C++ -*-
|
2002-06-12 03:16:41 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file intl.h
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-06-12 03:16:41 +00:00
|
|
|
|
*
|
|
|
|
|
* \author unknown
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
|
|
|
|
* \author Angus Leeming
|
|
|
|
|
* \author John Levon
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-06-12 03:16:41 +00:00
|
|
|
|
*/
|
|
|
|
|
|
1999-10-02 16:21:10 +00:00
|
|
|
|
#ifndef INTL_H
|
|
|
|
|
#define INTL_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2000-12-29 12:48:02 +00:00
|
|
|
|
#include "trans_mgr.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2003-09-07 01:45:40 +00:00
|
|
|
|
#include "support/std_string.h"
|
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2002-06-12 03:16:41 +00:00
|
|
|
|
/**
|
|
|
|
|
* This class is used for managing keymaps
|
|
|
|
|
* for composing characters in LyX.
|
|
|
|
|
*/
|
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
|
|
|
|
|
};
|
2002-03-21 17:27:08 +00:00
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
|
Intl();
|
2002-03-21 17:27:08 +00:00
|
|
|
|
|
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
|
2002-06-18 15:44:30 +00:00
|
|
|
|
TransManager & getTransManager();
|
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
|
2002-06-18 15:44:30 +00:00
|
|
|
|
TransManager & Intl::getTransManager()
|
2000-12-29 12:48:02 +00:00
|
|
|
|
{
|
|
|
|
|
return trans;
|
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2001-03-16 12:08:14 +00:00
|
|
|
|
#endif /* INTL_H */
|