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(odocstream &, OutputParams const &) const;
35 int plaintext(odocstream &, OutputParams const &) const;
37 int docbook(odocstream &, OutputParams const &) const;
39 virtual void read(Lexer & lex);
41 virtual void write(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
45 /// a line separator)?
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 Inset * clone() const { return new InsetNewline(*this); }
60 class InsetLinebreak : public InsetNewline {
64 docstring insetLabel() const { return _("line break"); }
66 std::string getLyXName() const { return "\\linebreak"; }
68 std::string getCmdName() const { return "\\linebreak{}"; }
70 ColorCode ColorName() const { return Color_pagebreak; }
73 virtual Inset * clone() const { return new InsetLinebreak(*this); }
79 #endif // INSET_NEWLINE_H