2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1997 Asger Alstrup
9 * ====================================================== */
11 #ifndef INSET_SPECIALCHAR_H
12 #define INSET_SPECIALCHAR_H
23 /// Used to insert special chars
24 class InsetSpecialChar : public Inset {
27 /// The different kinds of special chars we support
29 /// Optional hyphenation point (\-)
33 /// End of sentence punctuation (\@)
41 /// Protected Separator
48 InsetSpecialChar(Kind k);
50 int ascent(Painter &, LyXFont const &) const;
52 int descent(Painter &, LyXFont const &) const;
54 int width(Painter &, LyXFont const &) const;
56 void draw(Painter &, LyXFont const &, int baseline, float & x) const;
58 void Write(ostream &) const;
59 /// Will not be used when lyxf3
60 void Read(LyXLex & lex);
62 int Latex(ostream &, signed char fragile, bool free_spc) const;
63 #ifndef USE_OSTREAM_ONLY
65 int Latex(string & file, signed char fragile, bool free_spc) const;
67 int Linuxdoc(string & file) const;
69 int DocBook(string & file) const;
72 int Linuxdoc(ostream &) const;
74 int DocBook(ostream &) const;
77 Inset * Clone() const;
79 Inset::Code LyxCode() const
81 return Inset::SPECIALCHAR_CODE;
83 /// We don't need \begin_inset and \end_inset
84 bool DirectWrite() const
89 void Validate(LaTeXFeatures &) const;
91 /// And which kind is this?