]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNewpage.h
InsetInfo: enable inset dissolve
[lyx.git] / src / insets / InsetNewpage.h
index 96479bbef65693b0e257397621e7eb9fc5f7eda0..51f640a09700b1483b1feb8fe2f4fb939bf89e3e 100644 (file)
@@ -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.
  */
 #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