1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
2002-06-12 03:16:41 +00:00
|
|
|
/**
|
2007-04-26 04:41:58 +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
|
2008-11-14 15:58:50 +00:00
|
|
|
* \author Lars Gullik Bjønnes
|
2003-08-23 00:17:00 +00:00
|
|
|
* \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
|
|
|
|
2007-04-30 21:44:00 +00:00
|
|
|
#include "Trans.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
namespace lyx {
|
|
|
|
|
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
|
2006-04-09 00:26:19 +00:00
|
|
|
void keyMapOn(bool on);
|
2001-03-16 12:08:14 +00:00
|
|
|
|
|
|
|
/// set the primary language keymap
|
2006-04-09 00:26:19 +00:00
|
|
|
void keyMapPrim();
|
2001-03-16 12:08:14 +00:00
|
|
|
|
|
|
|
/// set the secondary language keymap
|
2006-04-09 00:26:19 +00:00
|
|
|
void keyMapSec();
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
/// turn on/off key mappings, status in keymapon
|
2006-04-09 00:26:19 +00:00
|
|
|
void toggleKeyMap();
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
/// initialize key mapper
|
2006-04-09 00:26:19 +00:00
|
|
|
void initKeyMapper(bool on);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2000-12-29 12:48:02 +00:00
|
|
|
// Get the Translation Manager
|
2007-04-30 21:44:00 +00:00
|
|
|
inline TransManager & getTransManager() { return trans; }
|
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
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string & prim_lang;
|
2001-03-16 12:08:14 +00:00
|
|
|
/// the secondary language keymap
|
2003-10-06 15:43:21 +00:00
|
|
|
std::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
|
|
|
};
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
} // namespace lyx
|
|
|
|
|
2001-03-16 12:08:14 +00:00
|
|
|
#endif /* INTL_H */
|