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 &);
48 virtual dispatch_result localDispatch(FuncRequest const & cmd);
50 void write(Buffer const * buf, std::ostream & os) const;
52 void read(Buffer const * buf, LyXLex & lex);
54 void validate(LaTeXFeatures & features) const;
56 virtual std::auto_ptr<InsetBase> clone() const;
58 InsetOld::Code lyxCode() const { return InsetOld::FLOAT_CODE; }
60 int latex(Buffer const *, std::ostream &,
61 LatexRunParams const &) const;
63 int linuxdoc(Buffer const *, std::ostream &) const;
65 int docbook(Buffer const *, std::ostream &, bool mixcont) const;
67 string const editMessage() const;
69 bool insetAllowed(InsetOld::Code) const;
70 /** returns true if, when outputing LaTeX, font changes should
71 be closed before generating this inset. This is needed for
72 insets that may contain several paragraphs */
73 bool noFontChange() const { return true; }
75 void wide(bool w, BufferParams const &);
77 void addToToc(toc::TocList &, Buffer const *) const;
79 bool showInsetDialog(BufferView *) const;
81 InsetFloatParams const & params() const { return params_; }
85 InsetFloatParams params_;
89 #include "mailinset.h"
92 class InsetFloatMailer : public MailInset {
95 InsetFloatMailer(InsetFloat & inset);
97 virtual InsetBase & inset() const { return inset_; }
99 virtual string const & name() const { return name_; }
101 virtual string const inset2string(Buffer const &) const;
103 static void string2params(string const &, InsetFloatParams &);
105 static string const params2string(InsetFloatParams const &);
108 static string const name_;