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 void write(Buffer const & buf, std::ostream & os) const;
65 void read(Buffer const & buf, LyXLex & lex);
67 virtual std::auto_ptr<InsetBase> clone() const;
69 void metrics(MetricsInfo &, Dimension &) const;
71 InsetOld::Code lyxCode() const { return InsetOld::MINIPAGE_CODE; }
73 int latex(Buffer const &, std::ostream &,
74 LatexRunParams const &) const;
76 std::string const editMessage() const;
78 bool insetAllowed(InsetOld::Code) const;
79 /** returns true if, when outputing LaTeX, font changes should
80 be closed before generating this inset. This is needed for
81 insets that may contain several paragraphs */
82 bool noFontChange() const { return true; }
84 bool showInsetDialog(BufferView *) const;
86 int latexTextWidth(BufferView *) const;
88 void params(Params const & p) { params_ = p; }
90 Params const & params() const { return params_; }
95 priv_dispatch(FuncRequest const & cmd, idx_type &, pos_type &);
102 #include "mailinset.h"
105 class InsetMinipageMailer : public MailInset {
108 InsetMinipageMailer(InsetMinipage & inset);
110 virtual InsetBase & inset() const { return inset_; }
112 virtual std::string const & name() const { return name_; }
114 virtual std::string const inset2string(Buffer const &) const;
116 static void string2params(std::string const &, InsetMinipage::Params &);
118 static std::string const params2string(InsetMinipage::Params const &);
121 static std::string const name_;
123 InsetMinipage & inset_;