]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFloat.h
Update sk.po
[lyx.git] / src / insets / InsetFloat.h
index b1500f9a0ed99d9d17ea3e0ecdf57bdd59ce2a4d..e05f5678e2f2311dcc189248c47d9902d2ba4d8d 100644 (file)
@@ -4,8 +4,8 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Jürgen Vigna
- * \author Lars Gullik Bjønnes
+ * \author Jürgen Vigna
+ * \author Lars Gullik Bjønnes
  *
  * Full author contact details are available in file CREDITS.
  */
 #ifndef INSET_FLOAT_H
 #define INSET_FLOAT_H
 
-#include "InsetCollapsable.h"
+#include "InsetCaptionable.h"
 
 
 namespace lyx {
 
-class InsetFloatParams {
+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;
        ///
@@ -47,31 +51,31 @@ public:
 /////////////////////////////////////////////////////////////////////////
 
 /// Used for "floating" objects like tables, figures etc.
-class InsetFloat : public InsetCollapsable
+class InsetFloat : public InsetCaptionable
 {
 public:
-       ///
-       InsetFloat(Buffer const &, std::string const &);
-       ///
-       ~InsetFloat();
-
+       InsetFloat(Buffer * buffer, std::string params_str);
        ///
        static void string2params(std::string const &, InsetFloatParams &);
        ///
        static std::string params2string(InsetFloatParams const &);
        ///
-       void setWide(bool w, BufferParams const &, bool update_label = true);
+       void setWide(bool w, bool update_label = true);
        ///
-       void setSideways(bool s, BufferParams const &, bool update_label = true);
+       void setSideways(bool s, bool update_label = true);
        ///
-       void setSubfloat(bool s, BufferParams const &, bool update_label = true);
+       void setSubfloat(bool s, bool update_label = true);
        ///
-       void setNewLabel(BufferParams const &);
+       void setNewLabel();
        ///
        InsetFloatParams const & params() const { return params_; }
+       ///
+       bool allowsCaptionVariation(std::string const &) const;
 private:
        ///
-       docstring name() const { return name_; }
+       void setCaptionType(std::string const & type);
+       ///
+       docstring layoutName() const;
        ///
        docstring toolTip(BufferView const & bv, int x, int y) const;
        ///
@@ -83,37 +87,34 @@ private:
        ///
        InsetCode lyxCode() const { return FLOAT_CODE; }
        ///
-       int latex(odocstream &, OutputParams const &) const;
+       void latex(otexstream &, OutputParams const &) const;
        ///
-       int plaintext(odocstream &, OutputParams const &) const;
+       int plaintext(odocstringstream & ods, OutputParams const & op,
+                     size_t max_length = INT_MAX) const;
        ///
        int docbook(odocstream &, OutputParams const &) const;
        ///
-       docstring editMessage() const;
+       docstring xhtml(XHTMLStream &, OutputParams const &) const;
        ///
        bool insetAllowed(InsetCode) const;
-       /** returns true if, when outputing LaTeX, font changes should
+       /** returns false if, when outputing LaTeX, font changes should
            be closed before generating this inset. This is needed for
            insets that may contain several paragraphs */
-       bool noFontChange() const { return true; }
-       ///
-       bool showInsetDialog(BufferView *) const;
+       bool inheritFont() const { return false; }
        ///
        bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
-       // Update the counters of this inset and of its contents
-       void updateLabels(ParIterator const &);
+       ///
+       bool hasSubCaptions(ParIterator const & it) const;
        ///
        void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
        Inset * clone() const { return new InsetFloat(*this); }
+       /// Is the content of this inset part of the immediate (visible) text sequence?
+       bool isPartOfTextSequence() const { return false; }
        ///
-       docstring getCaption(OutputParams const &) const;
-       ///
-       docstring getCaptionText(OutputParams const &) const;
-       ///
+       TexString getCaption(OutputParams const &) const;
+
        InsetFloatParams params_;
-       ///
-       docstring name_;
 };