3 * \file insetminipage.h
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
13 #ifndef INSETMINIPAGE_H
14 #define INSETMINIPAGE_H
16 #include "insetcollapsable.h"
17 #include "lyxlength.h"
19 /** The minipage inset
22 class InsetMinipage : public InsetCollapsable {
45 InnerPosition inner_pos;
51 void write(std::ostream & os) const;
53 void read(LyXLex & lex);
57 InsetMinipage(BufferParams const &);
59 InsetMinipage(InsetMinipage const &, bool same_id = false);
63 virtual dispatch_result localDispatch(FuncRequest const & cmd);
65 void write(Buffer const * buf, std::ostream & os) const;
67 void read(Buffer const * buf, LyXLex & lex);
69 Inset * clone(Buffer const &, bool same_id = false) const;
71 void dimension(BufferView *, LyXFont const &, Dimension &) const;
73 Inset::Code lyxCode() const { return Inset::MINIPAGE_CODE; }
75 int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
77 string const editMessage() const;
79 bool insetAllowed(Inset::Code) const;
81 int getMaxWidth(BufferView *, UpdatableInset const *) const;
83 bool needFullRow() const { return false; }
84 /** returns true if, when outputing LaTeX, font changes should
85 be closed before generating this inset. This is needed for
86 insets that may contain several paragraphs */
87 bool noFontChange() const { return true; }
89 bool showInsetDialog(BufferView *) const;
91 int latexTextWidth(BufferView *) const;
93 void params(Params const & p) { params_ = p; }
95 Params const & params() const { return params_; }
102 #include "mailinset.h"
105 class InsetMinipageMailer : public MailInset {
108 InsetMinipageMailer(InsetMinipage & inset);
110 virtual InsetBase & inset() const { return inset_; }
112 virtual string const & name() const { return name_; }
114 virtual string const inset2string() const;
116 static void string2params(string const &, InsetMinipage::Params &);
118 static string const params2string(InsetMinipage::Params const &);
121 static string const name_;
123 InsetMinipage & inset_;