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"
21 #include <sigc++/signal_system.h>
23 /** The minipage inset
26 class InsetMinipage : public InsetCollapsable {
46 void write(Buffer const * buf, std::ostream & os) const;
48 void read(Buffer const * buf, LyXLex & lex);
50 virtual Inset * clone(Buffer const &, bool same_id = false) const;
52 int ascent(BufferView *, LyXFont const &) const;
54 int descent(BufferView *, LyXFont const &) const;
56 Inset::Code lyxCode() const { return Inset::MINIPAGE_CODE; }
58 int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
60 string const editMessage() const;
62 bool insertInsetAllowed(Inset * inset) const;
63 bool insertInsetAllowed(Inset::Code) const;
69 InnerPosition innerPos() const;
71 void innerPos(InnerPosition);
73 string const & height() const;
75 void height(string const &);
77 string const & width() const;
79 void width(string const &);
81 SigC::Signal0<void> hideDialog;
83 void insetButtonRelease(BufferView * bv, int x, int y, int button);
85 int getMaxWidth(BufferView *, UpdatableInset const *) const;
87 bool needFullRow() const { return false; }
89 bool showInsetDialog(BufferView *) const;
94 InnerPosition inner_pos_;