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);
37 InsetLatexAccent(InsetLatexAccent const &);
39 int Ascent(LyXFont const & font) const;
41 int Descent(LyXFont const & font) const;
43 int Width(LyXFont const & font) const;
45 int Lbearing(LyXFont const & font) const;
47 int Rbearing(LyXFont const & font) const;
49 bool DisplayISO8859_9(LyXFont font, LyXScreen & scr,
50 int baseline, float & x);
52 void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
54 void Write(ostream &);
56 void Read(LyXLex & lex);
58 int Latex(ostream &, signed char fragile);
60 int Latex(string & file, signed char fragile);
62 int Linuxdoc(string & file);
64 int DocBook(string & file);
66 bool Deletable() const;
68 bool DirectWrite() const;
70 Inset * Clone() const;
72 Inset::Code LyxCode()const;
74 inline bool CanDisplay();
76 /// all the accent types
122 friend ostream & operator<<(ostream &, ACCENT_TYPES);
123 /// Check if we know the modifier and can display it ok on screen.
124 void checkContents();
127 /// can display as proper char
130 ACCENT_TYPES modtype;
132 /// remove dot from 'i' and 'j' or transform l, L into lslash, LSLaSH
134 /// add something to ascent - accent at the top
136 /// add something to descent - underlined char
138 /// international char
142 bool InsetLatexAccent::CanDisplay()