]> git.lyx.org Git - lyx.git/blob - src/tex-accent.h
GUI-indep toolbar and menus mostly work !
[lyx.git] / src / tex-accent.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  * 
5  *           LyX, The Document Processor
6  *        
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1995-2000 The LyX Team.
9  *
10  * ====================================================== */
11
12 #ifndef TEX_ACCENT
13 #define TEX_ACCENT
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "commandtags.h"
20
21 /* the names used by TeX and XWindows for deadkeys/accents are not the same
22    so here follows a table to clearify the differences. Please correct this
23    if I got it wrong
24
25    |------------------|------------------|------------------|--------------|
26    |      TeX         |     XWindows     |   \bind/LFUN     | used by intl |
27    |------------------|------------------|------------------|--------------|
28    |    grave         |    grave         |LFUN_GRAVE        | grave
29    |    acute         |    acute         |LFUN_ACUTE        | acute
30    |    circumflex    |    circumflex    |LFUN_CIRCUMFLEX   | circumflex
31    | umlaut/dieresis  |    diaeresis     |LFUN_UMLAUT       | umlaut
32    |    tilde         |    tilde         |LFUN_TILDE        | tilde
33    |    macron        |    maron         |LFUN_MACRON       | macron
34    |    dot           |    abovedot      |LFUN_DOT          | dot
35    |    cedilla       |    cedilla       |LFUN_CEDILLA      | cedilla
36    |    underdot      |                  |LFUN_UNDERDOT     | underdot
37    |    underbar      |                  |LFUN_UNDERBAR     | underbar
38    |    hácek         |    caron         |LFUN_CARON        | caron
39    |    breve         |    breve         |LFUN_BREVE        | breve
40    |    tie           |                  |LFUN_TIE          | tie
41    | Hungarian umlaut |    doubleacute   |LFUN_HUNG_UMLAUT  | hungarian umlaut
42    |    circle        |    abovering     |LFUN_CIRCLE       | circle
43    |                  |    ogonek        |                  |
44    |                  |    iota          |                  |
45    |                  |    voiced_sound  |                  |
46    |                  | semivoiced_sound |                  |
47    |                  |                  |LFUN_SPECIAL_CARON| special caron
48    */
49 // I am not sure how some of the XWindows names coresponds to the TeX ones.
50
51 ///
52 enum tex_accent {
53         ///
54         TEX_NOACCENT = 0,
55         ///
56         TEX_ACUTE,
57         ///
58         TEX_GRAVE,
59         ///
60         TEX_MACRON,
61         ///
62         TEX_TILDE,
63         ///
64         TEX_UNDERBAR,
65         ///
66         TEX_CEDILLA,
67         ///
68         TEX_UNDERDOT,
69         ///
70         TEX_CIRCUMFLEX,
71         ///
72         TEX_CIRCLE,
73         ///
74         TEX_TIE,
75         ///
76         TEX_BREVE,
77         ///
78         TEX_CARON,
79 //  TEX_SPECIAL_CARON,
80         ///
81         TEX_HUNGUML,
82         ///
83         TEX_UMLAUT,
84         ///
85         TEX_DOT,
86         ///
87         TEX_OGONEK,
88         ///
89         TEX_MAX_ACCENT= TEX_OGONEK
90 };
91
92
93 /** the native is so we know what characters TeX can write in a decent way
94  it should be up to the user if _all_ characters should be allowed to
95  be accented. Lgb. */
96 struct tex_accent_struct {
97         ///
98         tex_accent accent;
99         ///
100         char const *cmd;
101         ///
102         char const *native;
103         ///
104         char const *name;
105         ///
106         kb_action action;
107 };
108
109 ///
110 extern tex_accent_struct lyx_accent_table[];
111         
112 #endif