1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
2002-06-12 03:16:41 +00:00
|
|
|
/**
|
|
|
|
* \file intl.h
|
|
|
|
* Copyright 1995-2002 the LyX Team
|
|
|
|
* Read the file COPYING
|
|
|
|
*
|
|
|
|
* \author unknown
|
|
|
|
* \author John Levon <moz@compsoc.man.ac.uk>
|
|
|
|
*/
|
|
|
|
|
2002-12-01 22:59:25 +00:00
|
|
|
|
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
|
|
|
|
|
|
|
|
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 */
|