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
22 /// Used to insert special chars
23 class InsetSpecialChar : public InsetOld {
26 /// The different kinds of special chars we support
28 /// Optional hyphenation point (\-)
30 /// Ligature break point (\textcompwordmark)
34 /// End of sentence punctuation (\@)
44 InsetSpecialChar(Kind k);
48 void metrics(MetricsInfo &, Dimension &) const;
50 void draw(PainterInfo & pi, int x, int y) const;
52 void write(Buffer const &, std::ostream &) const;
53 /// Will not be used when lyxf3
54 void read(Buffer const &, LyXLex & lex);
56 int latex(Buffer const &, std::ostream &,
57 OutputParams const &) const;
59 int plaintext(Buffer const &, lyx::odocstream &,
60 OutputParams const &) const;
62 int docbook(Buffer const &, std::ostream &,
63 OutputParams const &) const;
64 /// the string that is passed to the TOC
65 virtual int textString(Buffer const &, lyx::odocstream &,
66 OutputParams const &) const;
68 InsetBase::Code lyxCode() const { return InsetBase::SPECIALCHAR_CODE; }
69 /// We don't need \begin_inset and \end_inset
70 bool directWrite() const { return true; }
72 void validate(LaTeXFeatures &) const;
74 // should this inset be handled like a normal charater
76 /// is this equivalent to a letter?
77 bool isLetter() const;
78 // should we break lines after this inset?
79 bool isLineSeparator() const;
81 virtual std::auto_ptr<InsetBase> doClone() const;
83 /// And which kind is this?