]> git.lyx.org Git - lyx.git/blob - src/insets/insetwrap.h
2724d8e95766db56792526961b9865af1300a1a4
[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
15 #include "insetcollapsable.h"
16 #include "toc.h"
17 #include "lyxlength.h"
18
19 #include <boost/signals/signal0.hpp>
20
21 class Painter;
22
23 /** The wrap inset
24
25 */
26 class InsetWrap : public InsetCollapsable {
27 public:
28         ///
29         InsetWrap(BufferParams const &, string const &);
30         ///
31         InsetWrap(InsetWrap const &, bool same_id = false);
32         ///
33         ~InsetWrap();
34         ///
35         void write(Buffer const * buf, std::ostream & os) const;
36         ///
37         void read(Buffer const * buf, LyXLex & lex);
38         ///
39         void validate(LaTeXFeatures & features) const;
40         ///
41         Inset * clone(Buffer const &, bool same_id = false) const;
42         ///
43         Inset::Code lyxCode() const { return Inset::WRAP_CODE; }
44         ///
45         int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
46         ///
47         int docbook(Buffer const *, std::ostream &, bool mixcont) const;
48         ///
49         string const editMessage() const;
50         ///
51         bool insetAllowed(Inset::Code) const;
52         ///
53         int getMaxWidth(BufferView *, UpdatableInset const *) const;
54         ///
55         string const & type() const;
56         ///
57         LyXLength const & pageWidth() const;
58         ///
59         void pageWidth(LyXLength const &);
60         ///
61         void placement(string const & p);
62         ///
63         string const & placement() const;
64         ///
65         void addToToc(toc::TocList &, Buffer const *) 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