3 * \file InsetCaptionable.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Alejandro Aguilar Sierra
9 * \author Lars Gullik Bjønnes
10 * \author Guillaume Munch
12 * Full author contact details are available in file CREDITS.
15 #ifndef INSET_CAPTIONABLE_H
16 #define INSET_CAPTIONABLE_H
18 #include "InsetCollapsible.h"
26 class InsetCaptionable : public InsetCollapsible
29 InsetCaptionable(Buffer * buffer, std::string const & type = "senseless")
30 : InsetCollapsible(buffer), caption_type_(type) {}
32 std::string const & captionType() const { return caption_type_; }
34 docstring floatName(std::string const & type) const;
38 InsetCaption const * getCaptionInset() const;
40 InsetLabel const * getLabelInset() const;
42 docstring getCaptionText(OutputParams const &) const;
44 docstring getCaptionHTML(OutputParams const &) const;
46 docstring getCaptionDocBook(OutputParams const &) const;
48 virtual void setCaptionType(std::string const & type);
49 /// are our captions subcaptions?
50 virtual bool hasSubCaptions(ParIterator const &) const { return false; }
52 void addToToc(DocIterator const & di, bool output_active,
53 UpdateType utype, TocBackend & backend) const override;
54 /// Update the counters of this inset and of its contents
55 void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override;
57 bool insetAllowed(InsetCode) const override;
60 std::string caption_type_;
66 #endif // INSET_CAPTIONABLE_H