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