]> git.lyx.org Git - lyx.git/blob - src/insets/insetwrap.h
Add insetwrap.
[lyx.git] / src / insets / insetwrap.h
1 /**
2  * \file insetwrap.h
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Dekel Tsur
7  *
8  * Full author contact details are available in file CREDITS
9  */
10
11 #ifndef InsetWrap_H
12 #define InsetWrap_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "insetcollapsable.h"
19 #include "lyxlength.h"
20
21 #include <boost/signals/signal0.hpp>
22
23 class Painter;
24
25 /** The wrap inset
26
27 */
28 class InsetWrap : public InsetCollapsable {
29 public:
30         ///
31         InsetWrap(BufferParams const &, string const &);
32         ///
33         InsetWrap(InsetWrap const &, bool same_id = false);
34         ///
35         ~InsetWrap();
36         ///
37         void write(Buffer const * buf, std::ostream & os) const;
38         ///
39         void read(Buffer const * buf, LyXLex & lex);
40         ///
41         void validate(LaTeXFeatures & features) const;
42         ///
43         Inset * clone(Buffer const &, bool same_id = false) const;
44         ///
45         Inset::Code lyxCode() const { return Inset::WRAP_CODE; }
46         ///
47         int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
48         ///
49         int docbook(Buffer const *, std::ostream &, bool mixcont) const;
50         ///
51         string const editMessage() const;
52         ///
53         bool insetAllowed(Inset::Code) const;
54         ///
55         int getMaxWidth(BufferView *, UpdatableInset const *) const;
56         ///
57         string const & type() const;
58         ///
59         LyXLength const & pageWidth() const;
60         ///
61         void pageWidth(LyXLength const &);
62         ///
63         void placement(string const & p);
64         ///
65         string const & placement() const;
66         ///
67         bool  showInsetDialog(BufferView *) const;
68         ///
69         boost::signal0<void> hideDialog;
70         ///
71         int latexTextWidth(BufferView *) const;
72 private:
73         ///
74         string Type_;
75         ///
76         string Placement_;
77         ///
78         LyXLength width_;
79 };
80
81 #endif