]> git.lyx.org Git - lyx.git/blob - src/insets/InsetVSpace.h
86ed8833b51d391e692c1c486f1751e0270fe004
[lyx.git] / src / insets / InsetVSpace.h
1 // -*- C++ -*-
2 /**
3  * \file InsetVSpace.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef INSET_VSPACE_H
13 #define INSET_VSPACE_H
14
15 #include "Inset.h"
16 #include "VSpace.h"
17
18
19 namespace lyx {
20
21 class InsetVSpace : public Inset
22 {
23 public:
24         ///
25         InsetVSpace() {}
26         ///
27         InsetVSpace(VSpace const &);
28         ///
29         ~InsetVSpace();
30         /// How much?
31         VSpace const & space() const { return space_; }
32         ///
33         InsetCode lyxCode() const { return VSPACE_CODE; }
34         ///
35         bool hasSettings() const { return true; }
36         ///
37         docstring contextMenu(BufferView const & bv, int x, int y) const;
38         ///
39         static void string2params(std::string const &, VSpace &);
40         ///
41         static std::string params2string(VSpace const &);
42 private:
43         ///
44         void metrics(MetricsInfo & mi, Dimension & dim) const;
45         ///
46         void draw(PainterInfo & pi, int x, int y) const;
47         ///
48         int latex(odocstream &, OutputParams const &) const;
49         ///
50         int plaintext(odocstream &, OutputParams const &) const;
51         ///
52         int docbook(odocstream &, OutputParams const &) const;
53         ///
54         docstring xhtml(odocstream &, OutputParams const &) const;
55         ///
56         void read(Lexer & lex);
57         ///
58         void write(std::ostream & os) const;
59         ///
60         DisplayType display() const { return AlignCenter; }
61         ///
62         void doDispatch(Cursor & cur, FuncRequest & cmd);
63         ///
64         bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
65         ///
66         Inset * clone() const { return new InsetVSpace(*this); }
67         ///
68         docstring const label() const;
69         ///
70         bool showInsetDialog(BufferView * bv) const;
71
72         ///
73         VSpace space_;
74 };
75
76
77 } // namespace lyx
78
79 #endif