]> git.lyx.org Git - lyx.git/blob - src/insets/insetminipage.h
dff48efd76b7e703ee98ef2a3b24052506438448
[lyx.git] / src / insets / insetminipage.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *
7  *           Copyright 1998 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         Inset::Code LyxCode() const { return Inset::MINIPAGE_CODE; }
53         ///
54         int Latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
55         ///
56         string const EditMessage() const;
57         ///
58         bool InsertInsetAllowed(Inset * inset) const;
59         ///
60         Position pos() const;
61         ///
62         void pos(Position);
63         ///
64         InnerPosition innerPos() const;
65         ///
66         void innerPos(InnerPosition);
67         ///
68         string const & height() const;
69         ///
70         void height(string const &);
71         ///
72         string const & width() const;
73         ///
74         void width(string const &);
75         ///
76         int widthp() const;
77         ///
78         void widthp(int);
79         ///
80         void widthp(string const &);
81         ///
82         SigC::Signal0<void> hideDialog;
83         ///
84         void InsetButtonRelease(BufferView * bv, int x, int y, int button);
85         ///
86         int getMaxWidth(Painter &, UpdatableInset const *) const;
87         ///
88         bool needFullRow() const { return false; }
89         
90
91 private:
92         ///
93         Position pos_;
94         ///
95         InnerPosition inner_pos_;
96         ///
97         string height_;
98         ///
99         string width_;
100         ///
101         int widthp_;
102 };
103
104 #endif