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