mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
99d1627a47
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6138 a592a061-630c-0410-9148-cb99ea01b6c8
73 lines
1.2 KiB
C++
73 lines
1.2 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file intl.h
|
|
* Copyright 1995-2002 the LyX Team
|
|
* Read the file COPYING
|
|
*
|
|
* \author unknown
|
|
* \author John Levon <moz@compsoc.man.ac.uk>
|
|
*/
|
|
|
|
|
|
#ifndef INTL_H
|
|
#define INTL_H
|
|
|
|
#include "LString.h"
|
|
#include "trans_mgr.h"
|
|
|
|
|
|
/**
|
|
* This class is used for managing keymaps
|
|
* for composing characters in LyX.
|
|
*/
|
|
class Intl {
|
|
public:
|
|
/// which keymap is currently used ?
|
|
enum Keymap {
|
|
PRIMARY,
|
|
SECONDARY
|
|
};
|
|
|
|
Intl();
|
|
|
|
/// {en/dis}able the keymap
|
|
void KeyMapOn(bool on);
|
|
|
|
/// set the primary language keymap
|
|
void KeyMapPrim();
|
|
|
|
/// set the secondary language keymap
|
|
void KeyMapSec();
|
|
|
|
/// turn on/off key mappings, status in keymapon
|
|
void ToggleKeyMap();
|
|
|
|
/// initialize key mapper
|
|
void InitKeyMapper(bool on);
|
|
|
|
// Get the Translation Manager
|
|
TransManager & getTransManager();
|
|
|
|
/// using primary or secondary keymap ?
|
|
Keymap keymap;
|
|
|
|
private:
|
|
/// is key mapping enabled ?
|
|
bool keymapon;
|
|
/// the primary language keymap
|
|
string & prim_lang;
|
|
/// the secondary language keymap
|
|
string & sec_lang;
|
|
/// the translation manager
|
|
TransManager trans;
|
|
};
|
|
|
|
|
|
inline
|
|
TransManager & Intl::getTransManager()
|
|
{
|
|
return trans;
|
|
}
|
|
|
|
#endif /* INTL_H */
|