]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetWrap.h
Pass XHTMLStream by reference. Problem found by coverity.
[lyx.git] / src / insets / InsetWrap.h
index f56bbf19878cca2879f8b0a7dda5292602be74fc..ce6b73eb03539cfdd0338712f5edb6afc34b64b5 100644 (file)
@@ -14,7 +14,6 @@
 
 #include "InsetCollapsable.h"
 #include "Length.h"
-#include "MailInset.h"
 
 
 namespace lyx {
@@ -30,8 +29,12 @@ public:
        ///
        std::string type;
        ///
+       int lines;
+       ///
        std::string placement;
        ///
+       Length overhang;
+       ///
        Length width;
 };
 
@@ -41,75 +44,54 @@ public:
 class InsetWrap : public InsetCollapsable {
 public:
        ///
-       InsetWrap(BufferParams const &, std::string const &);
+       InsetWrap(Buffer *, std::string const &);
        ///
        ~InsetWrap();
        ///
-       void write(Buffer const & buf, std::ostream & os) const;
-       ///
-       void read(Buffer const & buf, Lexer & lex);
-       ///
-       void validate(LaTeXFeatures & features) const;
+       InsetWrapParams const & params() const { return params_; }
        ///
-       Inset::Code lyxCode() const { return Inset::WRAP_CODE; }
+       static void string2params(std::string const &, InsetWrapParams &);
        ///
-       int latex(Buffer const &, odocstream &,
-                 OutputParams const &) const;
+       static std::string params2string(InsetWrapParams const &);
+private:
        ///
-       int plaintext(Buffer const &, odocstream &,
-                     OutputParams const &) const;
+       void write(std::ostream & os) const;
        ///
-       int docbook(Buffer const &, odocstream &,
-                   OutputParams const &) const;
+       void read(Lexer & lex);
        ///
-       virtual docstring const editMessage() const;
+       void validate(LaTeXFeatures & features) const;
        ///
-       bool insetAllowed(Inset::Code) const;
+       InsetCode lyxCode() const { return WRAP_CODE; }
        ///
-       bool showInsetDialog(BufferView *) const;
+       docstring toolTip(BufferView const & bv, int x, int y) const;
        ///
-       InsetWrapParams const & params() const { return params_; }
+       void latex(otexstream &, OutputParams const &) const;
        ///
-       bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
-       // Update the counters of this inset and of its contents
-       virtual void updateLabels(Buffer const &, ParIterator const &);
-protected:
+       int plaintext(odocstringstream & ods, OutputParams const & op,
+                     size_t max_length = INT_MAX) const;
        ///
-       virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
+       int docbook(odocstream &, OutputParams const &) const;
        ///
-       virtual docstring name() const { return name_; }
-private:
-       virtual Inset * clone() const;
-
+       docstring xhtml(XHTMLStream &, OutputParams const &) const;
        ///
-       InsetWrapParams params_;
+       bool insetAllowed(InsetCode) const;
        ///
-       docstring name_;
-};
-
-
-class InsetWrapMailer : public MailInset {
-public:
-       ///
-       InsetWrapMailer(InsetWrap & inset);
-       ///
-       virtual Inset & inset() const { return inset_; }
-       ///
-       virtual std::string const & name() const { return name_; }
+       bool showInsetDialog(BufferView *) const;
        ///
-       virtual std::string const inset2string(Buffer const &) const;
+       bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
+       /// Update the counters of this inset and of its contents
+       void updateBuffer(ParIterator const &, UpdateType);
        ///
-       static void string2params(std::string const &, InsetWrapParams &);
+       void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
-       static std::string const params2string(InsetWrapParams const &);
-private:
+       docstring layoutName() const;
        ///
-       static std::string const name_;
+       Inset * clone() const { return new InsetWrap(*this); }
+
        ///
-       InsetWrap & inset_;
+       InsetWrapParams params_;
 };
 
-
 } // namespace lyx
 
 #endif