2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2001 The LyX Team.
9 * ======================================================
12 #ifndef InsetMinipage_H
13 #define InsetMinipage_H
19 #include "insetcollapsable.h"
20 #include "lyxlength.h"
22 #include <boost/signals/signal0.hpp>
24 /** The minipage inset
27 class InsetMinipage : public InsetCollapsable {
43 InsetMinipage(BufferParams const &);
45 InsetMinipage(InsetMinipage const &, bool same_id = false);
49 void write(Buffer const * buf, std::ostream & os) const;
51 void read(Buffer const * buf, LyXLex & lex);
53 Inset * clone(Buffer const &, bool same_id = false) const;
55 int ascent(BufferView *, LyXFont const &) const;
57 int descent(BufferView *, LyXFont const &) const;
59 Inset::Code lyxCode() const { return Inset::MINIPAGE_CODE; }
61 int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
63 string const editMessage() const;
65 bool insetAllowed(Inset::Code) const;
71 InnerPosition innerPos() const;
73 void innerPos(InnerPosition);
75 LyXLength const & pageHeight() const;
77 void pageHeight(LyXLength const &);
79 LyXLength const & pageWidth() const;
81 void pageWidth(LyXLength const &);
83 boost::signal0<void> hideDialog;
85 int getMaxWidth(BufferView *, UpdatableInset const *) const;
87 bool needFullRow() const { return false; }
89 bool showInsetDialog(BufferView *) const;
91 int latexTextWidth(BufferView *) const;
97 InnerPosition inner_pos_;