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_NEWPAGE_H
13 #define INSET_NEWPAGE_H
17 #include "support/gettext.h"
22 class InsetNewpage : public Inset {
26 InsetCode lyxCode() const { return NEWPAGE_CODE; }
28 void metrics(MetricsInfo &, Dimension &) const;
30 void draw(PainterInfo & pi, int x, int y) const;
32 int latex(odocstream &, OutputParams const &) const;
34 int plaintext(odocstream &, OutputParams const &) const;
36 int docbook(odocstream &, OutputParams const &) const;
38 void read(Lexer & lex);
40 void write(std::ostream & os) const;
41 /// We don't need \begin_inset and \end_inset
42 bool directWrite() const { return true; }
44 DisplayType display() const { return AlignCenter; }
46 virtual docstring insetLabel() const { return _("New Page"); }
48 virtual std::string getCmdName() const { return "\\newpage"; }
50 virtual ColorCode ColorName() const { return Color_newpage; }
53 Inset * clone() const { return new InsetNewpage(*this); }
57 class InsetPagebreak : public InsetNewpage {
61 docstring insetLabel() const { return _("Page Break"); }
63 std::string getCmdName() const { return "\\pagebreak"; }
65 ColorCode ColorName() const { return Color_pagebreak; }
68 virtual Inset * clone() const { return new InsetPagebreak(*this); }
72 class InsetClearPage : public InsetNewpage {
76 docstring insetLabel() const { return _("Clear Page"); }
78 std::string getCmdName() const { return "\\clearpage"; }
81 virtual Inset * clone() const { return new InsetClearPage(*this); }
85 class InsetClearDoublePage : public InsetNewpage {
87 InsetClearDoublePage() {}
89 docstring insetLabel() const { return _("Clear Double Page"); }
91 std::string getCmdName() const { return "\\cleardoublepage"; }
94 virtual Inset * clone() const { return new InsetClearDoublePage(*this); }
99 #endif // INSET_NEWPAGE_H