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
20 class InsetNewpageParams
23 /// The different kinds of spaces we support
35 InsetNewpageParams() : kind(NEWPAGE) {}
37 void write(std::ostream & os) const;
39 void read(Lexer & lex);
45 class InsetNewpage : public Inset
51 explicit InsetNewpage(InsetNewpageParams const & par);
53 static void string2params(std::string const &, InsetNewpageParams &);
55 static std::string params2string(InsetNewpageParams const &);
58 InsetNewpageParams params() const { return params_; }
60 InsetCode lyxCode() const { return NEWPAGE_CODE; }
62 void metrics(MetricsInfo &, Dimension &) const;
64 void draw(PainterInfo & pi, int x, int y) const;
66 int latex(odocstream &, OutputParams const &) const;
68 int plaintext(odocstream &, OutputParams const &) const;
70 int docbook(odocstream &, OutputParams const &) const;
72 docstring xhtml(odocstream &, OutputParams const &) const;
74 void read(Lexer & lex);
76 void write(std::ostream & os) const;
78 DisplayType display() const { return AlignCenter; }
80 docstring insetLabel() const;
82 ColorCode ColorName() const;
84 docstring contextMenu(BufferView const & bv, int x, int y) const;
86 Inset * clone() const { return new InsetNewpage(*this); }
88 void doDispatch(Cursor & cur, FuncRequest & cmd);
90 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
93 InsetNewpageParams params_;
98 #endif // INSET_NEWPAGE_H