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/docstring.h"
18 #include "support/gettext.h"
23 class InsetNewline : public Inset
29 InsetCode lyxCode() const { return NEWLINE_CODE; }
31 void metrics(MetricsInfo &, Dimension &) const;
33 void draw(PainterInfo & pi, int x, int y) const;
35 int latex(odocstream &, OutputParams const &) const;
37 int plaintext(odocstream &, OutputParams const &) const;
39 int docbook(odocstream &, OutputParams const &) const;
41 void read(Lexer & lex);
43 void write(std::ostream & os) const;
44 /// We don't need \begin_inset and \end_inset
45 bool directWrite() const { return true; }
46 /// is this equivalent to a space (which is BTW different from
47 /// a line separator)?
50 docstring insetLabel() const { return docstring(); }
52 std::string getLyXName() const { return "\\newline"; }
54 std::string getCmdName() const { return "\\\\"; }
56 ColorCode ColorName() const { return Color_eolmarker; }
60 Inset * clone() const { return new InsetNewline(*this); }
64 class InsetLinebreak : public InsetNewline
70 docstring insetLabel() const { return _("line break"); }
72 std::string getLyXName() const { return "\\linebreak"; }
74 std::string getCmdName() const { return "\\linebreak{}"; }
76 ColorCode ColorName() const { return Color_pagebreak; }
80 Inset * clone() const { return new InsetLinebreak(*this); }
86 #endif // INSET_NEWLINE_H