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; }
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
70 return new InsetPagebreak;
75 class InsetClearPage : public InsetNewpage {
79 docstring insetLabel() const { return _("Clear Page"); }
81 std::string getCmdName() const { return "\\clearpage"; }
84 virtual Inset * clone() const
86 return new InsetClearPage;
91 class InsetClearDoublePage : public InsetNewpage {
93 InsetClearDoublePage() {}
95 docstring insetLabel() const { return _("Clear Double Page"); }
97 std::string getCmdName() const { return "\\cleardoublepage"; }
100 virtual Inset * clone() const
102 return new InsetClearDoublePage;
108 #endif // INSET_NEWPAGE_H