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 &);
61 //InsetMinipage(InsetMinipage const &, bool same_id);
65 virtual dispatch_result localDispatch(FuncRequest const & cmd);
67 void write(Buffer const * buf, std::ostream & os) const;
69 void read(Buffer const * buf, LyXLex & lex);
71 Inset * clone(Buffer const &) const;
73 //Inset * clone(Buffer const &, bool same_id) const;
75 void dimension(BufferView *, LyXFont const &, Dimension &) const;
77 Inset::Code lyxCode() const { return Inset::MINIPAGE_CODE; }
79 int latex(Buffer const *, std::ostream &,
80 LatexRunParams const &) const;
82 string const editMessage() const;
84 bool insetAllowed(Inset::Code) const;
86 int getMaxWidth(BufferView *, UpdatableInset const *) const;
88 bool needFullRow() const { return false; }
89 /** returns true if, when outputing LaTeX, font changes should
90 be closed before generating this inset. This is needed for
91 insets that may contain several paragraphs */
92 bool noFontChange() const { return true; }
94 bool showInsetDialog(BufferView *) const;
96 int latexTextWidth(BufferView *) const;
98 void params(Params const & p) { params_ = p; }
100 Params const & params() const { return params_; }
107 #include "mailinset.h"
110 class InsetMinipageMailer : public MailInset {
113 InsetMinipageMailer(InsetMinipage & inset);
115 virtual InsetBase & inset() const { return inset_; }
117 virtual string const & name() const { return name_; }
119 virtual string const inset2string() const;
121 static void string2params(string const &, InsetMinipage::Params &);
123 static string const params2string(InsetMinipage::Params const &);
126 static string const name_;
128 InsetMinipage & inset_;