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
26 /// Used to insert special chars
27 class InsetSpecialChar : public Inset {
30 /// The different kinds of special chars we support
32 /// Optional hyphenation point (\-)
34 /// Ligature break point (\textcompwordmark)
38 /// End of sentence punctuation (\@)
42 /// Protected Separator
50 InsetSpecialChar(Kind k);
54 int ascent(BufferView *, LyXFont const &) const;
56 int descent(BufferView *, LyXFont const &) const;
58 int width(BufferView *, LyXFont const &) const;
60 void draw(BufferView *, LyXFont const &, int, float &, bool) const;
62 void write(Buffer const *, std::ostream &) const;
63 /// Will not be used when lyxf3
64 void read(Buffer const *, LyXLex & lex);
66 int latex(Buffer const *, std::ostream &,
67 bool fragile, bool free_spc) const;
69 int ascii(Buffer const *, std::ostream &, int linelen) const;
71 int linuxdoc(Buffer const *, std::ostream &) const;
73 int docbook(Buffer const *, std::ostream &, bool mixcont) const;
75 virtual Inset * clone(Buffer const &, bool same_id = false) const;
77 Inset::Code lyxCode() const
79 return Inset::SPECIALCHAR_CODE;
81 /// We don't need \begin_inset and \end_inset
82 bool directWrite() const
87 void validate(LaTeXFeatures &) const;
89 // should this inset be handled like a normal charater
91 /// is this equivalent to a letter?
92 bool isLetter() const;
93 /// is this equivalent to a space (which is BTW different from
96 // should we break lines after this inset?
97 bool isLineSeparator() const;
99 /// And which kind is this?