4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS
12 #ifndef INSET_NEWLINE_H
13 #define INSET_NEWLINE_H
18 class InsetNewline : public Inset {
23 virtual Inset * clone(Buffer const &, bool = false) const {
24 return new InsetNewline;
27 Inset::Code lyxCode() const { return Inset::NEWLINE_CODE; }
29 virtual int ascent(BufferView *, LyXFont const &) const;
31 virtual int descent(BufferView *, LyXFont const &) const;
33 virtual int width(BufferView *, LyXFont const &) const;
35 virtual void draw(BufferView *, LyXFont const &,
36 int baseline, float & x) const;
38 virtual int latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const;
40 virtual int ascii(Buffer const *, std::ostream &, int linelen) const;
42 virtual int linuxdoc(Buffer const *, std::ostream &) const;
44 virtual int docbook(Buffer const *, std::ostream &, bool) const;
46 virtual void read(Buffer const *, LyXLex & lex);
48 virtual void write(Buffer const * buf, std::ostream & os) const;
49 /// We don't need \begin_inset and \end_inset
50 virtual bool directWrite() const { return true; }
53 #endif // INSET_NEWLINE_H