2 #ifndef MATH_CHARINSET_H
3 #define MATH_CHARINSET_H
5 #include "math_inset.h"
11 /** The base character inset.
15 class MathCharInset : public MathInset {
18 explicit MathCharInset(char c);
20 MathCharInset(char c, MathTextCodes t);
22 MathCharInset(char c, MathTextCodes t, bool needbs);
24 MathInset * clone() const;
26 MathTextCodes nativeCode(char c) const;
28 void metrics(MathStyles st) const;
30 void draw(Painter &, int x, int y) const;
32 void write(std::ostream &, bool fragile) const;
34 void writeHeader(std::ostream &) const;
36 void writeTrailer(std::ostream &) const;
38 void writeRaw(std::ostream &) const;
40 void writeNormal(std::ostream &) const;
47 /// identifies Charinsets
48 MathCharInset const * asCharInset() const { return this; }
50 char getChar() const { return char_; }
52 MathTextCodes code() const { return code_; }
56 void handleFont(MathTextCodes t);
61 /// the font to be used on screen
63 /// do wee need a backslash when writing LaTeX?