1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* 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"
|
1999-09-27 18:44:28 +00:00
|
|
|
#include "form1.h"
|
|
|
|
|
|
|
|
class LyXText;
|
|
|
|
class Combox;
|
|
|
|
class TransManager;
|
1999-10-02 16:21:10 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
/// default character set
|
|
|
|
#define DEFCHSET "iso8859-1"
|
|
|
|
|
|
|
|
|
|
|
|
/** The gui part and the non gui part should be split into two different
|
|
|
|
classes. Probably should the gui class just have a pointer to the non
|
|
|
|
gui class.
|
|
|
|
*/
|
|
|
|
class Intl
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
Intl();
|
|
|
|
|
|
|
|
/// show key mapping dialog
|
|
|
|
void MenuKeymap();
|
|
|
|
///
|
|
|
|
void KeyMapOn(bool on);
|
|
|
|
///
|
|
|
|
void KeyMapPrim();
|
|
|
|
///
|
|
|
|
void KeyMapSec();
|
|
|
|
|
|
|
|
/// turn on/off key mappings, status in keymapon
|
|
|
|
void ToggleKeyMap();
|
|
|
|
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
int SetPrimary(string const &);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
int SetSecondary(string const &);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
/// initialize key mapper
|
|
|
|
void InitKeyMapper(bool on);
|
|
|
|
|
|
|
|
/// Get the Translation Manager
|
1999-12-10 00:07:59 +00:00
|
|
|
inline TransManager * getTrans();
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
bool keymapon;
|
|
|
|
///
|
1999-12-10 00:07:59 +00:00
|
|
|
char * chsetcode;
|
1999-10-25 14:18:30 +00:00
|
|
|
///
|
1999-12-10 00:07:59 +00:00
|
|
|
static void DispatchCallback(FL_OBJECT *, long);
|
1999-09-27 18:44:28 +00:00
|
|
|
private:
|
|
|
|
///
|
|
|
|
void update();
|
|
|
|
///
|
|
|
|
static void LCombo(int i, void *); // callback
|
|
|
|
///
|
|
|
|
static void LCombo2(int i, void *); // callback
|
|
|
|
///
|
|
|
|
void Keymap(long code);
|
|
|
|
///
|
|
|
|
bool primarykeymap;
|
|
|
|
///
|
|
|
|
int curkeymap;
|
|
|
|
///
|
|
|
|
int otherkeymap;
|
|
|
|
|
|
|
|
///
|
1999-12-10 00:07:59 +00:00
|
|
|
FD_KeyMap * fd_form_keymap;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-12-10 00:07:59 +00:00
|
|
|
Combox * Language;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-12-10 00:07:59 +00:00
|
|
|
Combox * Language2;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string & prim_lang;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string & sec_lang;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-12-10 00:07:59 +00:00
|
|
|
TransManager * trans;
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
1999-12-10 00:07:59 +00:00
|
|
|
TransManager * Intl::getTrans()
|
1999-09-27 18:44:28 +00:00
|
|
|
{
|
|
|
|
return trans;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|