2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright (C) 1995 Matthias Ettrich
9 * ====================================================== */
11 #ifndef INSET_LATEX_ACCENT_H
12 #define INSET_LATEX_ACCENT_H
22 /** Insertion of accents
24 Proper handling of accented characters.
25 This is class is supposed to handle all LaTeX accents, it
26 is also possible that the class will change a bit so that
27 it also can handle other special characters (e.g. Hstroke)
28 Initiated by Ivan Schreter, later modified by Lgb.
30 class InsetLatexAccent : public Inset {
35 InsetLatexAccent(string const & string);
36 #if 0 // the compiler generated version should be ok.
38 InsetLatexAccent(InsetLatexAccent const &);
41 int Ascent(LyXFont const & font) const;
43 int Descent(LyXFont const & font) const;
45 int Width(LyXFont const & font) const;
47 int Lbearing(LyXFont const & font) const;
49 int Rbearing(LyXFont const & font) const;
51 bool DisplayISO8859_9(LyXFont font, LyXScreen & scr,
52 int baseline, float & x);
54 void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
56 void Write(ostream &);
58 void Read(LyXLex & lex);
60 int Latex(ostream &, signed char fragile);
62 int Latex(string & file, signed char fragile);
64 int Linuxdoc(string & file);
66 int DocBook(string & file);
68 bool Deletable() const;
70 bool DirectWrite() const;
72 Inset * Clone() const;
74 Inset::Code LyxCode()const;
76 inline bool CanDisplay();
77 /// all the accent types
123 friend ostream & operator<<(ostream &, ACCENT_TYPES);
124 /// Check if we know the modifier and can display it ok on screen.
125 void checkContents();
128 /// can display as proper char
131 ACCENT_TYPES modtype;
133 /// remove dot from 'i' and 'j' or transform l, L into lslash, LSLaSH
135 /// add something to ascent - accent at the top
137 /// add something to descent - underlined char
139 /// international char
143 bool InsetLatexAccent::CanDisplay()