]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetWrap.h
This is intended to be a pure renaming of the Inset::name() routine,
[lyx.git] / src / insets / InsetWrap.h
index 9bf84475e35da40e94eae91042d65eb9b8ec4761..bdd084b0ef98cfaaaf89d72ad8a5e15cab6132b4 100644 (file)
@@ -13,8 +13,7 @@
 #define INSETWRAP_H
 
 #include "InsetCollapsable.h"
-#include "lyxlength.h"
-#include "MailInset.h"
+#include "Length.h"
 
 
 namespace lyx {
@@ -25,14 +24,18 @@ public:
        ///
        void write(std::ostream &) const;
        ///
-       void read(LyXLex &);
+       void read(Lexer &);
 
        ///
        std::string type;
        ///
+       int lines;
+       ///
        std::string placement;
        ///
-       LyXLength width;
+       Length overhang;
+       ///
+       Length width;
 };
 
 
@@ -41,71 +44,53 @@ 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, LyXLex & lex);
-       ///
-       void validate(LaTeXFeatures & features) const;
-       ///
-       InsetBase::Code lyxCode() const { return InsetBase::WRAP_CODE; }
-       ///
-       int latex(Buffer const &, odocstream &,
-                 OutputParams const &) const;
+       InsetWrapParams const & params() const { return params_; }
        ///
-       int plaintext(Buffer const &, odocstream &,
-                     OutputParams const &) const;
+       static void string2params(std::string const &, InsetWrapParams &);
        ///
-       int docbook(Buffer const &, odocstream &,
-                   OutputParams const &) const;
+       static std::string params2string(InsetWrapParams const &);
+private:
        ///
-       virtual docstring const editMessage() const;
+       void write(std::ostream & os) const;
        ///
-       bool insetAllowed(InsetBase::Code) const;
+       void read(Lexer & lex);
        ///
-       void addToToc(TocList &, Buffer const &) const;
+       void validate(LaTeXFeatures & features) const;
        ///
-       bool showInsetDialog(BufferView *) const;
+       InsetCode lyxCode() const { return WRAP_CODE; }
        ///
-       InsetWrapParams const & params() const { return params_; }
+       docstring toolTip(BufferView const & bv, int x, int y) const;
        ///
-       bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
-protected:
+       void latex(otexstream &, OutputParams const &) const;
        ///
-       virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
-private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
-
+       int plaintext(odocstream &, OutputParams const &) const;
        ///
-       InsetWrapParams params_;
-};
-
-
-class InsetWrapMailer : public MailInset {
-public:
+       int docbook(odocstream &, OutputParams const &) const;
        ///
-       InsetWrapMailer(InsetWrap & inset);
+       docstring xhtml(XHTMLStream &, OutputParams const &) const;
        ///
-       virtual InsetBase & inset() const { return inset_; }
+       bool insetAllowed(InsetCode) const;
        ///
-       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