mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-13 06:20:28 +00:00
cb768c29d3
characters (forgot this with the last commit) * src/lyxfunc.C: remove function declaration * src/tex-accent.C (lyx_accent_table): Remove obsolete stuff and add UCS4 codes (DoAccent): Create UCS4 combining sequences instead of LaTeX accents * src/tex-accent.h (tex_accent_struct): Remove cms member, add ucs4 member git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17669 a592a061-630c-0410-9148-cb99ea01b6c8
120 lines
3.2 KiB
C++
120 lines
3.2 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file tex-accent.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Lars Gullik Bjønnes
|
|
* \author Matthias Ettrich
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef TEX_ACCENT
|
|
#define TEX_ACCENT
|
|
|
|
#include "lfuns.h"
|
|
#include "support/docstring.h"
|
|
|
|
|
|
namespace lyx {
|
|
|
|
// FIXME This file has nothing to do with TeX anymore
|
|
|
|
/* the names used by TeX and XWindows for deadkeys/accents are not the same
|
|
so here follows a table to clearify the differences. Please correct this
|
|
if I got it wrong
|
|
|
|
|------------------|------------------|------------------|--------------|
|
|
| TeX | XWindows | \bind/LFUN | used by intl |
|
|
|------------------|------------------|------------------|--------------|
|
|
| grave | grave |LFUN_ACCENT_GRAVE | grave
|
|
| acute | acute |LFUN_ACCENT_ACUTE | acute
|
|
| circumflex | circumflex |LFUN_ACCENT_CIRCUMFLEX | circumflex
|
|
| umlaut/dieresis | diaeresis |LFUN_ACCENT_UMLAUT | umlaut
|
|
| tilde | tilde |LFUN_ACCENT_TILDE | tilde
|
|
| macron | maron |LFUN_ACCENT_MACRON | macron
|
|
| dot | abovedot |LFUN_ACCENT_DOT | dot
|
|
| cedilla | cedilla |LFUN_ACCENT_CEDILLA | cedilla
|
|
| underdot | |LFUN_ACCENT_UNDERDOT | underdot
|
|
| underbar | |LFUN_ACCENT_UNDERBAR | underbar
|
|
| hácek | caron |LFUN_ACCENT_CARON | caron
|
|
| breve | breve |LFUN_ACCENT_BREVE | breve
|
|
| tie | |LFUN_ACCENT_TIE | tie
|
|
| Hungarian umlaut | doubleacute |LFUN_ACCENT_HUNGARIAN_UMLAUT | hungarian umlaut
|
|
| circle | abovering |LFUN_ACCENT_CIRCLE | circle
|
|
| | ogonek | |
|
|
| | iota | |
|
|
| | voiced_sound | |
|
|
| | semivoiced_sound | |
|
|
| | |LFUN_ACCENT_SPECIAL_CARON| special caron
|
|
*/
|
|
// I am not sure how some of the XWindows names coresponds to the TeX ones.
|
|
|
|
///
|
|
enum tex_accent {
|
|
///
|
|
TEX_NOACCENT = 0,
|
|
///
|
|
TEX_ACUTE,
|
|
///
|
|
TEX_GRAVE,
|
|
///
|
|
TEX_MACRON,
|
|
///
|
|
TEX_TILDE,
|
|
///
|
|
TEX_UNDERBAR,
|
|
///
|
|
TEX_CEDILLA,
|
|
///
|
|
TEX_UNDERDOT,
|
|
///
|
|
TEX_CIRCUMFLEX,
|
|
///
|
|
TEX_CIRCLE,
|
|
///
|
|
TEX_TIE,
|
|
///
|
|
TEX_BREVE,
|
|
///
|
|
TEX_CARON,
|
|
// TEX_SPECIAL_CARON,
|
|
///
|
|
TEX_HUNGUML,
|
|
///
|
|
TEX_UMLAUT,
|
|
///
|
|
TEX_DOT,
|
|
///
|
|
TEX_OGONEK,
|
|
///
|
|
TEX_MAX_ACCENT= TEX_OGONEK
|
|
};
|
|
|
|
|
|
struct tex_accent_struct {
|
|
///
|
|
tex_accent accent;
|
|
/// UCS4 code point of this accent
|
|
char_type ucs4;
|
|
///
|
|
char const * name;
|
|
///
|
|
kb_action action;
|
|
};
|
|
|
|
///
|
|
extern tex_accent_struct lyx_accent_table[];
|
|
|
|
///
|
|
extern docstring const DoAccent(docstring const &, tex_accent);
|
|
///
|
|
extern docstring const DoAccent(char_type, tex_accent);
|
|
///
|
|
extern tex_accent_struct get_accent(kb_action action);
|
|
|
|
} // namespace lyx
|
|
|
|
#endif
|