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;
82 bool needFullRow() const { return false; }
83 /** returns true if, when outputing LaTeX, font changes should
84 be closed before generating this inset. This is needed for
85 insets that may contain several paragraphs */
86 bool noFontChange() const { return true; }
88 bool showInsetDialog(BufferView *) const;
90 int latexTextWidth(BufferView *) const;
92 void params(Params const & p) { params_ = p; }
94 Params const & params() const { return params_; }
101 #include "mailinset.h"
104 class InsetMinipageMailer : public MailInset {
107 InsetMinipageMailer(InsetMinipage & inset);
109 virtual InsetBase & inset() const { return inset_; }
111 virtual string const & name() const { return name_; }
113 virtual string const inset2string(Buffer const &) const;
115 static void string2params(string const &, InsetMinipage::Params &);
117 static string const params2string(InsetMinipage::Params const &);
120 static string const name_;
122 InsetMinipage & inset_;