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 (\-)
31 /// Ligature break point (\textcompwordmark)
35 /// End of sentence punctuation (\@)
39 /// Protected Separator
47 InsetSpecialChar(Kind k);
51 int ascent(BufferView *, LyXFont const &) const;
53 int descent(BufferView *, LyXFont const &) const;
55 int width(BufferView *, LyXFont const &) const;
57 void draw(BufferView *, LyXFont const &, int, float &, bool) const;
59 void write(Buffer const *, std::ostream &) const;
60 /// Will not be used when lyxf3
61 void read(Buffer const *, LyXLex & lex);
63 int latex(Buffer const *, std::ostream &,
64 bool fragile, bool free_spc) const;
66 int ascii(Buffer const *, std::ostream &, int linelen) const;
68 int linuxdoc(Buffer const *, std::ostream &) const;
70 int docBook(Buffer const *, std::ostream &) const;
72 virtual Inset * clone(Buffer const &, bool same_id = false) const;
74 Inset::Code lyxCode() const
76 return Inset::SPECIALCHAR_CODE;
78 /// We don't need \begin_inset and \end_inset
79 bool directWrite() const
84 void validate(LaTeXFeatures &) const;
86 /// And which kind is this?