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/docstring.h"
18 #include "support/gettext.h"
23 class InsetNewpage : public Inset
29 InsetCode lyxCode() const { return NEWPAGE_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; }
47 DisplayType display() const { return AlignCenter; }
49 docstring insetLabel() const { return _("New Page"); }
51 std::string getCmdName() const { return "\\newpage"; }
53 ColorCode ColorName() const { return Color_newpage; }
56 Inset * clone() const { return new InsetNewpage(*this); }
60 class InsetPagebreak : public InsetNewpage
66 docstring insetLabel() const { return _("Page Break"); }
68 std::string getCmdName() const { return "\\pagebreak"; }
70 ColorCode ColorName() const { return Color_pagebreak; }
73 Inset * clone() const { return new InsetPagebreak(*this); }
77 class InsetClearPage : public InsetNewpage
83 docstring insetLabel() const { return _("Clear Page"); }
85 std::string getCmdName() const { return "\\clearpage"; }
89 Inset * clone() const { return new InsetClearPage(*this); }
93 class InsetClearDoublePage : public InsetNewpage
97 InsetClearDoublePage() {}
99 docstring insetLabel() const { return _("Clear Double Page"); }
101 std::string getCmdName() const { return "\\cleardoublepage"; }
105 Inset * clone() const { return new InsetClearDoublePage(*this); }
110 #endif // INSET_NEWPAGE_H