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
|
|
|
|
2000-04-04 00:19:15 +00:00
|
|
|
#include FORMS_H_LOCATION
|
|
|
|
|
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.
|
|
|
|
*/
|
2000-08-07 20:58:24 +00:00
|
|
|
class Intl {
|
1999-09-27 18:44:28 +00:00
|
|
|
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
|
2000-07-15 23:51:46 +00:00
|
|
|
TransManager * getTrans();
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
bool keymapon;
|
|
|
|
///
|
2000-02-03 19:51:27 +00:00
|
|
|
bool primarykeymap;
|
|
|
|
///
|
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);
|
|
|
|
///
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-07-15 23:51:46 +00:00
|
|
|
inline
|
1999-12-10 00:07:59 +00:00
|
|
|
TransManager * Intl::getTrans()
|
1999-09-27 18:44:28 +00:00
|
|
|
{
|
|
|
|
return trans;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|