#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;
///
/////////////////////////////////////////////////////////////////////////
/// 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 &);
///
void setNewLabel();
///
InsetFloatParams const & params() const { return params_; }
+ ///
+ bool allowsCaptionVariation(std::string const &) const;
private:
///
- docstring name() const;
+ void setCaptionType(std::string const & type);
+ ///
+ docstring layoutName() const;
///
docstring toolTip(BufferView const & bv, int x, int y) 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;
///
bool inheritFont() const { return false; }
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) 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_;
};