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
16 #include "insetcollapsable.h"
20 struct InsetFloatParams {
22 InsetFloatParams() : wide(false) {}
24 void write(std::ostream & os) const;
26 void read(LyXLex & lex);
39 class InsetFloat : public InsetCollapsable {
42 InsetFloat(BufferParams const &, string const &);
44 InsetFloat(InsetFloat const &);
46 //InsetFloat(InsetFloat const &, bool same_id);
50 virtual dispatch_result localDispatch(FuncRequest const & cmd);
52 void write(Buffer const * buf, std::ostream & os) const;
54 void read(Buffer const * buf, LyXLex & lex);
56 void validate(LaTeXFeatures & features) const;
58 Inset * clone(Buffer const &) const;
60 //Inset * clone(Buffer const &, bool same_id) const;
62 Inset::Code lyxCode() const { return Inset::FLOAT_CODE; }
64 int latex(Buffer const *, std::ostream &,
65 LatexRunParams const &) const;
67 int docbook(Buffer const *, std::ostream &, bool mixcont) const;
69 string const editMessage() const;
71 bool insetAllowed(Inset::Code) const;
72 /** returns true if, when outputing LaTeX, font changes should
73 be closed before generating this inset. This is needed for
74 insets that may contain several paragraphs */
75 bool noFontChange() const { return true; }
77 void wide(bool w, BufferParams const &);
79 void addToToc(toc::TocList &, Buffer const *) const;
81 bool showInsetDialog(BufferView *) const;
83 InsetFloatParams const & params() const { return params_; }
87 InsetFloatParams params_;
91 #include "mailinset.h"
94 class InsetFloatMailer : public MailInset {
97 InsetFloatMailer(InsetFloat & inset);
99 virtual InsetBase & inset() const { return inset_; }
101 virtual string const & name() const { return name_; }
103 virtual string const inset2string() const;
105 static void string2params(string const &, InsetFloatParams &);
107 static string const params2string(InsetFloatParams const &);
110 static string const name_;