]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetInclude.h
Fix for bug 4135
[lyx.git] / src / insets / InsetInclude.h
index cc4acc5a82ae80670305434290f948d3aba34145..2f834d4aa6e78a90f546e3e61bdd549f3ef2c21b 100644 (file)
 #ifndef INSET_INCLUDE_H
 #define INSET_INCLUDE_H
 
-#include "InsetBase.h"
+#include "Inset.h"
 #include "InsetCommandParams.h"
 #include "RenderButton.h"
 #include "MailInset.h"
+#include "Counters.h"
 
 #include "support/FileName.h"
 
@@ -30,7 +31,7 @@ class RenderMonitoredPreview;
 
 
 /// for including tex/lyx files
-class InsetInclude : public InsetBase {
+class InsetInclude : public Inset {
 public:
        ///
        InsetInclude(InsetCommandParams const &);
@@ -41,13 +42,13 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const;
        ///
-       virtual bool display() const;
+       virtual DisplayType display() const;
 
        /// get the parameters
        InsetCommandParams const & params() const;
 
        ///
-       InsetBase::Code lyxCode() const { return InsetBase::INCLUDE_CODE; }
+       Inset::Code lyxCode() const { return Inset::INCLUDE_CODE; }
        /** Fills \c list
         *  \param buffer the Buffer containing this inset.
         *  \param list the list of labels in the child buffer.
@@ -82,29 +83,29 @@ public:
        void read(Buffer const &, Lexer &);
        ///
        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;
        ///
        void validate(LaTeXFeatures &) const;
        ///
        void addPreview(graphics::PreviewLoader &) const;
        ///
-       void addToToc(TocList &, Buffer const &) const;
-       ///
-       void updateLabels(Buffer const & buffer) const;
+       void addToToc(TocList &, Buffer const &, ParConstIterator const &) const;
        ///
        bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
+       ///
+       void updateLabels(Buffer const & buffer, ParIterator const &) const;
 protected:
        InsetInclude(InsetInclude const &);
        ///
        virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
+       virtual std::auto_ptr<Inset> doClone() const;
 
        /** Slot receiving a signal that the external file has changed
         *  and the preview should be regenerated.
@@ -133,6 +134,7 @@ private:
        /// cache
        mutable bool set_label_;
        mutable RenderButton button_;
+       mutable docstring listings_label_;
 };
 
 
@@ -141,7 +143,7 @@ public:
        ///
        InsetIncludeMailer(InsetInclude & inset);
        ///
-       virtual InsetBase & inset() const { return inset_; }
+       virtual Inset & inset() const { return inset_; }
        ///
        virtual std::string const & name() const { return name_; }
        ///