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
17 #include "support/gettext.h"
22 class InsetNewline : public Inset {
27 InsetCode lyxCode() const { return NEWLINE_CODE; }
29 void metrics(MetricsInfo &, Dimension &) const;
31 virtual void draw(PainterInfo & pi, int x, int y) const;
33 int latex(Buffer const &, odocstream &, OutputParams const &) const;
35 int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
37 int docbook(Buffer const &, odocstream &, OutputParams const &) const;
39 virtual void read(Buffer const &, Lexer & lex);
41 virtual void write(Buffer const &, std::ostream & os) const;
42 /// We don't need \begin_inset and \end_inset
43 virtual bool directWrite() const { return true; }
44 /// is this equivalent to a space (which is BTW different from
48 virtual docstring insetLabel() const { return docstring(); }
50 virtual std::string getLyXName() const { return "\\newline"; }
52 virtual std::string getCmdName() const { return "\\\\"; }
54 virtual ColorCode ColorName() const { return Color_eolmarker; }
57 virtual Inset * clone() const
59 return new InsetNewline;
63 class InsetLinebreak : public InsetNewline {
67 docstring insetLabel() const { return _("line break"); }
69 std::string getLyXName() const { return "\\linebreak"; }
71 std::string getCmdName() const { return "\\linebreak{}"; }
73 ColorCode ColorName() const { return Color_pagebreak; }
76 virtual Inset * clone() const
78 return new InsetLinebreak;
85 #endif // INSET_NEWLINE_H