]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFloat.h
Fix mis-nomer
[lyx.git] / src / insets / InsetFloat.h
index d0e1afaa8d7de5a89e998c98d86eef70a805fc7f..f146e11fac20ba989028b59a421d214eb9d1156f 100644 (file)
 #ifndef INSET_FLOAT_H
 #define INSET_FLOAT_H
 
-#include "InsetCollapsable.h"
+#include "InsetCaptionable.h"
 
 
 namespace lyx {
 
+struct TexString;
+
+
 class InsetFloatParams
 {
 public:
        ///
-       InsetFloatParams() : wide(false), sideways(false), subfloat(false) {}
+       InsetFloatParams() : type("senseless"), wide(false), sideways(false), subfloat(false) {}
        ///
        void write(std::ostream & os) const;
        ///
@@ -48,12 +51,10 @@ public:
 /////////////////////////////////////////////////////////////////////////
 
 /// Used for "floating" objects like tables, figures etc.
-class InsetFloat : public InsetCollapsable
+class InsetFloat : public InsetCaptionable
 {
 public:
-       ///
        InsetFloat(Buffer * buffer, std::string params_str);
-
        ///
        static void string2params(std::string const &, InsetFloatParams &);
        ///
@@ -71,6 +72,8 @@ public:
        ///
        bool allowsCaptionVariation(std::string const &) const;
 private:
+       ///
+       void setCaptionType(std::string const & type);
        ///
        docstring layoutName() const;
        ///
@@ -101,16 +104,14 @@ private:
        ///
        bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
        ///
-       void addToToc(DocIterator const & di, bool output_active) const;
-       /// Update the counters of this inset and of its contents
-       void updateBuffer(ParIterator const &, UpdateType);
+       bool hasSubCaptions(ParIterator const & it) const;
        ///
        void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
        Inset * clone() const { return new InsetFloat(*this); }
        ///
-       docstring getCaption(OutputParams const &) const;
-       ///
+       TexString getCaption(OutputParams const &) const;
+
        InsetFloatParams params_;
 };