]> git.lyx.org Git - lyx.git/blob - src/insets/InsetWrap.h
Make members of FuncRequest private, per the FIXME there. Again, this is
[lyx.git] / src / insets / InsetWrap.h
1 // -*- C++ -*-
2 /**
3  * \file InsetWrap.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Dekel Tsur
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef INSETWRAP_H
13 #define INSETWRAP_H
14
15 #include "InsetCollapsable.h"
16 #include "Length.h"
17
18
19 namespace lyx {
20
21
22 class InsetWrapParams {
23 public:
24         ///
25         void write(std::ostream &) const;
26         ///
27         void read(Lexer &);
28
29         ///
30         std::string type;
31         ///
32         int lines;
33         ///
34         std::string placement;
35         ///
36         Length overhang;
37         ///
38         Length width;
39 };
40
41
42 /** The wrap inset
43  */
44 class InsetWrap : public InsetCollapsable {
45 public:
46         ///
47         InsetWrap(Buffer *, std::string const &);
48         ///
49         ~InsetWrap();
50         ///
51         InsetWrapParams const & params() const { return params_; }
52         ///
53         static void string2params(std::string const &, InsetWrapParams &);
54         ///
55         static std::string params2string(InsetWrapParams const &);
56 private:
57         ///
58         void write(std::ostream & os) const;
59         ///
60         void read(Lexer & lex);
61         ///
62         void validate(LaTeXFeatures & features) const;
63         ///
64         InsetCode lyxCode() const { return WRAP_CODE; }
65         ///
66         docstring toolTip(BufferView const & bv, int x, int y) const;
67         ///
68         int latex(odocstream &, OutputParams const &) const;
69         ///
70         int plaintext(odocstream &, OutputParams const &) const;
71         ///
72         int docbook(odocstream &, OutputParams const &) const;
73         ///
74         docstring xhtml(XHTMLStream &, OutputParams const &) const;
75         ///
76         bool insetAllowed(InsetCode) const;
77         ///
78         bool showInsetDialog(BufferView *) const;
79         ///
80         bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
81         /// Update the counters of this inset and of its contents
82         void updateBuffer(ParIterator const &, UpdateType);
83         ///
84         void doDispatch(Cursor & cur, FuncRequest & cmd);
85         ///
86         docstring name() const;
87         ///
88         Inset * clone() const { return new InsetWrap(*this); }
89
90         ///
91         InsetWrapParams params_;
92 };
93
94 } // namespace lyx
95
96 #endif