]> git.lyx.org Git - lyx.git/blob - src/insets/insetminipage.h
dont use pragma impementation and interface anymore
[lyx.git] / src / insets / insetminipage.h
1 // -*- C++ -*-
2 /**
3  * \file insetminipage.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Jürgen Vigna
8  * \author Lars Gullik Bjønnes
9  *
10  * Full author contact details are available in file CREDITS
11  */
12
13 #ifndef InsetMinipage_H
14 #define InsetMinipage_H
15
16
17 #include "insetcollapsable.h"
18 #include "lyxlength.h"
19
20 #include <boost/signals/signal0.hpp>
21
22 /** The minipage inset
23
24 */
25 class InsetMinipage : public InsetCollapsable {
26 public:
27         ///
28         enum Position {
29                 top,
30                 center,
31                 bottom
32         };
33         ///
34         enum InnerPosition {
35                 inner_center,
36                 inner_top,
37                 inner_bottom,
38                 inner_stretch
39         };
40         ///
41         InsetMinipage(BufferParams const &);
42         ///
43         InsetMinipage(InsetMinipage const &, bool same_id = false);
44         ///
45         ~InsetMinipage();
46         ///
47         void write(Buffer const * buf, std::ostream & os) const;
48         ///
49         void read(Buffer const * buf, LyXLex & lex);
50         ///
51         Inset * clone(Buffer const &, bool same_id = false) const;
52         ///
53         int ascent(BufferView *, LyXFont const &) const;
54         ///
55         int descent(BufferView *, LyXFont const &) const;
56         ///
57         Inset::Code lyxCode() const { return Inset::MINIPAGE_CODE; }
58         ///
59         int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
60         ///
61         string const editMessage() const;
62         ///
63         bool insetAllowed(Inset::Code) const;
64         ///
65         Position pos() const;
66         ///
67         void pos(Position);
68         ///
69         InnerPosition innerPos() const;
70         ///
71         void innerPos(InnerPosition);
72         ///
73         LyXLength const & pageHeight() const;
74         ///
75         void pageHeight(LyXLength const &);
76         ///
77         LyXLength const & pageWidth() const;
78         ///
79         void pageWidth(LyXLength const &);
80         ///
81         boost::signal0<void> hideDialog;
82         ///
83         int getMaxWidth(BufferView *, UpdatableInset const *) const;
84         ///
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; }
90         ///
91         bool showInsetDialog(BufferView *) const;
92         ///
93         int latexTextWidth(BufferView *) const;
94
95 private:
96         ///
97         Position pos_;
98         ///
99         InnerPosition inner_pos_;
100         ///
101         LyXLength height_;
102         ///
103         LyXLength width_;
104 };
105
106 #endif