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 InsetOld {
29 /// The different kinds of special chars we support
31 /// Optional hyphenation point (\-)
33 /// Ligature break point (\textcompwordmark)
37 /// End of sentence punctuation (\@)
47 InsetSpecialChar(Kind k);
51 void metrics(MetricsInfo &, Dimension &) const;
53 void draw(PainterInfo & pi, int x, int y) const;
55 void write(Buffer const &, std::ostream &) const;
56 /// Will not be used when lyxf3
57 void read(Buffer const &, LyXLex & lex);
59 int latex(Buffer const &, odocstream &,
60 OutputParams const &) const;
62 int plaintext(Buffer const &, odocstream &,
63 OutputParams const &) const;
65 int docbook(Buffer const &, odocstream &,
66 OutputParams const &) const;
67 /// the string that is passed to the TOC
68 virtual int textString(Buffer const &, odocstream &,
69 OutputParams const &) const;
71 InsetBase::Code lyxCode() const { return InsetBase::SPECIALCHAR_CODE; }
72 /// We don't need \begin_inset and \end_inset
73 bool directWrite() const { return true; }
75 void validate(LaTeXFeatures &) const;
77 // should this inset be handled like a normal charater
79 /// is this equivalent to a letter?
80 bool isLetter() const;
81 // should we break lines after this inset?
82 bool isLineSeparator() const;
84 virtual std::auto_ptr<InsetBase> doClone() const;
86 /// And which kind is this?