X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Finsets%2FInsetNewpage.h;h=51f640a09700b1483b1feb8fe2f4fb939bf89e3e;hb=d6a93143ec2146210d79f58cac42f9608da86100;hp=96479bbef65693b0e257397621e7eb9fc5f7eda0;hpb=d2a4c97ab80ec3f4c2bf2a6965ee53e450e50809;p=lyx.git diff --git a/src/insets/InsetNewpage.h b/src/insets/InsetNewpage.h index 96479bbef6..51f640a097 100644 --- a/src/insets/InsetNewpage.h +++ b/src/insets/InsetNewpage.h @@ -4,7 +4,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author André Pönitz + * \author André Pönitz * * Full author contact details are available in file CREDITS. */ @@ -13,15 +13,12 @@ #define INSET_NEWPAGE_H #include "Inset.h" -#include "MailInset.h" - -#include "support/docstring.h" -#include "support/gettext.h" namespace lyx { -class InsetNewpageParams { +class InsetNewpageParams +{ public: /// The different kinds of spaces we support enum Kind { @@ -50,10 +47,13 @@ class InsetNewpage : public Inset public: /// InsetNewpage(); - /// - explicit - InsetNewpage(InsetNewpageParams par); + explicit InsetNewpage(InsetNewpageParams const & par); + /// + static void string2params(std::string const &, InsetNewpageParams &); + /// + static std::string params2string(InsetNewpageParams const &); +private: /// InsetNewpageParams params() const { return params_; } /// @@ -63,12 +63,15 @@ public: /// void draw(PainterInfo & pi, int x, int y) const; /// - int latex(odocstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const; /// - int plaintext(odocstream &, OutputParams const &) const; + int plaintext(odocstringstream & ods, OutputParams const & op, + size_t max_length = INT_MAX) const; /// int docbook(odocstream &, OutputParams const &) const; /// + docstring xhtml(XHTMLStream &, OutputParams const &) const; + /// void read(Lexer & lex); /// void write(std::ostream & os) const; @@ -79,38 +82,16 @@ public: /// ColorCode ColorName() const; /// - virtual docstring contextMenu(BufferView const & bv, int x, int y) const; -private: + std::string contextMenuName() const; /// Inset * clone() const { return new InsetNewpage(*this); } /// void doDispatch(Cursor & cur, FuncRequest & cmd); /// bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; - /// - InsetNewpageParams params_; -}; - -class InsetNewpageMailer : public MailInset { -public: - /// - InsetNewpageMailer(InsetNewpage & inset); - /// - virtual Inset & inset() const { return inset_; } - /// - virtual std::string const & name() const { return name_; } - /// - virtual std::string const inset2string(Buffer const &) const; /// - static void string2params(std::string const &, InsetNewpageParams &); - /// - static std::string const params2string(InsetNewpageParams const &); -private: - /// - static std::string const name_; - /// - InsetNewpage & inset_; + InsetNewpageParams params_; }; } // namespace lyx