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 InsetCode lyxCode() const override { return NEWPAGE_CODE; }
60 void metrics(MetricsInfo &, Dimension &) const override;
62 void draw(PainterInfo & pi, int x, int y) const override;
64 void latex(otexstream &, OutputParams const &) const override;
66 int plaintext(odocstringstream & ods, OutputParams const & op,
67 size_t max_length = INT_MAX) const override;
69 void docbook(XMLStream &, OutputParams const &) const override;
71 docstring xhtml(XMLStream &, OutputParams const &) const override;
73 void read(Lexer & lex) override;
75 void write(std::ostream & os) const override;
77 RowFlags rowFlags() const override { return Display; }
79 docstring insetLabel() const;
81 ColorCode ColorName() const;
83 std::string contextMenuName() const override;
85 Inset * clone() const override { return new InsetNewpage(*this); }
87 void doDispatch(Cursor & cur, FuncRequest & cmd) override;
89 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override;
92 InsetNewpageParams params_;
97 #endif // INSET_NEWPAGE_H