]> git.lyx.org Git - lyx.git/blob - src/insets/insetminipage.h
reformatting and remove using delc
[lyx.git] / src / insets / insetminipage.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *
7  *           Copyright 2001 The LyX Team.
8  *
9  * ======================================================
10  */
11
12 #ifndef InsetMinipage_H
13 #define InsetMinipage_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "insetcollapsable.h"
20 #include "vspace.h"
21 #include <sigc++/signal_system.h>
22
23 /** The minipage inset
24   
25 */
26 class InsetMinipage : public InsetCollapsable {
27 public:
28         ///
29         enum Position {
30                 top,
31                 center,
32                 bottom
33         };
34         ///
35         enum InnerPosition {
36                 inner_center,
37                 inner_top,
38                 inner_bottom,
39                 inner_stretch
40         };
41         ///
42         InsetMinipage();
43         ///
44         ~InsetMinipage();
45         ///
46         void Write(Buffer const * buf, std::ostream & os) const;
47         ///
48         void Read(Buffer const * buf, LyXLex & lex);
49         ///
50         Inset * Clone(Buffer const &) const;
51         ///
52         int ascent(BufferView *, LyXFont const &) const;
53         ///
54         int descent(BufferView *, LyXFont const &) const;
55         ///
56         Inset::Code LyxCode() const { return Inset::MINIPAGE_CODE; }
57         ///
58         int Latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
59         ///
60         string const EditMessage() const;
61         ///
62         bool InsertInsetAllowed(Inset * inset) const;
63         ///
64         Position pos() const;
65         ///
66         void pos(Position);
67         ///
68         InnerPosition innerPos() const;
69         ///
70         void innerPos(InnerPosition);
71         ///
72         string const & height() const;
73         ///
74         void height(string const &);
75         ///
76         string const & width() const;
77         ///
78         void width(string const &);
79         ///
80         SigC::Signal0<void> hideDialog;
81         ///
82         void InsetButtonRelease(BufferView * bv, int x, int y, int button);
83         ///
84         int getMaxWidth(BufferView *, UpdatableInset const *) const;
85         ///
86         bool needFullRow() const { return false; }
87         ///
88         bool ShowInsetDialog(BufferView *) const;
89 private:
90         ///
91         Position pos_;
92         ///
93         InnerPosition inner_pos_;
94         ///
95         string height_;
96         ///
97         string width_;
98 };
99
100 #endif