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
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);
38 int ascent(Painter &, LyXFont const &) const;
40 int descent(Painter &, LyXFont const &) const;
42 int width(Painter &, LyXFont const &) const;
44 void draw(Painter &, LyXFont const &, int baseline, float & x) const;
47 int Ascent(LyXFont const & font) const;
49 int Descent(LyXFont const & font) const;
51 int Width(LyXFont const & font) const;
53 void Draw(LyXFont, LyXScreen & scr, int baseline, float & x);
56 int Lbearing(LyXFont const & font) const;
58 int Rbearing(LyXFont const & font) const;
61 bool DisplayISO8859_9(Painter &, LyXFont const & font,
62 int baseline, float & x) const;
65 bool DisplayISO8859_9(LyXFont font, LyXScreen & scr,
66 int baseline, float & x);
69 void Write(ostream &);
71 void Read(LyXLex & lex);
73 int Latex(ostream &, signed char fragile);
75 int Latex(string & file, signed char fragile);
77 int Linuxdoc(string & file);
79 int DocBook(string & file);
81 bool Deletable() const;
83 bool DirectWrite() const;
85 Inset * Clone() const;
87 Inset::Code LyxCode()const;
89 inline bool CanDisplay();
90 /// all the accent types
136 friend ostream & operator<<(ostream &, ACCENT_TYPES);
137 /// Check if we know the modifier and can display it ok on screen.
138 void checkContents();
141 /// can display as proper char
144 ACCENT_TYPES modtype;
146 /// remove dot from 'i' and 'j' or transform l, L into lslash, LSLaSH
148 /// add something to ascent - accent at the top
150 /// add something to descent - underlined char
152 /// international char
156 bool InsetLatexAccent::CanDisplay()