3 * \file InsetSpecialChar.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Asger Alstrup Nielsen
8 * \author Jean-Marc Lasgouttes
9 * \author Lars Gullik Bjønnes
11 * Full author contact details are available in file CREDITS.
14 #ifndef INSET_SPECIALCHAR_H
15 #define INSET_SPECIALCHAR_H
25 /// Used to insert special chars
26 class InsetSpecialChar : public Inset {
29 /// The different kinds of special chars we support
31 /// Optional hyphenation point (\-)
33 /// Ligature break point (\textcompwordmark)
37 /// End of sentence punctuation (\@)
48 InsetSpecialChar() : Inset(0) {}
50 explicit InsetSpecialChar(Kind k);
54 void metrics(MetricsInfo &, Dimension &) const;
56 void draw(PainterInfo & pi, int x, int y) const;
58 void write(std::ostream &) const;
59 /// Will not be used when lyxf3
60 void read(Lexer & lex);
62 int latex(odocstream &, OutputParams const &) const;
64 int plaintext(odocstream &, OutputParams const &) const;
66 int docbook(odocstream &, OutputParams const &) const;
68 docstring xhtml(XHTMLStream &, OutputParams const &) const;
69 /// the string that is passed to the TOC
70 void tocString(odocstream &) const;
72 InsetCode lyxCode() const { return SPECIALCHAR_CODE; }
73 /// We don't need \begin_inset and \end_inset
74 bool directWrite() const { return true; }
76 void validate(LaTeXFeatures &) const;
78 // should this inset be handled like a normal charater
79 bool isChar() const { return true; }
80 /// is this equivalent to a letter?
81 bool isLetter() const;
82 // should we break lines after this inset?
83 bool isLineSeparator() const;
85 Inset * clone() const { return new InsetSpecialChar(*this); };
87 /// And which kind is this?