4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Lars Gullik Bjønnes
10 * Full author contact details are available in file CREDITS
17 #include "insetcollapsable.h"
20 #include <boost/signals/signal0.hpp>
24 struct InsetFloatParams {
26 InsetFloatParams() : placement("htbp"), wide(false) {}
39 class InsetFloat : public InsetCollapsable {
42 InsetFloat(BufferParams const &, string const &);
44 InsetFloat(InsetFloat const &, bool same_id = false);
48 void write(Buffer const * buf, std::ostream & os) const;
50 void read(Buffer const * buf, LyXLex & lex);
52 void validate(LaTeXFeatures & features) const;
54 Inset * clone(Buffer const &, bool same_id = false) const;
56 Inset::Code lyxCode() const { return Inset::FLOAT_CODE; }
58 int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
60 int docbook(Buffer const *, std::ostream &, bool mixcont) const;
62 string const editMessage() const;
64 bool insetAllowed(Inset::Code) const;
65 /** returns true if, when outputing LaTeX, font changes should
66 be closed before generating this inset. This is needed for
67 insets that may contain several paragraphs */
68 bool noFontChange() const { return true; }
70 string const & type() const;
72 void placement(string const & p);
74 string const & placement() const;
76 void wide(bool w, BufferParams const &);
80 void addToToc(toc::TocList &, Buffer const *) const;
82 bool showInsetDialog(BufferView *) const;
84 boost::signal0<void> hideDialog;
86 InsetFloatParams const & params() const { return params_; }
88 void writeParams(std::ostream & os) const;
90 void readParams(Buffer const * buf, LyXLex & lex);
94 InsetFloatParams params_;