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
20 #include "insetcollapsable.h"
21 #include "lyxlength.h"
23 #include <boost/signals/signal0.hpp>
25 /** The minipage inset
28 class InsetMinipage : public InsetCollapsable {
44 InsetMinipage(BufferParams const &);
46 InsetMinipage(InsetMinipage const &, bool same_id = false);
50 void write(Buffer const * buf, std::ostream & os) const;
52 void read(Buffer const * buf, LyXLex & lex);
54 Inset * clone(Buffer const &, bool same_id = false) const;
56 int ascent(BufferView *, LyXFont const &) const;
58 int descent(BufferView *, LyXFont const &) const;
60 Inset::Code lyxCode() const { return Inset::MINIPAGE_CODE; }
62 int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
64 string const editMessage() const;
66 bool insetAllowed(Inset::Code) const;
72 InnerPosition innerPos() const;
74 void innerPos(InnerPosition);
76 LyXLength const & pageHeight() const;
78 void pageHeight(LyXLength const &);
80 LyXLength const & pageWidth() const;
82 void pageWidth(LyXLength const &);
84 boost::signal0<void> hideDialog;
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;
102 InnerPosition inner_pos_;