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
17 #include "insetcollapsable.h"
18 #include "lyxlength.h"
20 #include <boost/signals/signal0.hpp>
22 /** The minipage inset
25 class InsetMinipage : public InsetCollapsable {
41 InsetMinipage(BufferParams const &);
43 InsetMinipage(InsetMinipage const &, bool same_id = false);
47 void write(Buffer const * buf, std::ostream & os) const;
49 void read(Buffer const * buf, LyXLex & lex);
51 Inset * clone(Buffer const &, bool same_id = false) const;
53 int ascent(BufferView *, LyXFont const &) const;
55 int descent(BufferView *, LyXFont const &) const;
57 Inset::Code lyxCode() const { return Inset::MINIPAGE_CODE; }
59 int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
61 string const editMessage() const;
63 bool insetAllowed(Inset::Code) const;
69 InnerPosition innerPos() const;
71 void innerPos(InnerPosition);
73 LyXLength const & pageHeight() const;
75 void pageHeight(LyXLength const &);
77 LyXLength const & pageWidth() const;
79 void pageWidth(LyXLength const &);
81 boost::signal0<void> hideDialog;
83 int getMaxWidth(BufferView *, UpdatableInset const *) const;
85 bool needFullRow() const { return false; }
86 /** returns true if, when outputing LaTeX, font changes should
87 be closed before generating this inset. This is needed for
88 insets that may contain several paragraphs */
89 bool noFontChange() const { return true; }
91 bool showInsetDialog(BufferView *) const;
93 int latexTextWidth(BufferView *) const;
99 InnerPosition inner_pos_;