]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFloat.h
Further cleanup of collapsable insets. The layouts are now properly read and applied.
[lyx.git] / src / insets / InsetFloat.h
index 7ab9ed336a3a0272e43097a9b6ab6c39a4fcb2b6..ee2728a768d9f86ba2ff340357e84cd02447517a 100644 (file)
@@ -49,28 +49,28 @@ public:
        ///
        ~InsetFloat();
        ///
+       docstring name() const { return name_; }
+       ///
        void write(Buffer const & buf, std::ostream & os) const;
        ///
        void read(Buffer const & buf, Lexer & lex);
        ///
        void validate(LaTeXFeatures & features) const;
        ///
-       InsetBase::Code lyxCode() const { return InsetBase::FLOAT_CODE; }
-       ///
-       virtual bool wide() const { return false; }
+       InsetCode lyxCode() const { return FLOAT_CODE; }
        ///
        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;
+       bool insetAllowed(InsetCode) const;
        /** returns true if, when outputing LaTeX, font changes should
            be closed before generating this inset. This is needed for
            insets that may contain several paragraphs */
@@ -80,20 +80,22 @@ public:
        ///
        void sideways(bool s, BufferParams const &);
        ///
-       void addToToc(TocList &, Buffer const &) const;
-       ///
        bool  showInsetDialog(BufferView *) const;
        ///
        InsetFloatParams const & params() const { return params_; }
        ///
-       bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) 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:
-       virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
+       virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
-
+       ///
+       virtual Inset * clone() const;
        ///
        InsetFloatParams params_;
+       ///
+       docstring name_;
 };
 
 
@@ -102,7 +104,7 @@ public:
        ///
        InsetFloatMailer(InsetFloat & inset);
        ///
-       virtual InsetBase & inset() const { return inset_; }
+       virtual Inset & inset() const { return inset_; }
        ///
        virtual std::string const & name() const { return name_; }
        ///