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 &);
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 virtual std::auto_ptr<InsetBase> clone() const;
71 void metrics(MetricsInfo &, Dimension &) const;
73 InsetOld::Code lyxCode() const { return InsetOld::MINIPAGE_CODE; }
75 int latex(Buffer const *, std::ostream &,
76 LatexRunParams const &) const;
78 string const editMessage() const;
80 bool insetAllowed(InsetOld::Code) const;
81 /** returns true if, when outputing LaTeX, font changes should
82 be closed before generating this inset. This is needed for
83 insets that may contain several paragraphs */
84 bool noFontChange() const { return true; }
86 bool showInsetDialog(BufferView *) const;
88 int latexTextWidth(BufferView *) const;
90 void params(Params const & p) { params_ = p; }
92 Params const & params() const { return params_; }
99 #include "mailinset.h"
102 class InsetMinipageMailer : public MailInset {
105 InsetMinipageMailer(InsetMinipage & inset);
107 virtual InsetBase & inset() const { return inset_; }
109 virtual string const & name() const { return name_; }
111 virtual string const inset2string(Buffer const &) const;
113 static void string2params(string const &, InsetMinipage::Params &);
115 static string const params2string(InsetMinipage::Params const &);
118 static string const name_;
120 InsetMinipage & inset_;