3 * \file InsetPagebreak.h
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_PAGEBREAK_H
13 #define INSET_PAGEBREAK_H
22 class InsetPagebreak : public Inset {
26 Inset::Code lyxCode() const { return Inset::PAGEBREAK_CODE; }
28 bool metrics(MetricsInfo &, Dimension &) const;
30 void draw(PainterInfo & pi, int x, int y) const;
32 int latex(Buffer const &, odocstream &,
33 OutputParams const &) const;
35 int plaintext(Buffer const &, odocstream &,
36 OutputParams const &) const;
38 int docbook(Buffer const &, odocstream &,
39 OutputParams const &) const;
41 void read(Buffer const &, Lexer & lex);
43 virtual void write(Buffer const & buf, 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 virtual docstring insetLabel() const { return _("Page Break"); }
51 virtual std::string getCmdName() const { return "\\newpage"; }
54 virtual Inset * clone() const
56 return new InsetPagebreak;
61 class InsetClearPage : public InsetPagebreak {
65 docstring insetLabel() const { return _("Clear Page"); }
67 std::string getCmdName() const { return "\\clearpage"; }
70 virtual Inset * clone() const
72 return new InsetClearPage;
77 class InsetClearDoublePage : public InsetPagebreak {
79 InsetClearDoublePage() {}
81 docstring insetLabel() const { return _("Clear Double Page"); }
83 std::string getCmdName() const { return "\\cleardoublepage"; }
86 virtual Inset * clone() const
88 return new InsetClearDoublePage;
94 #endif // INSET_PAGEBREAK_H