]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetWrap.h
Embedding: display a pin at the top left corner of embedded figures
[lyx.git] / src / insets / InsetWrap.h
index a2f8d0932d1f9a322b5d0ad0a3c719615b9e802c..4a0c306a6be5470cd1180aee8109111437d9a178 100644 (file)
@@ -13,7 +13,7 @@
 #define INSETWRAP_H
 
 #include "InsetCollapsable.h"
-#include "LyXLength.h"
+#include "Length.h"
 #include "MailInset.h"
 
 
@@ -30,9 +30,13 @@ public:
        ///
        std::string type;
        ///
+       int lines;
+       ///
        std::string placement;
        ///
-       LyXLength width;
+       Length overhang;
+       ///
+       Length width;
 };
 
 
@@ -51,36 +55,42 @@ public:
        ///
        void validate(LaTeXFeatures & features) const;
        ///
-       InsetBase::Code lyxCode() const { return InsetBase::WRAP_CODE; }
+       InsetCode lyxCode() const { return WRAP_CODE; }
+       ///
+       bool isMacroScope(Buffer const &) const { return true; }
        ///
        int latex(Buffer const &, odocstream &,
-                 OutputParams const &) const;
+                 OutputParams const &) const;
        ///
        int plaintext(Buffer const &, odocstream &,
-                     OutputParams const &) const;
+                     OutputParams const &) const;
        ///
        int docbook(Buffer const &, odocstream &,
-                   OutputParams const &) const;
+                   OutputParams const &) const;
        ///
        virtual docstring const editMessage() const;
        ///
-       bool insetAllowed(InsetBase::Code) const;
-       ///
-       void addToToc(TocList &, Buffer const &) const;
+       bool insetAllowed(InsetCode) const;
        ///
        bool showInsetDialog(BufferView *) const;
        ///
        InsetWrapParams const & params() const { return params_; }
        ///
        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:
        ///
        virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
+       ///
+       virtual docstring name() const { return name_; }
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
+       virtual Inset * clone() const;
 
        ///
        InsetWrapParams params_;
+       ///
+       docstring name_;
 };
 
 
@@ -89,7 +99,7 @@ public:
        ///
        InsetWrapMailer(InsetWrap & inset);
        ///
-       virtual InsetBase & inset() const { return inset_; }
+       virtual Inset & inset() const { return inset_; }
        ///
        virtual std::string const & name() const { return name_; }
        ///